From 6bdae51c0ef535dcba79f6299f1b6040c189a155 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 23 Aug 2024 06:21:30 -0700 Subject: [PATCH 1/8] feat(all): auto-regenerate discovery clients (#2750) --- accessapproval/v1/accessapproval-api.json | 17 ++++++++- accessapproval/v1/accessapproval-gen.go | 27 ++++++++++++++ .../v1/androidmanagement-api.json | 7 +++- androidmanagement/v1/androidmanagement-gen.go | 2 + androidpublisher/v3/androidpublisher-api.json | 5 ++- androidpublisher/v3/androidpublisher-gen.go | 5 +-- assuredworkloads/v1/assuredworkloads-api.json | 14 +++++-- assuredworkloads/v1/assuredworkloads-gen.go | 11 ++++++ .../v1beta1/assuredworkloads-api.json | 14 +++++-- .../v1beta1/assuredworkloads-gen.go | 11 ++++++ backupdr/v1/backupdr-api.json | 7 +--- backupdr/v1/backupdr-gen.go | 3 -- cloudidentity/v1/cloudidentity-api.json | 4 +- cloudidentity/v1/cloudidentity-gen.go | 2 +- dataflow/v1b3/dataflow-api.json | 12 +++++- dataflow/v1b3/dataflow-gen.go | 6 +++ dlp/v2/dlp-api.json | 6 +-- dlp/v2/dlp-gen.go | 18 ++++++--- .../v1/firebasedynamiclinks-api.json | 28 +++++++++++--- .../v1/firebasedynamiclinks-gen.go | 12 ++++-- gkehub/v1beta/gkehub-api.json | 28 +++++++------- gkehub/v1beta/gkehub-gen.go | 32 +++++++++------- go.work.sum | 1 + .../v1beta1/networkservices-api.json | 16 +++++++- .../v1beta1/networkservices-gen.go | 16 +++++++- run/v2/run-api.json | 10 ++++- run/v2/run-gen.go | 2 + translate/v3/translate-api.json | 25 ++++++++++--- translate/v3/translate-gen.go | 37 +++++++++++++++++-- 29 files changed, 293 insertions(+), 85 deletions(-) diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index 5736aa95ff0..907b24056fc 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -913,7 +913,7 @@ } } }, - "revision": "20240607", + "revision": "20240820", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -1076,6 +1076,10 @@ "format": "google-datetime", "type": "string" }, + "requestedAugmentedInfo": { + "$ref": "AugmentedInfo", + "description": "This field contains the augmented information of the request." + }, "requestedDuration": { "description": "The requested access duration.", "format": "google-duration", @@ -1147,6 +1151,17 @@ }, "type": "object" }, + "AugmentedInfo": { + "description": "This field contains the augmented information of the request.", + "id": "AugmentedInfo", + "properties": { + "command": { + "description": "For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks).", + "type": "string" + } + }, + "type": "object" + }, "DismissApprovalRequestMessage": { "description": "Request to dismiss an approval request.", "id": "DismissApprovalRequestMessage", diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index df5832b8793..6bd7f701b01 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -443,6 +443,9 @@ type ApprovalRequest struct { Name string `json:"name,omitempty"` // RequestTime: The time at which approval was requested. RequestTime string `json:"requestTime,omitempty"` + // RequestedAugmentedInfo: This field contains the augmented information of the + // request. + RequestedAugmentedInfo *AugmentedInfo `json:"requestedAugmentedInfo,omitempty"` // RequestedDuration: The requested access duration. RequestedDuration string `json:"requestedDuration,omitempty"` // RequestedExpiration: The original requested expiration for the approval. @@ -539,6 +542,30 @@ func (s ApproveDecision) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AugmentedInfo: This field contains the augmented information of the request. +type AugmentedInfo struct { + // Command: For command-line tools, the full command-line exactly as entered by + // the actor without adding any additional characters (such as quotation + // marks). + Command string `json:"command,omitempty"` + // ForceSendFields is a list of field names (e.g. "Command") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Command") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AugmentedInfo) MarshalJSON() ([]byte, error) { + type NoMethod AugmentedInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DismissApprovalRequestMessage: Request to dismiss an approval request. type DismissApprovalRequestMessage struct { } diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 2678425e70e..e936206bcff 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20240808", + "revision": "20240821", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -6123,6 +6123,11 @@ "description": "The carrier name associated with this SIM card.", "type": "string" }, + "iccId": { + "description": "Output only. The ICCID associated with this SIM card.", + "readOnly": true, + "type": "string" + }, "phoneNumber": { "description": "The phone number associated with this SIM card.", "type": "string" diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 9b27f241b32..a52240c5e25 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -6134,6 +6134,8 @@ func (s SystemUpdateInfo) MarshalJSON() ([]byte, error) { type TelephonyInfo struct { // CarrierName: The carrier name associated with this SIM card. CarrierName string `json:"carrierName,omitempty"` + // IccId: Output only. The ICCID associated with this SIM card. + IccId string `json:"iccId,omitempty"` // PhoneNumber: The phone number associated with this SIM card. PhoneNumber string `json:"phoneNumber,omitempty"` // ForceSendFields is a list of field names (e.g. "CarrierName") to diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 0fd37bd48a6..54c250bd0fc 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -741,7 +741,8 @@ ], "parameters": { "ackBundleInstallationWarning": { - "description": "Must be set to true if the app bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB).", + "deprecated": true, + "description": "Deprecated. The installation warning has been removed, it's not necessary to set this field anymore.", "location": "query", "type": "boolean" }, @@ -4731,7 +4732,7 @@ } } }, - "revision": "20240820", + "revision": "20240821", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 9f9c53755d4..7cc7e0cc1b2 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -9628,9 +9628,8 @@ func (r *EditsBundlesService) Upload(packageName string, editId string) *EditsBu } // AckBundleInstallationWarning sets the optional parameter -// "ackBundleInstallationWarning": Must be set to true if the app bundle -// installation may trigger a warning on user devices (for example, if -// installation size may be over a threshold, typically 100 MB). +// "ackBundleInstallationWarning": Deprecated. The installation warning has +// been removed, it's not necessary to set this field anymore. func (c *EditsBundlesUploadCall) AckBundleInstallationWarning(ackBundleInstallationWarning bool) *EditsBundlesUploadCall { c.urlParams_.Set("ackBundleInstallationWarning", fmt.Sprint(ackBundleInstallationWarning)) return c diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 9d7a1e2fd0b..3899bfaf421 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240801", + "revision": "20240821", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -1281,14 +1281,18 @@ "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS", "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT", - "SOVEREIGN_CONTROLS_BY_PSN" + "SOVEREIGN_CONTROLS_BY_PSN", + "SOVEREIGN_CONTROLS_BY_CNTXT", + "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" ], "enumDescriptions": [ "", "Enum representing S3NS (Thales) partner.", "Enum representing T_SYSTEM (TSI) partner.", "Enum representing SIA_MINSAIT (Indra) partner.", - "Enum representing PSN (TIM) partner." + "Enum representing PSN (TIM) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner offering without EKM." ], "type": "string" }, @@ -1296,6 +1300,10 @@ "$ref": "GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions", "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, + "partnerServicesBillingAccount": { + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "type": "string" + }, "provisionedResourcesParent": { "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 83dff38a2d0..b793b109984 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -938,10 +938,21 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT" - Enum representing SIA_MINSAIT // (Indra) partner. // "SOVEREIGN_CONTROLS_BY_PSN" - Enum representing PSN (TIM) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT" - Enum representing CNTXT (Kingdom of Saudi + // Arabia) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" - Enum representing CNTXT (Kingdom of + // Saudi Arabia) partner offering without EKM. Partner string `json:"partner,omitempty"` // PartnerPermissions: Optional. Permissions granted to the AW Partner SA // account for the customer workload PartnerPermissions *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` + // PartnerServicesBillingAccount: Optional. Billing account necessary for + // purchasing services from Sovereign Partners. This field is required for + // creating SIA/PSN partner workloads. The caller should have + // 'billing.resourceAssociations.create' IAM permission on this + // billing-account. The format of this string is + // billingAccounts/AAAAAA-BBBBBB-CCCCCC + PartnerServicesBillingAccount string `json:"partnerServicesBillingAccount,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the // resources managed by this Assured Workload. May be either empty or a folder // resource which is a child of the Workload parent. If not specified all diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 963e48d0ccf..e0ec6cad621 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -588,7 +588,7 @@ } } }, - "revision": "20240801", + "revision": "20240821", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -1296,14 +1296,18 @@ "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS", "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT", - "SOVEREIGN_CONTROLS_BY_PSN" + "SOVEREIGN_CONTROLS_BY_PSN", + "SOVEREIGN_CONTROLS_BY_CNTXT", + "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" ], "enumDescriptions": [ "", "Enum representing S3NS (Thales) partner.", "Enum representing T_SYSTEM (TSI) partner.", "Enum representing SIA_MINSAIT (Indra) partner.", - "Enum representing PSN (TIM) partner." + "Enum representing PSN (TIM) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner offering without EKM." ], "type": "string" }, @@ -1311,6 +1315,10 @@ "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions", "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, + "partnerServicesBillingAccount": { + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "type": "string" + }, "provisionedResourcesParent": { "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index fa3c5409bb9..091764783ee 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -935,10 +935,21 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT" - Enum representing SIA_MINSAIT // (Indra) partner. // "SOVEREIGN_CONTROLS_BY_PSN" - Enum representing PSN (TIM) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT" - Enum representing CNTXT (Kingdom of Saudi + // Arabia) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" - Enum representing CNTXT (Kingdom of + // Saudi Arabia) partner offering without EKM. Partner string `json:"partner,omitempty"` // PartnerPermissions: Optional. Permissions granted to the AW Partner SA // account for the customer workload PartnerPermissions *GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` + // PartnerServicesBillingAccount: Optional. Billing account necessary for + // purchasing services from Sovereign Partners. This field is required for + // creating SIA/PSN partner workloads. The caller should have + // 'billing.resourceAssociations.create' IAM permission on this + // billing-account. The format of this string is + // billingAccounts/AAAAAA-BBBBBB-CCCCCC + PartnerServicesBillingAccount string `json:"partnerServicesBillingAccount,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the // resources managed by this Assured Workload. May be either empty or a folder // resource which is a child of the Workload parent. If not specified all diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index 5a36e98b61f..1510c627436 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -1598,7 +1598,7 @@ } } }, - "revision": "20240808", + "revision": "20240815", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2486,11 +2486,6 @@ "format": "google-datetime", "type": "string" }, - "enforcedRetentionDuration": { - "description": "Required. The default retention period for each backup in the backup vault (Deprecated).", - "format": "google-duration", - "type": "string" - }, "etag": { "description": "Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.", "type": "string" diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 3a1d57c3c80..52579b44f44 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -1127,9 +1127,6 @@ type BackupVault struct { // EffectiveTime: Optional. Time after which the BackupVault resource is // locked. EffectiveTime string `json:"effectiveTime,omitempty"` - // EnforcedRetentionDuration: Required. The default retention period for each - // backup in the backup vault (Deprecated). - EnforcedRetentionDuration string `json:"enforcedRetentionDuration,omitempty"` // Etag: Optional. Server specified ETag for the backup vault resource to // prevent simultaneous updates from overwiting each other. Etag string `json:"etag,omitempty"` diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index 248632d04ed..02a214120c3 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -422,7 +422,7 @@ ], "enumDescriptions": [ "Default value. The value is unused.", - "This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags). This includes devices that may be unaassigned or assigned to users.", + "This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags). This includes devices that may be unassigned or assigned to users.", "This view contains all devices with at least one user registered on the device. Each device in the response contains all device information, except for asset tags." ], "location": "query", @@ -1990,7 +1990,7 @@ } } }, - "revision": "20240611", + "revision": "20240820", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 9ee017a3f20..1116a904dbe 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -4309,7 +4309,7 @@ func (c *DevicesListCall) PageToken(pageToken string) *DevicesListCall { // // company admin. Each device in the response contains all information // specified by the company admin when importing the device (i.e. asset tags). -// This includes devices that may be unaassigned or assigned to users. +// This includes devices that may be unassigned or assigned to users. // // "USER_ASSIGNED_DEVICES" - This view contains all devices with at least one // diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 9287e04ffd1..081758ab888 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2208,7 +2208,7 @@ } } }, - "revision": "20240807", + "revision": "20240817", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -6761,6 +6761,16 @@ "description": "Map from user step names to state families.", "type": "object" }, + "userWorkerRunnerV1Settings": { + "description": "Binary encoded proto to control runtime behavior of the java runner v1 user worker.", + "format": "byte", + "type": "string" + }, + "userWorkerRunnerV2Settings": { + "description": "Binary encoded proto to control runtime behavior of the runner v2 user worker.", + "format": "byte", + "type": "string" + }, "windmillServiceEndpoint": { "description": "If present, the worker must use this endpoint to communicate with Windmill Service dispatchers, otherwise the worker must continue to use whatever endpoint it had been using.", "type": "string" diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 4ec4c5258bf..4026cccb544 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -6013,6 +6013,12 @@ type StreamingConfigTask struct { StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` // UserStepToStateFamilyNameMap: Map from user step names to state families. UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"` + // UserWorkerRunnerV1Settings: Binary encoded proto to control runtime behavior + // of the java runner v1 user worker. + UserWorkerRunnerV1Settings string `json:"userWorkerRunnerV1Settings,omitempty"` + // UserWorkerRunnerV2Settings: Binary encoded proto to control runtime behavior + // of the runner v2 user worker. + UserWorkerRunnerV2Settings string `json:"userWorkerRunnerV2Settings,omitempty"` // WindmillServiceEndpoint: If present, the worker must use this endpoint to // communicate with Windmill Service dispatchers, otherwise the worker must // continue to use whatever endpoint it had been using. diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index bb9f94b8062..7bee9dccb9a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -1432,7 +1432,7 @@ ], "parameters": { "filter": { - "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", + "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `data_source_type` - The profile's data source type, like \"google/storage/bucket\". - `data_storage_location` - The location where the file store's data is stored, like \"us-central1\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -4065,7 +4065,7 @@ ], "parameters": { "filter": { - "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", + "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `data_source_type` - The profile's data source type, like \"google/storage/bucket\". - `data_storage_location` - The location where the file store's data is stored, like \"us-central1\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -5015,7 +5015,7 @@ } } }, - "revision": "20240808", + "revision": "20240818", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 176f4f5433f..5a4ffaebdae 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -14633,9 +14633,12 @@ func (r *OrganizationsLocationsFileStoreDataProfilesService) List(parent string) // of restrictions implicitly uses `AND`. * A restriction has the form of // `{field} {operator} {value}`. * Supported fields/values: - `project_id` - // The Google Cloud project ID. - `file_store_path` - The path like -// "gs://bucket". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` -// - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - -// `status_code` - an RPC status code as defined in +// "gs://bucket". - `data_source_type` - The profile's data source type, like +// "google/storage/bucket". - `data_storage_location` - The location where the +// file store's data is stored, like "us-central1". - `sensitivity_level` - +// HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - +// `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status +// code as defined in // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * // The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND // status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * @@ -24673,9 +24676,12 @@ func (r *ProjectsLocationsFileStoreDataProfilesService) List(parent string) *Pro // of restrictions implicitly uses `AND`. * A restriction has the form of // `{field} {operator} {value}`. * Supported fields/values: - `project_id` - // The Google Cloud project ID. - `file_store_path` - The path like -// "gs://bucket". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` -// - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - -// `status_code` - an RPC status code as defined in +// "gs://bucket". - `data_source_type` - The profile's data source type, like +// "google/storage/bucket". - `data_storage_location` - The location where the +// file store's data is stored, like "us-central1". - `sensitivity_level` - +// HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - +// `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status +// code as defined in // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * // The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND // status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 20fa37dc523..fbb46feb7dd 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -224,7 +224,7 @@ } } }, - "revision": "20231107", + "revision": "20240821", "rootUrl": "https://firebasedynamiclinks.googleapis.com/", "schemas": { "AnalyticsInfo": { @@ -520,6 +520,13 @@ "$ref": "DynamicLinkEventStat" }, "type": "array" + }, + "warnings": { + "description": "Optional warnings associated this API request.", + "items": { + "$ref": "DynamicLinkWarning" + }, + "type": "array" } }, "type": "object" @@ -559,7 +566,8 @@ "BAD_URI_SCHEME_SOCIAL_URL", "LINK_LENGTH_TOO_LONG", "LINK_WITH_FRAGMENTS", - "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" + "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID", + "API_DEPRECATED" ], "enumDescriptions": [ "Unknown code.", @@ -582,15 +590,16 @@ "Debug param format is incorrect.", "isAd param format is incorrect.", "Indicates a certain param is deprecated.", - "Indicates certain paramater is not recognized.", - "Indicates certain paramater is too long.", + "Indicates certain parameter is not recognized.", + "Indicates certain parameter is too long.", "Social meta tag image link is not a valid URI.", "Social meta tag image link has an invalid (non http/https) URI scheme.", "", "", "Dynamic Link URL length is too long.", "Dynamic Link URL contains fragments.", - "The iOS bundle ID does not match with the given iOS store ID." + "The iOS bundle ID does not match with the given iOS store ID.", + "The API is deprecated." ], "type": "string" }, @@ -818,6 +827,13 @@ "utmTerm": { "description": "Scion term value to be propagated by iSDK to Scion at app-reopen.", "type": "string" + }, + "warning": { + "description": "Optional warnings associated this API request.", + "items": { + "$ref": "DynamicLinkWarning" + }, + "type": "array" } }, "type": "object" @@ -930,7 +946,7 @@ ], "enumDescriptions": [ "Indicates that no attributes were found for this short url.", - "Indicates that short url has been flagged by AbuseIAm team as spam." + "Indicates that short url has been flagged as spam." ], "type": "string" }, diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go index 0e803d2e5ce..38429447bd0 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go @@ -544,6 +544,8 @@ func (s DynamicLinkInfo) MarshalJSON() ([]byte, error) { type DynamicLinkStats struct { // LinkEventStats: Dynamic Link event stats. LinkEventStats []*DynamicLinkEventStat `json:"linkEventStats,omitempty"` + // Warnings: Optional warnings associated this API request. + Warnings []*DynamicLinkWarning `json:"warnings,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -602,8 +604,8 @@ type DynamicLinkWarning struct { // "BAD_DEBUG_PARAM" - Debug param format is incorrect. // "BAD_AD_PARAM" - isAd param format is incorrect. // "DEPRECATED_PARAM" - Indicates a certain param is deprecated. - // "UNRECOGNIZED_PARAM" - Indicates certain paramater is not recognized. - // "TOO_LONG_PARAM" - Indicates certain paramater is too long. + // "UNRECOGNIZED_PARAM" - Indicates certain parameter is not recognized. + // "TOO_LONG_PARAM" - Indicates certain parameter is too long. // "NOT_URI_SOCIAL_IMAGE_LINK" - Social meta tag image link is not a valid // URI. // "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" - Social meta tag image link has an @@ -614,6 +616,7 @@ type DynamicLinkWarning struct { // "LINK_WITH_FRAGMENTS" - Dynamic Link URL contains fragments. // "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" - The iOS bundle ID does not // match with the given iOS store ID. + // "API_DEPRECATED" - The API is deprecated. WarningCode string `json:"warningCode,omitempty"` // WarningDocumentLink: The document describing the warning, and helps resolve. WarningDocumentLink string `json:"warningDocumentLink,omitempty"` @@ -853,6 +856,8 @@ type GetIosReopenAttributionResponse struct { UtmSource string `json:"utmSource,omitempty"` // UtmTerm: Scion term value to be propagated by iSDK to Scion at app-reopen. UtmTerm string `json:"utmTerm,omitempty"` + // Warning: Optional warnings associated this API request. + Warning []*DynamicLinkWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -989,8 +994,7 @@ type ManagedShortLink struct { // Possible values: // "UNSPECIFIED_ATTRIBUTE" - Indicates that no attributes were found for this // short url. - // "SPAM" - Indicates that short url has been flagged by AbuseIAm team as - // spam. + // "SPAM" - Indicates that short url has been flagged as spam. FlaggedAttribute []string `json:"flaggedAttribute,omitempty"` // Info: Full Dyamic Link info Info *DynamicLinkInfo `json:"info,omitempty"` diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 3996215ce41..705b237875e 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240809", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2550,7 +2550,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "anthosobservability": { @@ -2581,7 +2581,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2598,7 +2598,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -3320,7 +3320,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3743,7 +3743,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3811,11 +3811,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3836,7 +3836,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3851,9 +3851,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5101,7 +5101,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "anthosobservability": { @@ -6237,6 +6237,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6266,6 +6267,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 988f7248767..7a851f2e535 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1024,7 +1024,7 @@ func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureSpec: CommonFeatureSpec contains Hub-wide configuration +// CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration // information type CommonFeatureSpec struct { // Anthosobservability: Anthos Observability spec @@ -1057,7 +1057,7 @@ func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureState: CommonFeatureState contains Hub-wide Feature status +// CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status // information. type CommonFeatureState struct { // Appdevexperience: Appdevexperience specific state. @@ -1066,7 +1066,7 @@ type CommonFeatureState struct { Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"` // Fleetobservability: FleetObservability feature state. Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"` - // State: Output only. The "running state" of the Feature in this Hub. + // State: Output only. The "running state" of the Feature in this Fleet. State *FeatureState `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Appdevexperience") to // unconditionally include in API requests. By default, fields with empty or @@ -1816,6 +1816,9 @@ type ConfigManagementMembershipSpec struct { // ConfigSync: Config Sync configuration for the cluster. ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"` // HierarchyController: Hierarchy Controller configuration for the cluster. + // Deprecated: Configuring Hierarchy Controller through the configmanagement + // feature is no longer recommended. Use + // https://github.com/kubernetes-sigs/hierarchical-namespaces instead. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` // Management: Enables automatic Feature management. // @@ -2352,7 +2355,7 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Feature: Feature represents the settings and status of any Hub Feature. +// Feature: Feature represents the settings and status of any Fleet Feature. type Feature struct { // CreateTime: Output only. When the Feature resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2406,10 +2409,10 @@ type Feature struct { // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is // a valid Scope in this project. {p} WILL match the Feature's project. ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"` - // Spec: Optional. Hub-wide Feature configuration. If this Feature does not - // support any Hub-wide configuration, this field may be unused. + // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. Spec *CommonFeatureSpec `json:"spec,omitempty"` - // State: Output only. The Hub-wide Feature state. + // State: Output only. The Fleet-wide Feature state. State *CommonFeatureState `json:"state,omitempty"` // Unreachable: Output only. List of locations that could not be reached while // fetching this feature. @@ -2439,7 +2442,7 @@ func (s Feature) MarshalJSON() ([]byte, error) { // FeatureResourceState: FeatureResourceState describes the state of a Feature // *resource* in the GkeHub API. See `FeatureState` for the "running state" of -// the Feature in the Hub and across Memberships. +// the Feature in the Fleet and across Memberships. type FeatureResourceState struct { // State: The current state of the Feature resource in the Hub API. // @@ -2447,10 +2450,10 @@ type FeatureResourceState struct { // "STATE_UNSPECIFIED" - State is unknown or not set. // "ENABLING" - The Feature is being enabled, and the Feature resource is // being created. Once complete, the corresponding Feature will be enabled in - // this Hub. - // "ACTIVE" - The Feature is enabled in this Hub, and the Feature resource is - // fully available. - // "DISABLING" - The Feature is being disabled in this Hub, and the Feature + // this Fleet. + // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource + // is fully available. + // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature // resource is being deleted. // "UPDATING" - The Feature resource is being updated. // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub @@ -4094,8 +4097,7 @@ func (s MembershipEndpoint) MarshalJSON() ([]byte, error) { } // MembershipFeatureSpec: MembershipFeatureSpec contains configuration -// information for a single Membership. NOTE: Please use snake case in your -// feature name. +// information for a single Membership. type MembershipFeatureSpec struct { // Anthosobservability: Anthos Observability-specific spec Anthosobservability *AnthosObservabilityMembershipSpec `json:"anthosobservability,omitempty"` @@ -5537,6 +5539,8 @@ type ServiceMeshCondition struct { // Possible values: // "CODE_UNSPECIFIED" - Default Unspecified code // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code + // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code + // for cross-project // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload diff --git a/go.work.sum b/go.work.sum index 1d126f1e435..38e5a00aacc 100644 --- a/go.work.sum +++ b/go.work.sum @@ -348,6 +348,7 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 20609daf9c0..f3b5c2562a3 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2317,7 +2317,7 @@ } } }, - "revision": "20240721", + "revision": "20240818", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2772,6 +2772,18 @@ }, "type": "array" }, + "routingMode": { + "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", + "enum": [ + "EXPLICIT_ROUTING_MODE", + "NEXT_HOP_ROUTING_MODE" + ], + "enumDescriptions": [ + "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", + "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." + ], + "type": "string" + }, "scope": { "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", "type": "string" @@ -3007,7 +3019,7 @@ "type": "object" }, "GrpcRouteRetryPolicy": { - "description": "The specifications for retries.", + "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", "id": "GrpcRouteRetryPolicy", "properties": { "numRetries": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index f5c2b1fba7d..d7cbe33fe10 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -967,6 +967,19 @@ type Gateway struct { // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple // ports. Ports []int64 `json:"ports,omitempty"` + // RoutingMode: Optional. The routing mode of the Gateway. This field is + // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is + // required for gateways of type SECURE_WEB_GATEWAY. + // + // Possible values: + // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are + // configured to send traffic through the gateway. This is the default routing + // mode. + // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are + // unaware of the gateway, and a route (advanced route or other route type) can + // be configured to direct traffic from client to gateway. The gateway then + // acts as a next-hop to the destination. + RoutingMode string `json:"routingMode,omitempty"` // Scope: Optional. Scope determines how configuration across multiple Gateway // instances are merged. The configuration for multiple Gateway instances with // the same scope will be merged as presented as a single coniguration to the @@ -1278,7 +1291,8 @@ func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GrpcRouteRetryPolicy: The specifications for retries. +// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more +// conditions for which this retry rule applies. Valid values are: type GrpcRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must be > // 0. If not specified, default to 1. diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 67483f7a1ca..c4e4331a98d 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1526,7 +1526,7 @@ } } }, - "revision": "20240809", + "revision": "20240816", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -3367,6 +3367,14 @@ "description": "Output only. The main URI in which this Service is serving traffic.", "readOnly": true, "type": "string" + }, + "urls": { + "description": "Output only. All URLs serving traffic for this Service.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" } }, "type": "object" diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 2e2d48c1ec1..3713d208445 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -2337,6 +2337,8 @@ type GoogleCloudRunV2Service struct { UpdateTime string `json:"updateTime,omitempty"` // Uri: Output only. The main URI in which this Service is serving traffic. Uri string `json:"uri,omitempty"` + // Urls: Output only. All URLs serving traffic for this Service. + Urls []string `json:"urls,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index 6d8b356dc24..ff84ab86a41 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1396,7 +1396,7 @@ ], "parameters": { "name": { - "description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", + "description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$", "required": true, @@ -1707,7 +1707,7 @@ } } }, - "revision": "20240718", + "revision": "20240821", "rootUrl": "https://translation.googleapis.com/", "schemas": { "AdaptiveMtDataset": { @@ -1829,7 +1829,7 @@ "type": "string" }, "glossaryConfig": { - "$ref": "TranslateTextGlossaryConfig", + "$ref": "GlossaryConfig", "description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." }, "referenceSentenceConfig": { @@ -2227,7 +2227,7 @@ "id": "Example", "properties": { "name": { - "description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'", + "description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}`", "readOnly": true, "type": "string" }, @@ -2367,6 +2367,21 @@ }, "type": "object" }, + "GlossaryConfig": { + "description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.", + "id": "GlossaryConfig", + "properties": { + "glossary": { + "description": "Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`", + "type": "string" + }, + "ignoreCase": { + "description": "Optional. Indicates match is case insensitive. The default value is `false` if missing.", + "type": "boolean" + } + }, + "type": "object" + }, "GlossaryEntry": { "description": "Represents a single entry in a glossary.", "id": "GlossaryEntry", @@ -2376,7 +2391,7 @@ "type": "string" }, "name": { - "description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", + "description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`", "type": "string" }, "termsPair": { diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index c9ffa140a8b..304e754888e 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -425,7 +425,7 @@ type AdaptiveMtTranslateRequest struct { // GlossaryConfig: Optional. Glossary to be applied. The glossary must be // within the same region (have the same location-id) as the model, otherwise // an INVALID_ARGUMENT (400) error is returned. - GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"` + GlossaryConfig *GlossaryConfig `json:"glossaryConfig,omitempty"` // ReferenceSentenceConfig: Configuration for caller provided reference // sentences. ReferenceSentenceConfig *ReferenceSentenceConfig `json:"referenceSentenceConfig,omitempty"` @@ -1052,7 +1052,7 @@ type Empty struct { type Example struct { // Name: Output only. The resource name of the example, in form of // `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id - // }/examples/{example_id}' + // }/examples/{example_id}` Name string `json:"name,omitempty"` // SourceText: Sentence in source language. SourceText string `json:"sourceText,omitempty"` @@ -1267,12 +1267,41 @@ func (s Glossary) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GlossaryConfig: Configures which glossary is used for a specific target +// language and defines options for applying that glossary. +type GlossaryConfig struct { + // Glossary: Required. The `glossary` to be applied for this translation. The + // format depends on the glossary: - User-provided custom glossary: + // `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary + // -id}` + Glossary string `json:"glossary,omitempty"` + // IgnoreCase: Optional. Indicates match is case insensitive. The default value + // is `false` if missing. + IgnoreCase bool `json:"ignoreCase,omitempty"` + // ForceSendFields is a list of field names (e.g. "Glossary") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Glossary") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GlossaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GlossaryConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GlossaryEntry: Represents a single entry in a glossary. type GlossaryEntry struct { // Description: Describes the glossary entry. Description string `json:"description,omitempty"` // Name: Identifier. The resource name of the entry. Format: - // "projects/*/locations/*/glossaries/*/glossaryEntries/*" + // `projects/*/locations/*/glossaries/*/glossaryEntries/*` Name string `json:"name,omitempty"` // TermsPair: Used for an unidirectional glossary. TermsPair *GlossaryTermsPair `json:"termsPair,omitempty"` @@ -7349,7 +7378,7 @@ type ProjectsLocationsGlossariesGlossaryEntriesPatchCall struct { // Patch: Updates a glossary entry. // // - name: Identifier. The resource name of the entry. Format: -// "projects/*/locations/*/glossaries/*/glossaryEntries/*". +// `projects/*/locations/*/glossaries/*/glossaryEntries/*`. func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Patch(name string, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall { c := &ProjectsLocationsGlossariesGlossaryEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name From 5b1ebe2dd1516dfe42e73205992f741a885658da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 24 Aug 2024 00:24:25 -0700 Subject: [PATCH 2/8] feat(all): auto-regenerate discovery clients (#2752) --- .../v1alpha/analyticsadmin-api.json | 4 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 8 +- batch/v1/batch-api.json | 6 +- batch/v1/batch-gen.go | 20 +- bigquery/v2/bigquery-api.json | 18 +- bigquery/v2/bigquery-gen.go | 38 +- container/v1/container-api.json | 27 +- container/v1/container-gen.go | 39 +- container/v1beta1/container-api.json | 27 +- container/v1beta1/container-gen.go | 39 +- .../v1/containeranalysis-api.json | 350 ++++++++- containeranalysis/v1/containeranalysis-gen.go | 708 +++++++++++++++++- customsearch/v1/customsearch-api.json | 12 +- customsearch/v1/customsearch-gen.go | 16 + dfareporting/v3.5/dfareporting-api.json | 156 +--- dfareporting/v3.5/dfareporting-gen.go | 173 +---- dfareporting/v4/dfareporting-api.json | 78 +- dfareporting/v4/dfareporting-gen.go | 129 +++- dialogflow/v3/dialogflow-api.json | 25 +- dialogflow/v3/dialogflow-gen.go | 36 + dialogflow/v3beta1/dialogflow-api.json | 25 +- dialogflow/v3beta1/dialogflow-gen.go | 36 + firebaseml/v2beta/firebaseml-api.json | 4 +- firebaseml/v2beta/firebaseml-gen.go | 4 +- gkehub/v1/gkehub-api.json | 28 +- gkehub/v1/gkehub-gen.go | 32 +- gkeonprem/v1/gkeonprem-api.json | 107 ++- gkeonprem/v1/gkeonprem-gen.go | 152 +++- looker/v1/looker-api.json | 72 +- looker/v1/looker-gen.go | 77 ++ .../accounts_v1beta/merchantapi-api.json | 6 +- .../accounts_v1beta/merchantapi-gen.go | 4 + .../v1beta1/networkmanagement-api.json | 14 +- .../v1beta1/networkmanagement-gen.go | 25 +- networkservices/v1/networkservices-api.json | 16 +- networkservices/v1/networkservices-gen.go | 16 +- searchads360/v0/searchads360-api.json | 57 +- searchads360/v0/searchads360-gen.go | 25 + secretmanager/v1/secretmanager-api.json | 4 +- secretmanager/v1/secretmanager-gen.go | 2 +- spanner/v1/spanner-api.json | 4 +- spanner/v1/spanner-gen.go | 16 +- sqladmin/v1/sqladmin-api.json | 21 +- sqladmin/v1/sqladmin-gen.go | 19 +- sqladmin/v1beta4/sqladmin-api.json | 21 +- sqladmin/v1beta4/sqladmin-gen.go | 19 +- .../v1/workflowexecutions-api.json | 97 ++- .../v1/workflowexecutions-gen.go | 180 ++++- 48 files changed, 2462 insertions(+), 530 deletions(-) diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 50bb4e031d3..4c9b2d2a641 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -4886,7 +4886,7 @@ } } }, - "revision": "20240731", + "revision": "20240821", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -6037,7 +6037,7 @@ "type": "string" }, "project": { - "description": "Immutable. The linked Google Cloud project. When creating a BigQueryLink, you may provide this resource name using either a project number or project ID. Once this resource has been created, the returned project will always have a project that contains a project number. Format: 'projects/{project number}' Example: 'projects/1234'", + "description": "Immutable. The linked Google Cloud project resource name. Currently, this API always uses a project number, but may use project IDs in the future. Format: 'projects/{project number}' Example: 'projects/1234'", "type": "string" }, "streamingExportEnabled": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index bd79cbb1d8e..848745f6173 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -2113,11 +2113,9 @@ type GoogleAnalyticsAdminV1alphaBigQueryLink struct { // 'properties/{property_id}/bigQueryLinks/{bigquery_link_id}' Format: // 'properties/1234/bigQueryLinks/abc567' Name string `json:"name,omitempty"` - // Project: Immutable. The linked Google Cloud project. When creating a - // BigQueryLink, you may provide this resource name using either a project - // number or project ID. Once this resource has been created, the returned - // project will always have a project that contains a project number. Format: - // 'projects/{project number}' Example: 'projects/1234' + // Project: Immutable. The linked Google Cloud project resource name. + // Currently, this API always uses a project number, but may use project IDs in + // the future. Format: 'projects/{project number}' Example: 'projects/1234' Project string `json:"project,omitempty"` // StreamingExportEnabled: If set true, enables streaming export to the linked // Google Cloud project. diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 2bd285e205a..0b14bd153b1 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240801", + "revision": "20240813", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1256,6 +1256,10 @@ "description": "InstancePolicyOrTemplate lets you define the type of resources to use for this job either with an InstancePolicy or an instance template. If undefined, Batch picks the type of VM to use and doesn't include optional VM resources such as GPUs and extra disks.", "id": "InstancePolicyOrTemplate", "properties": { + "blockProjectSshKeys": { + "description": "Optional. Set this field to `true` if you want Batch to block project-level SSH keys from accessing this job's VMs. Alternatively, you can configure the job to specify a VM instance template that blocks project-level SSH keys. In either case, Batch blocks project-level SSH keys while creating the VMs for this job. Batch allows project-level SSH keys for a job's VMs only if all the following are true: + This field is undefined or set to `false`. + The job's VM instance template (if any) doesn't block project-level SSH keys. Notably, you can override this behavior by manually updating a VM to block or allow project-level SSH keys. For more information about blocking project-level SSH keys, see the Compute Engine documentation: https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys", + "type": "boolean" + }, "installGpuDrivers": { "description": "Set this field true if you want Batch to help fetch drivers from a third party location and install them for GPUs specified in `policy.accelerators` or `instance_template` on your behalf. Default is false. For Container-Optimized Image cases, Batch will install the accelerator driver following milestones of https://cloud.google.com/container-optimized-os/docs/release-notes. For non Container-Optimized Image cases, following https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.", "type": "boolean" diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 8f5b2e914ba..73599cd7c0d 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1182,6 +1182,18 @@ func (s InstancePolicy) MarshalJSON() ([]byte, error) { // instance template. If undefined, Batch picks the type of VM to use and // doesn't include optional VM resources such as GPUs and extra disks. type InstancePolicyOrTemplate struct { + // BlockProjectSshKeys: Optional. Set this field to `true` if you want Batch to + // block project-level SSH keys from accessing this job's VMs. Alternatively, + // you can configure the job to specify a VM instance template that blocks + // project-level SSH keys. In either case, Batch blocks project-level SSH keys + // while creating the VMs for this job. Batch allows project-level SSH keys for + // a job's VMs only if all the following are true: + This field is undefined or + // set to `false`. + The job's VM instance template (if any) doesn't block + // project-level SSH keys. Notably, you can override this behavior by manually + // updating a VM to block or allow project-level SSH keys. For more information + // about blocking project-level SSH keys, see the Compute Engine documentation: + // https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + BlockProjectSshKeys bool `json:"blockProjectSshKeys,omitempty"` // InstallGpuDrivers: Set this field true if you want Batch to help fetch // drivers from a third party location and install them for GPUs specified in // `policy.accelerators` or `instance_template` on your behalf. Default is @@ -1200,15 +1212,15 @@ type InstancePolicyOrTemplate struct { InstanceTemplate string `json:"instanceTemplate,omitempty"` // Policy: InstancePolicy. Policy *InstancePolicy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstallGpuDrivers") to + // ForceSendFields is a list of field names (e.g. "BlockProjectSshKeys") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstallGpuDrivers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "BlockProjectSshKeys") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index e605d36ea5c..e9e70c49ec6 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1935,7 +1935,7 @@ } } }, - "revision": "20240803", + "revision": "20240815", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -4810,7 +4810,7 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Output only. If set, it provides the reason why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created.", + "description": "Output only. The reason why a Job was created. [Preview](/products/#product-launch-stages)", "readOnly": true }, "jobReference": { @@ -5370,7 +5370,7 @@ "type": "object" }, "JobCreationReason": { - "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. This feature is not yet available. Jobs will always be created.", + "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. [Preview](/products/#product-launch-stages)", "id": "JobCreationReason", "properties": { "code": { @@ -7109,7 +7109,7 @@ "description": "Optional. Output format adjustments." }, "jobCreationMode": { - "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. This feature is not yet available. Jobs will always be created.", + "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. [Preview](/products/#product-launch-stages)", "enum": [ "JOB_CREATION_MODE_UNSPECIFIED", "JOB_CREATION_REQUIRED", @@ -7216,11 +7216,11 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Optional. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. When job_reference is present, this field should be interpreted as follows: If set, it will provide the reason of why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created." + "description": "Optional. The reason why a Job was created. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. [Preview](/products/#product-launch-stages)" }, "jobReference": { "$ref": "JobReference", - "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults)." + "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). If job_creation_mode was set to `JOB_CREATION_OPTIONAL` and the query completes without creating a job, this field will be empty." }, "kind": { "default": "bigquery#queryResponse", @@ -7238,7 +7238,7 @@ "type": "string" }, "queryId": { - "description": "Query ID for the completed query. This ID will be auto-generated. This field is not yet available and it is currently not guaranteed to be populated.", + "description": "Auto-generated ID for the query. [Preview](/products/#product-launch-stages)", "type": "string" }, "rows": { @@ -8152,7 +8152,7 @@ "type": "object" }, "StandardSqlDataType": { - "description": "The data type of a variable such as a function argument. Examples include: * INT64: `{\"typeKind\": \"INT64\"}` * ARRAY: { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"STRING\"} } * STRUCT\u003e: { \"typeKind\": \"STRUCT\", \"structType\": { \"fields\": [ { \"name\": \"x\", \"type\": {\"typeKind\": \"STRING\"} }, { \"name\": \"y\", \"type\": { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"DATE\"} } } ] } }", + "description": "The data type of a variable such as a function argument. Examples include: * INT64: `{\"typeKind\": \"INT64\"}` * ARRAY: { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"STRING\"} } * STRUCT\u003e: { \"typeKind\": \"STRUCT\", \"structType\": { \"fields\": [ { \"name\": \"x\", \"type\": {\"typeKind\": \"STRING\"} }, { \"name\": \"y\", \"type\": { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"DATE\"} } } ] } } * RANGE: { \"typeKind\": \"RANGE\", \"rangeElementType\": {\"typeKind\": \"DATE\"} }", "id": "StandardSqlDataType", "properties": { "arrayElementType": { @@ -8908,7 +8908,7 @@ "type": "string" }, "type": { - "description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE ([Preview](/products/#product-launch-stages)) Use of RECORD/STRUCT indicates that the field contains a nested schema.", + "description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema.", "type": "string" } }, diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index d536d84b4a7..82d41a7a90f 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -4189,9 +4189,8 @@ type Job struct { Etag string `json:"etag,omitempty"` // Id: Output only. Opaque ID field of the job. Id string `json:"id,omitempty"` - // JobCreationReason: Output only. If set, it provides the reason why a Job was - // created. If not set, it should be treated as the default: REQUESTED. This - // feature is not yet available. Jobs will always be created. + // JobCreationReason: Output only. The reason why a Job was created. Preview + // (/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Optional. Reference describing the unique-per-user name of the // job. @@ -4894,8 +4893,8 @@ func (s JobConfigurationTableCopy) MarshalJSON() ([]byte, error) { // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method // when used with `JOB_CREATION_OPTIONAL` Job creation mode. For `jobs.insert` // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) -// method calls it will always be `REQUESTED`. This feature is not yet -// available. Jobs will always be created. +// method calls it will always be `REQUESTED`. Preview +// (/products/#product-launch-stages) type JobCreationReason struct { // Code: Output only. Specifies the high level reason why a Job was created. // @@ -6900,8 +6899,8 @@ type QueryRequest struct { // FormatOptions: Optional. Output format adjustments. FormatOptions *DataFormatOptions `json:"formatOptions,omitempty"` // JobCreationMode: Optional. If not set, jobs are always required. If set, the - // query request will follow the behavior described JobCreationMode. This - // feature is not yet available. Jobs will always be created. + // query request will follow the behavior described JobCreationMode. Preview + // (/products/#product-launch-stages) // // Possible values: // "JOB_CREATION_MODE_UNSPECIFIED" - If unspecified JOB_CREATION_REQUIRED is @@ -7028,18 +7027,17 @@ type QueryResponse struct { // are present, this will always be true. If this is false, totalRows will not // be available. JobComplete bool `json:"jobComplete,omitempty"` - // JobCreationReason: Optional. Only relevant when a job_reference is present - // in the response. If job_reference is not present it will always be unset. - // When job_reference is present, this field should be interpreted as follows: - // If set, it will provide the reason of why a Job was created. If not set, it - // should be treated as the default: REQUESTED. This feature is not yet - // available. Jobs will always be created. + // JobCreationReason: Optional. The reason why a Job was created. Only relevant + // when a job_reference is present in the response. If job_reference is not + // present it will always be unset. Preview (/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Reference to the Job that was created to run the query. This // field will be present even if the original request timed out, in which case // GetQueryResults can be used to read the results once the query has // completed. Since this API only returns the first page of results, subsequent - // pages can be fetched via the same mechanism (GetQueryResults). + // pages can be fetched via the same mechanism (GetQueryResults). If + // job_creation_mode was set to `JOB_CREATION_OPTIONAL` and the query completes + // without creating a job, this field will be empty. JobReference *JobReference `json:"jobReference,omitempty"` // Kind: The resource type. Kind string `json:"kind,omitempty"` @@ -7053,9 +7051,8 @@ type QueryResponse struct { // method. For more information, see Paging through table data // (https://cloud.google.com/bigquery/docs/paging-results). PageToken string `json:"pageToken,omitempty"` - // QueryId: Query ID for the completed query. This ID will be auto-generated. - // This field is not yet available and it is currently not guaranteed to be - // populated. + // QueryId: Auto-generated ID for the query. Preview + // (/products/#product-launch-stages) QueryId string `json:"queryId,omitempty"` // Rows: An object with as many results as can be contained within the maximum // permitted reply size. To get any additional rows, you can call @@ -8216,7 +8213,8 @@ func (s StagePerformanceStandaloneInsight) MarshalJSON() ([]byte, error) { // "typeKind": "ARRAY", "arrayElementType": {"typeKind": "STRING"} } * STRUCT>: // { "typeKind": "STRUCT", "structType": { "fields": [ { "name": "x", "type": // {"typeKind": "STRING"} }, { "name": "y", "type": { "typeKind": "ARRAY", -// "arrayElementType": {"typeKind": "DATE"} } } ] } } +// "arrayElementType": {"typeKind": "DATE"} } } ] } } * RANGE: { "typeKind": +// "RANGE", "rangeElementType": {"typeKind": "DATE"} } type StandardSqlDataType struct { // ArrayElementType: The type of the array's elements, if type_kind = "ARRAY". ArrayElementType *StandardSqlDataType `json:"arrayElementType,omitempty"` @@ -9053,8 +9051,8 @@ type TableFieldSchema struct { // Type: Required. The field data type. Possible values include: * STRING * // BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * // TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON - // * RECORD (or STRUCT) * RANGE (Preview (/products/#product-launch-stages)) - // Use of RECORD/STRUCT indicates that the field contains a nested schema. + // * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field + // contains a nested schema. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with empty or diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 664b137d1f6..13d79a4304e 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240730", + "revision": "20240806", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3369,6 +3369,10 @@ "$ref": "PrivateClusterConfig", "description": "Configuration for private cluster." }, + "rbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "releaseChannel": { "$ref": "ReleaseChannel", "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." @@ -3756,6 +3760,10 @@ ], "type": "string" }, + "desiredRbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "desiredReleaseChannel": { "$ref": "ReleaseChannel", "description": "The desired release channel configuration." @@ -4960,7 +4968,7 @@ "id": "MasterAuth", "properties": { "clientCertificate": { - "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. Issued only if client_certificate_config is set.", "readOnly": true, "type": "string" }, @@ -6316,6 +6324,21 @@ }, "type": "object" }, + "RBACBindingConfig": { + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.", + "id": "RBACBindingConfig", + "properties": { + "enableInsecureBindingSystemAuthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:authenticated.", + "type": "boolean" + }, + "enableInsecureBindingSystemUnauthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjets system:anonymous or system:unauthenticated.", + "type": "boolean" + } + }, + "type": "object" + }, "RangeInfo": { "description": "RangeInfo contains the range name and the range utilization by this cluster.", "id": "RangeInfo", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 3a801992b96..34e54bc4346 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1260,6 +1260,9 @@ type Cluster struct { ParentProductConfig *ParentProductConfig `json:"parentProductConfig,omitempty"` // PrivateClusterConfig: Configuration for private cluster. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` + // RbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + RbacBindingConfig *RBACBindingConfig `json:"rbacBindingConfig,omitempty"` // ReleaseChannel: Release channel configuration. If left unspecified on // cluster creation and a version is specified, the cluster is enrolled in the // most mature release channel where the version is available (first checking @@ -1608,6 +1611,9 @@ type ClusterUpdate struct { // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access // to and from Google Services DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` + // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` // DesiredReleaseChannel: The desired release channel configuration. DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` // DesiredResourceUsageExportConfig: The desired configuration for exporting @@ -3358,7 +3364,8 @@ func (s ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { // certificates. type MasterAuth struct { // ClientCertificate: Output only. Base64-encoded public certificate used by - // clients to authenticate to the cluster endpoint. + // clients to authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, @@ -5010,6 +5017,36 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RBACBindingConfig: RBACBindingConfig allows user to restrict +// ClusterRoleBindings an RoleBindings that can be created. +type RBACBindingConfig struct { + // EnableInsecureBindingSystemAuthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjects system:authenticated. + EnableInsecureBindingSystemAuthenticated bool `json:"enableInsecureBindingSystemAuthenticated,omitempty"` + // EnableInsecureBindingSystemUnauthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjets system:anonymous or + // system:unauthenticated. + EnableInsecureBindingSystemUnauthenticated bool `json:"enableInsecureBindingSystemUnauthenticated,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") to unconditionally include in + // API requests. By default, fields with empty or default values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted from + // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields + // for more details. + NullFields []string `json:"-"` +} + +func (s RBACBindingConfig) MarshalJSON() ([]byte, error) { + type NoMethod RBACBindingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index d3387a22555..81fe160d960 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240730", + "revision": "20240806", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3505,6 +3505,10 @@ "deprecated": true, "description": "Deprecated: Use SecurityPostureConfig instead. Enable/Disable Protect API features for the cluster." }, + "rbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "releaseChannel": { "$ref": "ReleaseChannel", "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." @@ -3948,6 +3952,10 @@ "deprecated": true, "description": "Deprecated: Use DesiredSecurityPostureConfig instead. Enable/Disable Protect API features for the cluster." }, + "desiredRbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "desiredReleaseChannel": { "$ref": "ReleaseChannel", "description": "The desired release channel configuration." @@ -5361,7 +5369,7 @@ "id": "MasterAuth", "properties": { "clientCertificate": { - "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. Issued only if client_certificate_config is set.", "readOnly": true, "type": "string" }, @@ -6829,6 +6837,21 @@ }, "type": "object" }, + "RBACBindingConfig": { + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.", + "id": "RBACBindingConfig", + "properties": { + "enableInsecureBindingSystemAuthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:authenticated.", + "type": "boolean" + }, + "enableInsecureBindingSystemUnauthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjets system:anonymous or system:unauthenticated.", + "type": "boolean" + } + }, + "type": "object" + }, "RangeInfo": { "description": "RangeInfo contains the range name and the range utilization by this cluster.", "id": "RangeInfo", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 1c1781b6481..31ccc5355f0 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1376,6 +1376,9 @@ type Cluster struct { // ProtectConfig: Deprecated: Use SecurityPostureConfig instead. Enable/Disable // Protect API features for the cluster. ProtectConfig *ProtectConfig `json:"protectConfig,omitempty"` + // RbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + RbacBindingConfig *RBACBindingConfig `json:"rbacBindingConfig,omitempty"` // ReleaseChannel: Release channel configuration. If left unspecified on // cluster creation and a version is specified, the cluster is enrolled in the // most mature release channel where the version is available (first checking @@ -1775,6 +1778,9 @@ type ClusterUpdate struct { // DesiredProtectConfig: Deprecated: Use DesiredSecurityPostureConfig instead. // Enable/Disable Protect API features for the cluster. DesiredProtectConfig *ProtectConfig `json:"desiredProtectConfig,omitempty"` + // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` // DesiredReleaseChannel: The desired release channel configuration. DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` // DesiredResourceUsageExportConfig: The desired configuration for exporting @@ -3832,7 +3838,8 @@ type Master struct { // certificates. type MasterAuth struct { // ClientCertificate: Output only. Base64-encoded public certificate used by - // clients to authenticate to the cluster endpoint. + // clients to authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, @@ -5611,6 +5618,36 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RBACBindingConfig: RBACBindingConfig allows user to restrict +// ClusterRoleBindings an RoleBindings that can be created. +type RBACBindingConfig struct { + // EnableInsecureBindingSystemAuthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjects system:authenticated. + EnableInsecureBindingSystemAuthenticated bool `json:"enableInsecureBindingSystemAuthenticated,omitempty"` + // EnableInsecureBindingSystemUnauthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjets system:anonymous or + // system:unauthenticated. + EnableInsecureBindingSystemUnauthenticated bool `json:"enableInsecureBindingSystemUnauthenticated,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") to unconditionally include in + // API requests. By default, fields with empty or default values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted from + // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields + // for more details. + NullFields []string `json:"-"` +} + +func (s RBACBindingConfig) MarshalJSON() ([]byte, error) { + type NoMethod RBACBindingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index 51dcb8cb5c0..cbdf115e2c1 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -16,10 +16,190 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://containeranalysis.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west4.rep.googleapis.com/", + "location": "us-west4" } ], "fullyEncodeReservedExpansion": true, @@ -229,6 +409,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:getIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists notes for the specified project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes", @@ -303,6 +511,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:setIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:testIamPermissions", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -461,6 +725,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:getIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getNotes": { "description": "Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}/notes", @@ -590,6 +882,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:setIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:testIamPermissions", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1307,7 +1655,7 @@ } } }, - "revision": "20240726", + "revision": "20240816", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index 5c33c598bc4..842bd4cbffc 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -6745,6 +6745,114 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, return ret, nil } +type ProjectsLocationsNotesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a note or an occurrence +// resource. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsNotesGetIamPolicyCall { + c := &ProjectsLocationsNotesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsNotesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesGetIamPolicyCall) 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.getiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsNotesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 ProjectsLocationsNotesListCall struct { s *Service parent string @@ -7004,6 +7112,223 @@ func (c *ProjectsLocationsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Not return ret, nil } +type ProjectsLocationsNotesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified note or +// occurrence. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or an occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsNotesSetIamPolicyCall { + c := &ProjectsLocationsNotesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsNotesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesSetIamPolicyCall) 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.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsNotesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 ProjectsLocationsNotesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has on the +// specified note or occurrence. Requires list permission on the project (for +// example, `containeranalysis.notes.list`). The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsNotesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsNotesTestIamPermissionsCall { + c := &ProjectsLocationsNotesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsNotesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesTestIamPermissionsCall) 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNotesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + 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 ProjectsLocationsNotesOccurrencesListCall struct { s *Service name string @@ -7468,74 +7793,182 @@ type ProjectsLocationsOccurrencesGetCall struct { header_ http.Header } -// Get: Gets the specified occurrence. +// Get: Gets the specified occurrence. +// +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Get(name string) *ProjectsLocationsOccurrencesGetCall { + c := &ProjectsLocationsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetCall { + 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 *ProjectsLocationsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesGetCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOccurrencesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Occurrence.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, 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 := &Occurrence{ + 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 ProjectsLocationsOccurrencesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a note or an occurrence +// resource. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. // -// - name: The name of the occurrence in the form of -// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. -func (r *ProjectsLocationsOccurrencesService) Get(name string) *ProjectsLocationsOccurrencesGetCall { - c := &ProjectsLocationsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsOccurrencesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsOccurrencesGetIamPolicyCall { + c := &ProjectsLocationsOccurrencesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetCall { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetIamPolicyCall { 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 *ProjectsLocationsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOccurrencesGetCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetCall { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOccurrencesGetCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) 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.getiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.occurrences.get" call. +// Do executes the "containeranalysis.projects.locations.occurrences.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Occurrence.ServerResponse.Header or (if a response was returned at all) in +// *Policy.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7554,7 +7987,7 @@ func (c *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Occurrence{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8052,6 +8485,223 @@ func (c *ProjectsLocationsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsOccurrencesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified note or +// occurrence. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or an occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsOccurrencesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsOccurrencesSetIamPolicyCall { + c := &ProjectsLocationsOccurrencesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) 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.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 ProjectsLocationsOccurrencesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has on the +// specified note or occurrence. Requires list permission on the project (for +// example, `containeranalysis.notes.list`). The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsOccurrencesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + c := &ProjectsLocationsOccurrencesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + 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 ProjectsLocationsResourcesExportSBOMCall struct { s *Service name string diff --git a/customsearch/v1/customsearch-api.json b/customsearch/v1/customsearch-api.json index 84291cf3bc3..9b212f8be43 100644 --- a/customsearch/v1/customsearch-api.json +++ b/customsearch/v1/customsearch-api.json @@ -124,6 +124,11 @@ "location": "query", "type": "string" }, + "enableAlternateSearchHandler": { + "description": "Optional. Enables routing of Programmable Search Engine requests to an alternate search handler.", + "location": "query", + "type": "boolean" + }, "exactTerms": { "description": "Identifies a phrase that all documents in the search results must contain.", "location": "query", @@ -426,6 +431,11 @@ "location": "query", "type": "string" }, + "enableAlternateSearchHandler": { + "description": "Optional. Enables routing of Programmable Search Engine requests to an alternate search handler.", + "location": "query", + "type": "boolean" + }, "exactTerms": { "description": "Identifies a phrase that all documents in the search results must contain.", "location": "query", @@ -702,7 +712,7 @@ } } }, - "revision": "20240417", + "revision": "20240821", "rootUrl": "https://customsearch.googleapis.com/", "schemas": { "Promotion": { diff --git a/customsearch/v1/customsearch-gen.go b/customsearch/v1/customsearch-gen.go index eecdd11797d..ab1c23ce769 100644 --- a/customsearch/v1/customsearch-gen.go +++ b/customsearch/v1/customsearch-gen.go @@ -1118,6 +1118,14 @@ func (c *CseListCall) DateRestrict(dateRestrict string) *CseListCall { return c } +// EnableAlternateSearchHandler sets the optional parameter +// "enableAlternateSearchHandler": Enables routing of Programmable Search +// Engine requests to an alternate search handler. +func (c *CseListCall) EnableAlternateSearchHandler(enableAlternateSearchHandler bool) *CseListCall { + c.urlParams_.Set("enableAlternateSearchHandler", fmt.Sprint(enableAlternateSearchHandler)) + return c +} + // ExactTerms sets the optional parameter "exactTerms": Identifies a phrase // that all documents in the search results must contain. func (c *CseListCall) ExactTerms(exactTerms string) *CseListCall { @@ -1583,6 +1591,14 @@ func (c *CseSiterestrictListCall) DateRestrict(dateRestrict string) *CseSiterest return c } +// EnableAlternateSearchHandler sets the optional parameter +// "enableAlternateSearchHandler": Enables routing of Programmable Search +// Engine requests to an alternate search handler. +func (c *CseSiterestrictListCall) EnableAlternateSearchHandler(enableAlternateSearchHandler bool) *CseSiterestrictListCall { + c.urlParams_.Set("enableAlternateSearchHandler", fmt.Sprint(enableAlternateSearchHandler)) + return c +} + // ExactTerms sets the optional parameter "exactTerms": Identifies a phrase // that all documents in the search results must contain. func (c *CseSiterestrictListCall) ExactTerms(exactTerms string) *CseSiterestrictListCall { diff --git a/dfareporting/v3.5/dfareporting-api.json b/dfareporting/v3.5/dfareporting-api.json index 846c2a97896..c851e089e56 100644 --- a/dfareporting/v3.5/dfareporting-api.json +++ b/dfareporting/v3.5/dfareporting-api.json @@ -161,7 +161,7 @@ } } }, - "revision": "20240613", + "revision": "20240821", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "ClickTag": { @@ -399,12 +399,6 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#creativeAssetMetadata\".", "type": "string" }, - "mediaRequestInfo": { - "$ref": "MediaRequestInfo" - }, - "mediaResponseInfo": { - "$ref": "MediaResponseInfo" - }, "richMedia": { "description": "True if the uploaded asset is a rich media asset. This is a read-only, auto-generated field.", "type": "boolean" @@ -630,154 +624,6 @@ }, "type": "object" }, - "MediaRequestInfo": { - "description": "Extra information added to operations that support Scotty media requests.", - "id": "MediaRequestInfo", - "properties": { - "currentBytes": { - "description": "The number of current bytes uploaded or downloaded.", - "format": "int64", - "type": "string" - }, - "customData": { - "description": "Data to be copied to backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.", - "type": "string" - }, - "diffObjectVersion": { - "description": "Set if the http request info is diff encoded. The value of this field is the version number of the base revision. This is corresponding to Apiary's mediaDiffObjectVersion (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionVariable.java). See go/esf-scotty-diff-upload for more information.", - "type": "string" - }, - "finalStatus": { - "description": "The existence of the final_status field indicates that this is the last call to the agent for this request_id. http://google3/uploader/agent/scotty_agent.proto?l=737\u0026rcl=347601929", - "format": "int32", - "type": "integer" - }, - "notificationType": { - "description": "The type of notification received from Scotty.", - "enum": [ - "START", - "PROGRESS", - "END", - "RESPONSE_SENT", - "ERROR" - ], - "enumDescriptions": [ - "Such requests signals the start of a request containing media upload. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", - "Such requests signals that the upload has progressed and that the backend might want to access the media file specified in relevant fields in the resource. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", - "Such requests signals the end of a request containing media upload. END should be handled just like normal Insert/Upload requests, that is, they should process the request and return a complete resource in the response. Pointers to media data (a GFS path usually) appear in the relevant fields in the inserted/updated resource. See gdata.Media in data.proto.", - "Such requests occur after an END and signal that the response has been sent back to the client. RESPONSE_SENT is only sent to the backend if it is configured to receive them. The response does not need to contain anything.", - "Such requests indicate that an error occurred while processing the request. ERROR is only sent to the backend if it is configured to receive them. It is not guaranteed that all errors will result in this notification to the backend, even if the backend requests them. Since these requests are just for informational purposes, the response does not need to contain anything." - ], - "type": "string" - }, - "requestId": { - "description": "The Scotty request ID.", - "type": "string" - }, - "requestReceivedParamsServingInfo": { - "description": "The partition of the Scotty server handling this request. type is uploader_service.RequestReceivedParamsServingInfo LINT.IfChange(request_received_params_serving_info_annotations) LINT.ThenChange()", - "format": "byte", - "type": "string" - }, - "totalBytes": { - "description": "The total size of the file.", - "format": "int64", - "type": "string" - }, - "totalBytesIsEstimated": { - "description": "Whether the total bytes field contains an estimated data.", - "type": "boolean" - } - }, - "type": "object" - }, - "MediaResponseInfo": { - "description": "This message is for backends to pass their scotty media specific fields to ESF. Backend will include this in their response message to ESF. Example: ExportFile is an rpc defined for upload using scotty from ESF. rpc ExportFile(ExportFileRequest) returns (ExportFileResponse) Message ExportFileResponse will include apiserving.MediaResponseInfo to tell ESF about data like dynamic_dropzone it needs to pass to Scotty. message ExportFileResponse { optional gdata.Media blob = 1; optional apiserving.MediaResponseInfo media_response_info = 2 }", - "id": "MediaResponseInfo", - "properties": { - "customData": { - "description": "Data to copy from backend response to the next backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.", - "type": "string" - }, - "dataStorageTransform": { - "description": "Specifies any transformation to be applied to data before persisting it or retrieving from storage. E.g., encryption options for blobstore2. This should be of the form uploader_service.DataStorageTransform.", - "format": "byte", - "type": "string" - }, - "dynamicDropTarget": { - "description": "Specifies the Scotty Drop Target to use for uploads. If present in a media response, Scotty does not upload to a standard drop zone. Instead, Scotty saves the upload directly to the location specified in this drop target. Unlike drop zones, the drop target is the final storage location for an upload. So, the agent does not need to clone the blob at the end of the upload. The agent is responsible for garbage collecting any orphaned blobs that may occur due to aborted uploads. For more information, see the drop target design doc here: http://goto/ScottyDropTarget This field will be preferred to dynamicDropzone. If provided, the identified field in the response must be of the type uploader.agent.DropTarget.", - "format": "byte", - "type": "string" - }, - "dynamicDropzone": { - "description": "Specifies the Scotty dropzone to use for uploads.", - "type": "string" - }, - "requestClass": { - "description": "Request class to use for all Blobstore operations for this request.", - "enum": [ - "UNKNOWN_REQUEST_CLASS", - "LATENCY_SENSITIVE", - "PRODUCTION_BATCH", - "BEST_EFFORT" - ], - "enumDescriptions": [ - "Unpopulated request_class in log files will be taken as 0 in dremel query. GoogleSQL will try to cast it to enum by default. An unused 0 value is added to avoid GoogleSQL casting error. Please refer to b/69677280.", - "A latency-sensitive request.", - "A request generated by a batch process.", - "A best-effort request." - ], - "type": "string" - }, - "scottyAgentUserId": { - "description": "Requester ID passed along to be recorded in the Scotty logs", - "format": "int64", - "type": "string" - }, - "scottyCustomerLog": { - "description": "Customer-specific data to be recorded in the Scotty logs type is logs_proto_scotty.CustomerLog", - "format": "byte", - "type": "string" - }, - "trafficClassField": { - "description": "Specifies the TrafficClass that Scotty should use for any RPCs to fetch the response bytes. Will override the traffic class GTOS of the incoming http request. This is a temporary field to facilitate whitelisting and experimentation by the bigstore agent only. For instance, this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.", - "enum": [ - "BE1", - "AF1", - "AF2", - "AF3", - "AF4", - "NC1", - "NC0", - "BE0", - "LLQ", - "LLQ1", - "LLQ2", - "LLQ3" - ], - "enumDescriptions": [ - "Application-selectable traffic classes Best effort", - "Assured forwarding priority 1", - "Assured forwarding priority 2", - "Assured forwarding priority 3", - "Assured forwarding priority 4", - "Network control", - "Network control", - "Best effort at high packet loss", - "Low-latency queue (LLQ) best effort (go/llq)", - "LLQ assured forwarding priority 1 (go/llq2)", - "LLQ assured forwarding priority 2 (go/llq2)", - "LLQ assured forwarding priority 3 (go/llq3)" - ], - "type": "string" - }, - "verifyHashFromHeader": { - "description": "Tells Scotty to verify hashes on the agent's behalf by parsing out the X-Goog-Hash header.", - "type": "boolean" - } - }, - "type": "object" - }, "OffsetPosition": { "description": "Offset Position.", "id": "OffsetPosition", diff --git a/dfareporting/v3.5/dfareporting-gen.go b/dfareporting/v3.5/dfareporting-gen.go index 99d652b0d6d..224e563ef06 100644 --- a/dfareporting/v3.5/dfareporting-gen.go +++ b/dfareporting/v3.5/dfareporting-gen.go @@ -326,9 +326,7 @@ type CreativeAssetMetadata struct { IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string // "dfareporting#creativeAssetMetadata". - Kind string `json:"kind,omitempty"` - MediaRequestInfo *MediaRequestInfo `json:"mediaRequestInfo,omitempty"` - MediaResponseInfo *MediaResponseInfo `json:"mediaResponseInfo,omitempty"` + Kind string `json:"kind,omitempty"` // RichMedia: True if the uploaded asset is a rich media asset. This is a // read-only, auto-generated field. RichMedia bool `json:"richMedia,omitempty"` @@ -535,175 +533,6 @@ func (s DimensionValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MediaRequestInfo: Extra information added to operations that support Scotty -// media requests. -type MediaRequestInfo struct { - // CurrentBytes: The number of current bytes uploaded or downloaded. - CurrentBytes int64 `json:"currentBytes,omitempty,string"` - // CustomData: Data to be copied to backend requests. Custom data is returned - // to Scotty in the agent_state field, which Scotty will then provide in - // subsequent upload notifications. - CustomData string `json:"customData,omitempty"` - // DiffObjectVersion: Set if the http request info is diff encoded. The value - // of this field is the version number of the base revision. This is - // corresponding to Apiary's mediaDiffObjectVersion - // (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionV - // ariable.java). See go/esf-scotty-diff-upload for more information. - DiffObjectVersion string `json:"diffObjectVersion,omitempty"` - // FinalStatus: The existence of the final_status field indicates that this is - // the last call to the agent for this request_id. - // http://google3/uploader/agent/scotty_agent.proto?l=737&rcl=347601929 - FinalStatus int64 `json:"finalStatus,omitempty"` - // NotificationType: The type of notification received from Scotty. - // - // Possible values: - // "START" - Such requests signals the start of a request containing media - // upload. Only the media field(s) in the inserted/updated resource are set. - // The response should either return an error or succeed. On success, responses - // don't need to contain anything. - // "PROGRESS" - Such requests signals that the upload has progressed and that - // the backend might want to access the media file specified in relevant fields - // in the resource. Only the media field(s) in the inserted/updated resource - // are set. The response should either return an error or succeed. On success, - // responses don't need to contain anything. - // "END" - Such requests signals the end of a request containing media - // upload. END should be handled just like normal Insert/Upload requests, that - // is, they should process the request and return a complete resource in the - // response. Pointers to media data (a GFS path usually) appear in the relevant - // fields in the inserted/updated resource. See gdata.Media in data.proto. - // "RESPONSE_SENT" - Such requests occur after an END and signal that the - // response has been sent back to the client. RESPONSE_SENT is only sent to the - // backend if it is configured to receive them. The response does not need to - // contain anything. - // "ERROR" - Such requests indicate that an error occurred while processing - // the request. ERROR is only sent to the backend if it is configured to - // receive them. It is not guaranteed that all errors will result in this - // notification to the backend, even if the backend requests them. Since these - // requests are just for informational purposes, the response does not need to - // contain anything. - NotificationType string `json:"notificationType,omitempty"` - // RequestId: The Scotty request ID. - RequestId string `json:"requestId,omitempty"` - // RequestReceivedParamsServingInfo: The partition of the Scotty server - // handling this request. type is - // uploader_service.RequestReceivedParamsServingInfo - // LINT.IfChange(request_received_params_serving_info_annotations) - // LINT.ThenChange() - RequestReceivedParamsServingInfo string `json:"requestReceivedParamsServingInfo,omitempty"` - // TotalBytes: The total size of the file. - TotalBytes int64 `json:"totalBytes,omitempty,string"` - // TotalBytesIsEstimated: Whether the total bytes field contains an estimated - // data. - TotalBytesIsEstimated bool `json:"totalBytesIsEstimated,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentBytes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentBytes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MediaRequestInfo) MarshalJSON() ([]byte, error) { - type NoMethod MediaRequestInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MediaResponseInfo: This message is for backends to pass their scotty media -// specific fields to ESF. Backend will include this in their response message -// to ESF. Example: ExportFile is an rpc defined for upload using scotty from -// ESF. rpc ExportFile(ExportFileRequest) returns (ExportFileResponse) Message -// ExportFileResponse will include apiserving.MediaResponseInfo to tell ESF -// about data like dynamic_dropzone it needs to pass to Scotty. message -// ExportFileResponse { optional gdata.Media blob = 1; optional -// apiserving.MediaResponseInfo media_response_info = 2 } -type MediaResponseInfo struct { - // CustomData: Data to copy from backend response to the next backend requests. - // Custom data is returned to Scotty in the agent_state field, which Scotty - // will then provide in subsequent upload notifications. - CustomData string `json:"customData,omitempty"` - // DataStorageTransform: Specifies any transformation to be applied to data - // before persisting it or retrieving from storage. E.g., encryption options - // for blobstore2. This should be of the form - // uploader_service.DataStorageTransform. - DataStorageTransform string `json:"dataStorageTransform,omitempty"` - // DynamicDropTarget: Specifies the Scotty Drop Target to use for uploads. If - // present in a media response, Scotty does not upload to a standard drop zone. - // Instead, Scotty saves the upload directly to the location specified in this - // drop target. Unlike drop zones, the drop target is the final storage - // location for an upload. So, the agent does not need to clone the blob at the - // end of the upload. The agent is responsible for garbage collecting any - // orphaned blobs that may occur due to aborted uploads. For more information, - // see the drop target design doc here: http://goto/ScottyDropTarget This field - // will be preferred to dynamicDropzone. If provided, the identified field in - // the response must be of the type uploader.agent.DropTarget. - DynamicDropTarget string `json:"dynamicDropTarget,omitempty"` - // DynamicDropzone: Specifies the Scotty dropzone to use for uploads. - DynamicDropzone string `json:"dynamicDropzone,omitempty"` - // RequestClass: Request class to use for all Blobstore operations for this - // request. - // - // Possible values: - // "UNKNOWN_REQUEST_CLASS" - Unpopulated request_class in log files will be - // taken as 0 in dremel query. GoogleSQL will try to cast it to enum by - // default. An unused 0 value is added to avoid GoogleSQL casting error. Please - // refer to b/69677280. - // "LATENCY_SENSITIVE" - A latency-sensitive request. - // "PRODUCTION_BATCH" - A request generated by a batch process. - // "BEST_EFFORT" - A best-effort request. - RequestClass string `json:"requestClass,omitempty"` - // ScottyAgentUserId: Requester ID passed along to be recorded in the Scotty - // logs - ScottyAgentUserId int64 `json:"scottyAgentUserId,omitempty,string"` - // ScottyCustomerLog: Customer-specific data to be recorded in the Scotty logs - // type is logs_proto_scotty.CustomerLog - ScottyCustomerLog string `json:"scottyCustomerLog,omitempty"` - // TrafficClassField: Specifies the TrafficClass that Scotty should use for any - // RPCs to fetch the response bytes. Will override the traffic class GTOS of - // the incoming http request. This is a temporary field to facilitate - // whitelisting and experimentation by the bigstore agent only. For instance, - // this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION - // FROM THE SCOTTY TEAM. - // - // Possible values: - // "BE1" - Application-selectable traffic classes Best effort - // "AF1" - Assured forwarding priority 1 - // "AF2" - Assured forwarding priority 2 - // "AF3" - Assured forwarding priority 3 - // "AF4" - Assured forwarding priority 4 - // "NC1" - Network control - // "NC0" - Network control - // "BE0" - Best effort at high packet loss - // "LLQ" - Low-latency queue (LLQ) best effort (go/llq) - // "LLQ1" - LLQ assured forwarding priority 1 (go/llq2) - // "LLQ2" - LLQ assured forwarding priority 2 (go/llq2) - // "LLQ3" - LLQ assured forwarding priority 3 (go/llq3) - TrafficClassField string `json:"trafficClassField,omitempty"` - // VerifyHashFromHeader: Tells Scotty to verify hashes on the agent's behalf by - // parsing out the X-Goog-Hash header. - VerifyHashFromHeader bool `json:"verifyHashFromHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomData") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomData") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MediaResponseInfo) MarshalJSON() ([]byte, error) { - type NoMethod MediaResponseInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // OffsetPosition: Offset Position. type OffsetPosition struct { // Left: Offset distance from left side of an asset or a window. diff --git a/dfareporting/v4/dfareporting-api.json b/dfareporting/v4/dfareporting-api.json index 690beeaafdc..5a5d9d1a2e5 100644 --- a/dfareporting/v4/dfareporting-api.json +++ b/dfareporting/v4/dfareporting-api.json @@ -10067,7 +10067,7 @@ } } }, - "revision": "20240613", + "revision": "20240821", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "Account": { @@ -11663,6 +11663,54 @@ }, "type": "object" }, + "CartData": { + "description": "Contains additional information about cart data.", + "id": "CartData", + "properties": { + "items": { + "description": "Data of the items purchased.", + "items": { + "$ref": "CartDataItem" + }, + "type": "array" + }, + "merchantFeedLabel": { + "description": "The feed labels associated with the feed where your items are uploaded. For more information, please refer to ​​ https://support.google.com/merchants/answer/12453549. This is a required field.", + "type": "string" + }, + "merchantFeedLanguage": { + "description": "The language associated with the feed where your items are uploaded. Use ISO 639-1 language codes. This field is needed only when item IDs are not unique across multiple Merchant Center feeds.", + "type": "string" + }, + "merchantId": { + "description": "The Merchant Center ID where the items are uploaded.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "CartDataItem": { + "description": "Contains data of the items purchased.", + "id": "CartDataItem", + "properties": { + "itemId": { + "description": "The shopping id of the item. Must be equal to the Merchant Center product identifier. This is a required field.", + "type": "string" + }, + "quantity": { + "description": "Number of items sold. This is a required field.", + "format": "int32", + "type": "integer" + }, + "unitPrice": { + "description": "Unit price excluding tax, shipping, and any transaction level discounts. Interpreted in CM360 Floodlight config parent advertiser's currency code. This is a required field.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "ChangeLog": { "description": "Describes a change that a user has made to a resource.", "id": "ChangeLog", @@ -12050,6 +12098,10 @@ ], "type": "string" }, + "cartData": { + "$ref": "CartData", + "description": "The cart data associated with this conversion." + }, "childDirectedTreatment": { "description": "Whether this particular request may come from a user under the age of 13, under COPPA compliance.", "type": "boolean" @@ -14964,6 +15016,12 @@ "description": "Name of this directory site.", "type": "string" }, + "publisherSpecificationId": { + "description": "Output only. Default publisher specification ID of video placements under this directory site. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", + "format": "int64", + "readOnly": true, + "type": "string" + }, "settings": { "$ref": "DirectorySiteSettings", "description": "Directory site settings." @@ -17614,6 +17672,11 @@ "description": "Whether this placement opts out of ad blocking. When true, ad blocking is disabled for this placement. When false, the campaign and site settings take effect.", "type": "boolean" }, + "adServingPlatformId": { + "description": "Optional. Ad serving platform ID to identify the ad serving platform used by the placement. Measurement partners can use this field to add ad-server specific macros. Possible values are: * `1`, Adelphic * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv", + "format": "int64", + "type": "string" + }, "additionalSizes": { "description": "Additional sizes associated with this placement. When inserting or updating a placement, only the size ID field is used.", "items": { @@ -17773,6 +17836,10 @@ "$ref": "DimensionValue", "description": "Dimension value for the ID of the site. This is a read-only, auto-generated field." }, + "siteServed": { + "description": "Optional. Whether the ads in the placement are served by another platform and CM is only used for tracking or they are served by CM. A false value indicates the ad is served by CM.", + "type": "boolean" + }, "size": { "$ref": "Size", "description": "Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion." @@ -19568,6 +19635,11 @@ "format": "int64", "type": "string" }, + "adServingPlatformId": { + "description": "Optional. Ad serving platform ID to identify the ad serving platform used by the site. Measurement partners can use this field to add ad-server specific macros. If set, this value acts as the default during placement creation. Possible values are: * `1`, Adelphic * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv", + "format": "int64", + "type": "string" + }, "approved": { "description": "Whether this site is approved.", "type": "boolean" @@ -19819,7 +19891,7 @@ "type": "string" }, "publisherSpecificationId": { - "description": "Publisher specification ID used to identify site-associated publisher requirements and automatically populate transcode settings. If publisher specification ID is specified, it will take precedence over transcode settings.", + "description": "Publisher specification ID used to identify site-associated publisher requirements and automatically populate transcode settings. If publisher specification ID is specified, it will take precedence over transcode settings. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", "format": "int64", "type": "string" }, @@ -21119,7 +21191,7 @@ "type": "string" }, "publisherSpecificationId": { - "description": "Publisher specification ID of a video placement.", + "description": "Publisher specification ID of a video placement. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", "format": "int64", "type": "string" }, diff --git a/dfareporting/v4/dfareporting-gen.go b/dfareporting/v4/dfareporting-gen.go index 707918a1604..1e428ef59fc 100644 --- a/dfareporting/v4/dfareporting-gen.go +++ b/dfareporting/v4/dfareporting-gen.go @@ -2569,6 +2569,82 @@ func (s CampaignsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CartData: Contains additional information about cart data. +type CartData struct { + // Items: Data of the items purchased. + Items []*CartDataItem `json:"items,omitempty"` + // MerchantFeedLabel: The feed labels associated with the feed where your items + // are uploaded. For more information, please refer to ​​ + // https://support.google.com/merchants/answer/12453549. This is a required + // field. + MerchantFeedLabel string `json:"merchantFeedLabel,omitempty"` + // MerchantFeedLanguage: The language associated with the feed where your items + // are uploaded. Use ISO 639-1 language codes. This field is needed only when + // item IDs are not unique across multiple Merchant Center feeds. + MerchantFeedLanguage string `json:"merchantFeedLanguage,omitempty"` + // MerchantId: The Merchant Center ID where the items are uploaded. + MerchantId int64 `json:"merchantId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Items") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CartData) MarshalJSON() ([]byte, error) { + type NoMethod CartData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CartDataItem: Contains data of the items purchased. +type CartDataItem struct { + // ItemId: The shopping id of the item. Must be equal to the Merchant Center + // product identifier. This is a required field. + ItemId string `json:"itemId,omitempty"` + // Quantity: Number of items sold. This is a required field. + Quantity int64 `json:"quantity,omitempty"` + // UnitPrice: Unit price excluding tax, shipping, and any transaction level + // discounts. Interpreted in CM360 Floodlight config parent advertiser's + // currency code. This is a required field. + UnitPrice float64 `json:"unitPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "ItemId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ItemId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CartDataItem) MarshalJSON() ([]byte, error) { + type NoMethod CartDataItem + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *CartDataItem) UnmarshalJSON(data []byte) error { + type NoMethod CartDataItem + var s1 struct { + UnitPrice gensupport.JSONFloat64 `json:"unitPrice"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UnitPrice = float64(s1.UnitPrice) + return nil +} + // ChangeLog: Describes a change that a user has made to a resource. type ChangeLog struct { // AccountId: Account ID of the modified object. @@ -3047,6 +3123,8 @@ type Conversion struct { // "GRANTED" - Granted. // "DENIED" - Denied. AdUserDataConsent string `json:"adUserDataConsent,omitempty"` + // CartData: The cart data associated with this conversion. + CartData *CartData `json:"cartData,omitempty"` // ChildDirectedTreatment: Whether this particular request may come from a user // under the age of 13, under COPPA compliance. ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"` @@ -5741,6 +5819,16 @@ type DirectorySite struct { Kind string `json:"kind,omitempty"` // Name: Name of this directory site. Name string `json:"name,omitempty"` + // PublisherSpecificationId: Output only. Default publisher specification ID of + // video placements under this directory site. Possible values are: * `1`, Hulu + // * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * + // `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * + // `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst + // Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, + // MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, + // TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * + // `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max + PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // Settings: Directory site settings. Settings *DirectorySiteSettings `json:"settings,omitempty"` // Url: URL of this directory site. @@ -8389,6 +8477,16 @@ type Placement struct { // ad blocking is disabled for this placement. When false, the campaign and // site settings take effect. AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"` + // AdServingPlatformId: Optional. Ad serving platform ID to identify the ad + // serving platform used by the placement. Measurement partners can use this + // field to add ad-server specific macros. Possible values are: * `1`, Adelphic + // * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, + // Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * + // `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, + // Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * + // `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, + // Cognitiv + AdServingPlatformId int64 `json:"adServingPlatformId,omitempty,string"` // AdditionalSizes: Additional sizes associated with this placement. When // inserting or updating a placement, only the size ID field is used. AdditionalSizes []*Size `json:"additionalSizes,omitempty"` @@ -8498,6 +8596,10 @@ type Placement struct { // SiteIdDimensionValue: Dimension value for the ID of the site. This is a // read-only, auto-generated field. SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"` + // SiteServed: Optional. Whether the ads in the placement are served by another + // platform and CM is only used for tracking or they are served by CM. A false + // value indicates the ad is served by CM. + SiteServed bool `json:"siteServed,omitempty"` // Size: Size associated with this placement. When inserting or updating a // placement, only the size ID field is used. This field is required on // insertion. @@ -10312,6 +10414,16 @@ type Site struct { // AccountId: Account ID of this site. This is a read-only field that can be // left blank. AccountId int64 `json:"accountId,omitempty,string"` + // AdServingPlatformId: Optional. Ad serving platform ID to identify the ad + // serving platform used by the site. Measurement partners can use this field + // to add ad-server specific macros. If set, this value acts as the default + // during placement creation. Possible values are: * `1`, Adelphic * `2`, + // Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * + // `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku + // OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest + // DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, + // Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv + AdServingPlatformId int64 `json:"adServingPlatformId,omitempty,string"` // Approved: Whether this site is approved. Approved bool `json:"approved,omitempty"` // DirectorySiteId: Directory site associated with this site. This is a @@ -10572,7 +10684,14 @@ type SiteVideoSettings struct { // PublisherSpecificationId: Publisher specification ID used to identify // site-associated publisher requirements and automatically populate transcode // settings. If publisher specification ID is specified, it will take - // precedence over transcode settings. + // precedence over transcode settings. Possible values are: * `1`, Hulu * `2`, + // NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, + // VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * + // `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst + // Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, + // MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, + // TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * + // `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // SkippableSettings: Settings for the skippability of video creatives served // to this site. This will act as default for new placements created under this @@ -11939,6 +12058,14 @@ type VideoSettings struct { // "PORTRAIT" Orientation string `json:"orientation,omitempty"` // PublisherSpecificationId: Publisher specification ID of a video placement. + // Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * + // `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW + // Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner + // Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch + // Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile + // * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, + // Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, + // Spotify * `30`, Paramount * `31`, Max PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // SkippableSettings: Settings for the skippability of video creatives served // to this placement. If this object is provided, the creative-level skippable diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index 972c0599e1d..71307f95d07 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -4453,7 +4453,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4572,6 +4572,10 @@ "description": "The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.", "type": "string" }, + "clientCertificateSettings": { + "$ref": "GoogleCloudDialogflowCxV3AgentClientCertificateSettings", + "description": "Optional. Settings for custom client certificates." + }, "defaultLanguageCode": { "description": "Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.", "type": "string" @@ -4658,6 +4662,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3AgentClientCertificateSettings": { + "description": "Settings for custom client certificates.", + "id": "GoogleCloudDialogflowCxV3AgentClientCertificateSettings", + "properties": { + "passphrase": { + "description": "Optional. The name of the SecretManager secret version resource storing the passphrase. 'passphrase' should be left unset if the private key is not encrypted. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "privateKey": { + "description": "Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "sslCertificate": { + "description": "Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings": { "description": "Settings for Gen App Builder.", "id": "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings", diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index 02845081a9e..10dd06d9309 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -636,6 +636,9 @@ type GoogleCloudDialogflowCxV3Agent struct { // (https://cloud.google.com/dialogflow/docs/integrations/web-demo) // integration. AvatarUri string `json:"avatarUri,omitempty"` + // ClientCertificateSettings: Optional. Settings for custom client + // certificates. + ClientCertificateSettings *GoogleCloudDialogflowCxV3AgentClientCertificateSettings `json:"clientCertificateSettings,omitempty"` // DefaultLanguageCode: Required. Immutable. The default language of the agent // as a language tag. See Language Support // (https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list @@ -736,6 +739,39 @@ func (s GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3AgentClientCertificateSettings: Settings for custom +// client certificates. +type GoogleCloudDialogflowCxV3AgentClientCertificateSettings struct { + // Passphrase: Optional. The name of the SecretManager secret version resource + // storing the passphrase. 'passphrase' should be left unset if the private key + // is not encrypted. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + Passphrase string `json:"passphrase,omitempty"` + // PrivateKey: Required. The name of the SecretManager secret version resource + // storing the private key encoded in PEM format. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + PrivateKey string `json:"privateKey,omitempty"` + // SslCertificate: Required. The ssl certificate encoded in PEM format. This + // string must include the begin header and end footer lines. + SslCertificate string `json:"sslCertificate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Passphrase") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Passphrase") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDialogflowCxV3AgentClientCertificateSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AgentClientCertificateSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings: Settings for Gen App // Builder. type GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings struct { diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index 6626707c655..322c27a3680 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -5185,7 +5185,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -7636,6 +7636,10 @@ "description": "The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.", "type": "string" }, + "clientCertificateSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings", + "description": "Optional. Settings for custom client certificates." + }, "defaultLanguageCode": { "description": "Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.", "type": "string" @@ -7726,6 +7730,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings": { + "description": "Settings for custom client certificates.", + "id": "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings", + "properties": { + "passphrase": { + "description": "Optional. The name of the SecretManager secret version resource storing the passphrase. 'passphrase' should be left unset if the private key is not encrypted. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "privateKey": { + "description": "Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "sslCertificate": { + "description": "Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings": { "description": "Settings for Gen App Builder.", "id": "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings", diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index e496a82a351..3fef6e40933 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -4007,6 +4007,9 @@ type GoogleCloudDialogflowCxV3beta1Agent struct { // (https://cloud.google.com/dialogflow/docs/integrations/web-demo) // integration. AvatarUri string `json:"avatarUri,omitempty"` + // ClientCertificateSettings: Optional. Settings for custom client + // certificates. + ClientCertificateSettings *GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings `json:"clientCertificateSettings,omitempty"` // DefaultLanguageCode: Required. Immutable. The default language of the agent // as a language tag. See Language Support // (https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list @@ -4114,6 +4117,39 @@ func (s GoogleCloudDialogflowCxV3beta1AgentAnswerFeedbackSettings) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings: Settings for +// custom client certificates. +type GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings struct { + // Passphrase: Optional. The name of the SecretManager secret version resource + // storing the passphrase. 'passphrase' should be left unset if the private key + // is not encrypted. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + Passphrase string `json:"passphrase,omitempty"` + // PrivateKey: Required. The name of the SecretManager secret version resource + // storing the private key encoded in PEM format. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + PrivateKey string `json:"privateKey,omitempty"` + // SslCertificate: Required. The ssl certificate encoded in PEM format. This + // string must include the begin header and end footer lines. + SslCertificate string `json:"sslCertificate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Passphrase") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Passphrase") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings: Settings for Gen // App Builder. type GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings struct { diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index ea809698dee..2cd463a3edf 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240819", + "revision": "20240821", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -1111,7 +1111,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1Schema": { - "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.", + "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.", "id": "GoogleCloudAiplatformV1beta1Schema", "properties": { "default": { diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 6df9d580346..b00236e16c4 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -1323,8 +1323,8 @@ func (s GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1beta1Schema: Schema is used to define the format of // input/output data. Represents a select subset of an OpenAPI 3.0 schema -// object (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be -// added in the future as needed. +// object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may +// be added in the future as needed. type GoogleCloudAiplatformV1beta1Schema struct { // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 3c0de6cf222..e19ed30457e 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240809", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2520,7 +2520,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "appdevexperience": { @@ -2547,7 +2547,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2564,7 +2564,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -3230,7 +3230,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3649,7 +3649,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3717,11 +3717,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3742,7 +3742,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3757,9 +3757,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5007,7 +5007,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "configmanagement": { @@ -6074,6 +6074,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6103,6 +6104,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 15044b88568..3ac963f76b0 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -973,7 +973,7 @@ func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureSpec: CommonFeatureSpec contains Hub-wide configuration +// CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration // information type CommonFeatureSpec struct { // Appdevexperience: Appdevexperience specific spec. @@ -1004,7 +1004,7 @@ func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureState: CommonFeatureState contains Hub-wide Feature status +// CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status // information. type CommonFeatureState struct { // Appdevexperience: Appdevexperience specific state. @@ -1013,7 +1013,7 @@ type CommonFeatureState struct { Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"` // Fleetobservability: FleetObservability feature state. Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"` - // State: Output only. The "running state" of the Feature in this Hub. + // State: Output only. The "running state" of the Feature in this Fleet. State *FeatureState `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Appdevexperience") to // unconditionally include in API requests. By default, fields with empty or @@ -1685,6 +1685,9 @@ type ConfigManagementMembershipSpec struct { // ConfigSync: Config Sync configuration for the cluster. ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"` // HierarchyController: Hierarchy Controller configuration for the cluster. + // Deprecated: Configuring Hierarchy Controller through the configmanagement + // feature is no longer recommended. Use + // https://github.com/kubernetes-sigs/hierarchical-namespaces instead. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` // Management: Enables automatic Feature management. // @@ -2219,7 +2222,7 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Feature: Feature represents the settings and status of any Hub Feature. +// Feature: Feature represents the settings and status of any Fleet Feature. type Feature struct { // CreateTime: Output only. When the Feature resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2273,10 +2276,10 @@ type Feature struct { // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is // a valid Scope in this project. {p} WILL match the Feature's project. ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"` - // Spec: Optional. Hub-wide Feature configuration. If this Feature does not - // support any Hub-wide configuration, this field may be unused. + // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. Spec *CommonFeatureSpec `json:"spec,omitempty"` - // State: Output only. The Hub-wide Feature state. + // State: Output only. The Fleet-wide Feature state. State *CommonFeatureState `json:"state,omitempty"` // Unreachable: Output only. List of locations that could not be reached while // fetching this feature. @@ -2306,7 +2309,7 @@ func (s Feature) MarshalJSON() ([]byte, error) { // FeatureResourceState: FeatureResourceState describes the state of a Feature // *resource* in the GkeHub API. See `FeatureState` for the "running state" of -// the Feature in the Hub and across Memberships. +// the Feature in the Fleet and across Memberships. type FeatureResourceState struct { // State: The current state of the Feature resource in the Hub API. // @@ -2314,10 +2317,10 @@ type FeatureResourceState struct { // "STATE_UNSPECIFIED" - State is unknown or not set. // "ENABLING" - The Feature is being enabled, and the Feature resource is // being created. Once complete, the corresponding Feature will be enabled in - // this Hub. - // "ACTIVE" - The Feature is enabled in this Hub, and the Feature resource is - // fully available. - // "DISABLING" - The Feature is being disabled in this Hub, and the Feature + // this Fleet. + // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource + // is fully available. + // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature // resource is being deleted. // "UPDATING" - The Feature resource is being updated. // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub @@ -3961,8 +3964,7 @@ func (s MembershipEndpoint) MarshalJSON() ([]byte, error) { } // MembershipFeatureSpec: MembershipFeatureSpec contains configuration -// information for a single Membership. NOTE: Please use snake case in your -// feature name. +// information for a single Membership. type MembershipFeatureSpec struct { // Configmanagement: Config Management-specific spec. Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"` @@ -5319,6 +5321,8 @@ type ServiceMeshCondition struct { // Possible values: // "CODE_UNSPECIFIED" - Default Unspecified code // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code + // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code + // for cross-project // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index beeb52a2a37..767d24348b7 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -188,6 +188,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "bareMetalAdminClusterId": { "description": "Required. User provided identifier that is used as part of the resource name; must conform to RFC-1034 and additionally restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/", "location": "query", @@ -254,6 +259,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return BareMetal Admin Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the bare metal admin cluster to get. Format: \"projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_admin_cluster}\"", "location": "path", @@ -325,6 +335,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of BareMetal Admin Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "pageSize": { "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 50 clusters will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", "format": "int32", @@ -622,6 +637,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "bareMetalClusterId": { "description": "Required. User provided identifier that is used as part of the resource name; must conform to RFC-1034 and additionally restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/", "location": "query", @@ -738,6 +758,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return BareMetal Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the bare metal user cluster to get. Format: \"projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluster}\"", "location": "path", @@ -809,6 +834,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of BareMetal Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "filter": { "description": "A resource filtering expression following https://google.aip.dev/160. When non-empty, only resource's whose attributes field matches the filter are returned.", "location": "query", @@ -1726,6 +1756,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return Vmware Admin Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the VMware admin cluster to be returned. Format: \"projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cluster}\"", "location": "path", @@ -1797,6 +1832,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of Vmware Admin Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "pageSize": { "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 50 clusters will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", "format": "int32", @@ -2059,6 +2099,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent of the project and location where this cluster is created in. Format: \"projects/{project}/locations/{location}\"", "location": "path", @@ -2175,6 +2220,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return Vmware Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the VMware user cluster to be returned. Format: \"projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}\"", "location": "path", @@ -2246,6 +2296,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of Vmware Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "filter": { "description": "A resource filtering expression following https://google.aip.dev/160. When non-empty, only resource's whose attributes field matches the filter are returned.", "location": "query", @@ -2996,7 +3051,7 @@ } } }, - "revision": "20240228", + "revision": "20240814", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -3719,6 +3774,11 @@ "description": "BareMetalClusterUpgradePolicy defines the cluster upgrade policy.", "id": "BareMetalClusterUpgradePolicy", "properties": { + "pause": { + "description": "Output only. Pause is used to show the upgrade pause status. It's view only for now.", + "readOnly": true, + "type": "boolean" + }, "policy": { "description": "Specifies which upgrade policy to use.", "enum": [ @@ -5182,6 +5242,14 @@ "errorMessage": { "description": "Human-friendly representation of the error message from controller. The error message can be temporary as the controller controller creates a cluster or node pool. If the error message persists for a longer period of time, it can be used to surface error message to indicate real problems requiring user intervention.", "type": "string" + }, + "version": { + "description": "Reflect current version of the resource.", + "type": "string" + }, + "versions": { + "$ref": "Versions", + "description": "Shows the mapping of a given version to the number of machines under this version." } }, "type": "object" @@ -5371,6 +5439,36 @@ }, "type": "object" }, + "Version": { + "description": "Version describes the number of nodes at a given version under a resource.", + "id": "Version", + "properties": { + "count": { + "description": "Number of machines under the above version.", + "format": "int64", + "type": "string" + }, + "version": { + "description": "Resource version.", + "type": "string" + } + }, + "type": "object" + }, + "Versions": { + "description": "Versions describes the mapping of a given version to the number of machines under this version.", + "id": "Versions", + "properties": { + "versions": { + "description": "Shows the mapping of a given version to the number of machines under this version.", + "items": { + "$ref": "Version" + }, + "type": "array" + } + }, + "type": "object" + }, "VmwareAAGConfig": { "description": "Specifies anti affinity group config for the VMware user cluster.", "id": "VmwareAAGConfig", @@ -5570,6 +5668,11 @@ "readOnly": true, "type": "string" }, + "validationCheck": { + "$ref": "ValidationCheck", + "description": "Output only. ValidationCheck represents the result of the preflight check job.", + "readOnly": true + }, "vcenter": { "$ref": "VmwareAdminVCenterConfig", "description": "The VMware admin cluster VCenter configuration." @@ -6727,7 +6830,7 @@ } }, "servicePath": "", - "title": "Anthos On-Prem API", + "title": "GDC Virtual API", "version": "v1", "version_module": true } \ No newline at end of file diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 9c1253107c0..677749cceb4 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package gkeonprem provides access to the Anthos On-Prem API. +// Package gkeonprem provides access to the GDC Virtual API. // // For product documentation, see: https://cloud.google.com/anthos/clusters/docs/on-prem/ // @@ -1272,6 +1272,9 @@ func (s BareMetalClusterOperationsConfig) MarshalJSON() ([]byte, error) { // BareMetalClusterUpgradePolicy: BareMetalClusterUpgradePolicy defines the // cluster upgrade policy. type BareMetalClusterUpgradePolicy struct { + // Pause: Output only. Pause is used to show the upgrade pause status. It's + // view only for now. + Pause bool `json:"pause,omitempty"` // Policy: Specifies which upgrade policy to use. // // Possible values: @@ -1279,13 +1282,13 @@ type BareMetalClusterUpgradePolicy struct { // "SERIAL" - Upgrade worker node pools sequentially. // "CONCURRENT" - Upgrade all worker node pools in parallel. Policy string `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally + // ForceSendFields is a list of field names (e.g. "Pause") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API + // NullFields is a list of field names (e.g. "Pause") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -3443,6 +3446,11 @@ type ResourceStatus struct { // period of time, it can be used to surface error message to indicate real // problems requiring user intervention. ErrorMessage string `json:"errorMessage,omitempty"` + // Version: Reflect current version of the resource. + Version string `json:"version,omitempty"` + // Versions: Shows the mapping of a given version to the number of machines + // under this version. + Versions *Versions `json:"versions,omitempty"` // ForceSendFields is a list of field names (e.g. "Conditions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3704,6 +3712,55 @@ func (s ValidationCheckStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Version: Version describes the number of nodes at a given version under a +// resource. +type Version struct { + // Count: Number of machines under the above version. + Count int64 `json:"count,omitempty,string"` + // Version: Resource version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Version) MarshalJSON() ([]byte, error) { + type NoMethod Version + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Versions: Versions describes the mapping of a given version to the number of +// machines under this version. +type Versions struct { + // Versions: Shows the mapping of a given version to the number of machines + // under this version. + Versions []*Version `json:"versions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Versions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Versions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Versions) MarshalJSON() ([]byte, error) { + type NoMethod Versions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VmwareAAGConfig: Specifies anti affinity group config for the VMware user // cluster. type VmwareAAGConfig struct { @@ -3899,6 +3956,9 @@ type VmwareAdminCluster struct { // UpdateTime: Output only. The time at which VMware admin cluster was last // updated. UpdateTime string `json:"updateTime,omitempty"` + // ValidationCheck: Output only. ValidationCheck represents the result of the + // preflight check job. + ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"` // Vcenter: The VMware admin cluster VCenter configuration. Vcenter *VmwareAdminVCenterConfig `json:"vcenter,omitempty"` @@ -5584,6 +5644,16 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) Create(parent string, b return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalAdminClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // BareMetalAdminClusterId sets the optional parameter // "bareMetalAdminClusterId": Required. User provided identifier that is used // as part of the resource name; must conform to RFC-1034 and additionally @@ -5808,6 +5878,13 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) Get(name string) *Proje return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// BareMetal Admin Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsBareMetalAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for bare metal admin cluster. // When `BASIC` is specified, only the cluster resource name and membership are // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as @@ -6068,6 +6145,13 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) List(parent string) *Pr return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of BareMetal Admin Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsBareMetalAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, at most 50 clusters // will be returned. The maximum value is 1000; values above 1000 will be @@ -7075,6 +7159,16 @@ func (r *ProjectsLocationsBareMetalClustersService) Create(parent string, bareme return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsBareMetalClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // BareMetalClusterId sets the optional parameter "bareMetalClusterId": // Required. User provided identifier that is used as part of the resource // name; must conform to RFC-1034 and additionally restrict to lower-cased @@ -7439,6 +7533,13 @@ func (r *ProjectsLocationsBareMetalClustersService) Get(name string) *ProjectsLo return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// BareMetal Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsBareMetalClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for bare metal user cluster. // When `BASIC` is specified, only the cluster resource name and admin cluster // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` @@ -7699,6 +7800,13 @@ func (r *ProjectsLocationsBareMetalClustersService) List(parent string) *Project return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of BareMetal Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsBareMetalClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // Filter sets the optional parameter "filter": A resource filtering expression // following https://google.aip.dev/160. When non-empty, only resource's whose // attributes field matches the filter are returned. @@ -10825,6 +10933,13 @@ func (r *ProjectsLocationsVmwareAdminClustersService) Get(name string) *Projects return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// Vmware Admin Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsVmwareAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for VMware admin cluster. When // `BASIC` is specified, only the cluster resource name and membership are // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as @@ -11084,6 +11199,13 @@ func (r *ProjectsLocationsVmwareAdminClustersService) List(parent string) *Proje return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of Vmware Admin Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsVmwareAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, at most 50 clusters // will be returned. The maximum value is 1000; values above 1000 will be @@ -11972,6 +12094,16 @@ func (r *ProjectsLocationsVmwareClustersService) Create(parent string, vmwareclu return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsVmwareClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsVmwareClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": Validate the // request without actually doing any updates. func (c *ProjectsLocationsVmwareClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersCreateCall { @@ -12334,6 +12466,13 @@ func (r *ProjectsLocationsVmwareClustersService) Get(name string) *ProjectsLocat return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// Vmware Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsVmwareClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for VMware user cluster. When // `BASIC` is specified, only the cluster resource name and admin cluster // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` @@ -12593,6 +12732,13 @@ func (r *ProjectsLocationsVmwareClustersService) List(parent string) *ProjectsLo return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of Vmware Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsVmwareClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // Filter sets the optional parameter "filter": A resource filtering expression // following https://google.aip.dev/160. When non-empty, only resource's whose // attributes field matches the filter are returned. diff --git a/looker/v1/looker-api.json b/looker/v1/looker-api.json index 8922f640b90..2ea54d184a6 100644 --- a/looker/v1/looker-api.json +++ b/looker/v1/looker-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20240522", + "revision": "20240814", "rootUrl": "https://looker.googleapis.com/", "schemas": { "AdminSettings": { @@ -1163,6 +1163,14 @@ "description": "Whether private IP is enabled on the Looker instance.", "type": "boolean" }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Optional. PSC configuration. Used when `psc_enabled` is true." + }, + "pscEnabled": { + "description": "Optional. Whether to use Private Service Connect (PSC) for private IP connectivity. If true, neither `public_ip_enabled` nor `private_ip_enabled` can be true.", + "type": "boolean" + }, "publicIpEnabled": { "description": "Whether public IP is enabled on the Looker instance.", "type": "boolean" @@ -1476,12 +1484,74 @@ }, "type": "object" }, + "PscConfig": { + "description": "Information for Private Service Connect (PSC) setup for a Looker instance.", + "id": "PscConfig", + "properties": { + "allowedVpcs": { + "description": "Optional. List of VPCs that are allowed ingress into looker. Format: projects/{project}/global/networks/{network}", + "items": { + "type": "string" + }, + "type": "array" + }, + "lookerServiceAttachmentUri": { + "description": "Output only. URI of the Looker service attachment.", + "readOnly": true, + "type": "string" + }, + "serviceAttachments": { + "description": "Optional. List of egress service attachment configurations.", + "items": { + "$ref": "ServiceAttachment" + }, + "type": "array" + } + }, + "type": "object" + }, "RestartInstanceRequest": { "description": "Request options for restarting an instance.", "id": "RestartInstanceRequest", "properties": {}, "type": "object" }, + "ServiceAttachment": { + "description": "Service attachment configuration.", + "id": "ServiceAttachment", + "properties": { + "connectionStatus": { + "description": "Output only. Connection status.", + "enum": [ + "UNKNOWN", + "ACCEPTED", + "PENDING", + "REJECTED", + "NEEDS_ATTENTION", + "CLOSED" + ], + "enumDescriptions": [ + "Connection status is unspecified.", + "Connection is established and functioning normally.", + "Connection is not established (Looker tenant project hasn't been allowlisted).", + "Connection is not established (Looker tenant project is explicitly in reject list).", + "Issue with target service attachment, e.g. NAT subnet is exhausted.", + "Target service attachment does not exist. This status is a terminal state." + ], + "readOnly": true, + "type": "string" + }, + "localFqdn": { + "description": "Required. Fully qualified domain name that will be used in the private DNS record created for the service attachment.", + "type": "string" + }, + "targetServiceAttachmentUri": { + "description": "Required. URI of the service attachment to connect to. Format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment}", + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/looker/v1/looker-gen.go b/looker/v1/looker-gen.go index 80a882dbd6c..93a9c906eff 100644 --- a/looker/v1/looker-gen.go +++ b/looker/v1/looker-gen.go @@ -800,6 +800,12 @@ type Instance struct { PlatformEdition string `json:"platformEdition,omitempty"` // PrivateIpEnabled: Whether private IP is enabled on the Looker instance. PrivateIpEnabled bool `json:"privateIpEnabled,omitempty"` + // PscConfig: Optional. PSC configuration. Used when `psc_enabled` is true. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + // PscEnabled: Optional. Whether to use Private Service Connect (PSC) for + // private IP connectivity. If true, neither `public_ip_enabled` nor + // `private_ip_enabled` can be true. + PscEnabled bool `json:"pscEnabled,omitempty"` // PublicIpEnabled: Whether public IP is enabled on the Looker instance. PublicIpEnabled bool `json:"publicIpEnabled,omitempty"` // ReservedRange: Name of a reserved IP address range within the @@ -1231,10 +1237,81 @@ func (s Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscConfig: Information for Private Service Connect (PSC) setup for a Looker +// instance. +type PscConfig struct { + // AllowedVpcs: Optional. List of VPCs that are allowed ingress into looker. + // Format: projects/{project}/global/networks/{network} + AllowedVpcs []string `json:"allowedVpcs,omitempty"` + // LookerServiceAttachmentUri: Output only. URI of the Looker service + // attachment. + LookerServiceAttachmentUri string `json:"lookerServiceAttachmentUri,omitempty"` + // ServiceAttachments: Optional. List of egress service attachment + // configurations. + ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedVpcs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllowedVpcs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RestartInstanceRequest: Request options for restarting an instance. type RestartInstanceRequest struct { } +// ServiceAttachment: Service attachment configuration. +type ServiceAttachment struct { + // ConnectionStatus: Output only. Connection status. + // + // Possible values: + // "UNKNOWN" - Connection status is unspecified. + // "ACCEPTED" - Connection is established and functioning normally. + // "PENDING" - Connection is not established (Looker tenant project hasn't + // been allowlisted). + // "REJECTED" - Connection is not established (Looker tenant project is + // explicitly in reject list). + // "NEEDS_ATTENTION" - Issue with target service attachment, e.g. NAT subnet + // is exhausted. + // "CLOSED" - Target service attachment does not exist. This status is a + // terminal state. + ConnectionStatus string `json:"connectionStatus,omitempty"` + // LocalFqdn: Required. Fully qualified domain name that will be used in the + // private DNS record created for the service attachment. + LocalFqdn string `json:"localFqdn,omitempty"` + // TargetServiceAttachmentUri: Required. URI of the service attachment to + // connect to. Format: + // projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + TargetServiceAttachmentUri string `json:"targetServiceAttachmentUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConnectionStatus") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConnectionStatus") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ServiceAttachment) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index c50816f750c..60dc2a467b5 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -1354,7 +1354,7 @@ } } }, - "revision": "20240806", + "revision": "20240821", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AcceptTermsOfService": { @@ -1608,6 +1608,10 @@ "$ref": "CustomerService", "description": "Optional. The customer service of the business." }, + "koreanBusinessRegistrationNumber": { + "description": "Optional. The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX.", + "type": "string" + }, "name": { "description": "Identifier. The resource name of the business info. Format: `accounts/{account}/businessInfo`", "type": "string" diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 00e3ad98d73..fbd3124aeb9 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -614,6 +614,10 @@ type BusinessInfo struct { Address *PostalAddress `json:"address,omitempty"` // CustomerService: Optional. The customer service of the business. CustomerService *CustomerService `json:"customerService,omitempty"` + // KoreanBusinessRegistrationNumber: Optional. The 10-digit Korean business + // registration number (https://support.google.com/merchants/answer/9037766) + // separated with dashes in the format: XXX-XX-XXXXX. + KoreanBusinessRegistrationNumber string `json:"koreanBusinessRegistrationNumber,omitempty"` // Name: Identifier. The resource name of the business info. Format: // `accounts/{account}/businessInfo` Name string `json:"name,omitempty"` diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 3771e0054b6..0c9a235dc6c 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -589,7 +589,7 @@ "vpcFlowLogsConfigs": { "methods": { "create": { - "description": "Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "description": "Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description ", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", "httpMethod": "POST", "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.create", @@ -718,7 +718,7 @@ ] }, "patch": { - "description": "Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "description": "Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Updating a configuration with state=DISABLED will fail. 2. The following fields are not considered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description ", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", "httpMethod": "PATCH", "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch", @@ -758,7 +758,7 @@ } } }, - "revision": "20240807", + "revision": "20240812", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1543,6 +1543,14 @@ "projectId": { "description": "Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.", "type": "string" + }, + "redisCluster": { + "description": "A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI.", + "type": "string" + }, + "redisInstance": { + "description": "A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI.", + "type": "string" } }, "type": "object" diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 5fbcc3165ef..2964a499faa 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -1168,6 +1168,12 @@ type Endpoint struct { // provide is from the service project. In this case, the network that the IP // address resides in is defined in the host project. ProjectId string `json:"projectId,omitempty"` + // RedisCluster: A Redis Cluster + // (https://cloud.google.com/memorystore/docs/cluster) URI. + RedisCluster string `json:"redisCluster,omitempty"` + // RedisInstance: A Redis Instance + // (https://cloud.google.com/memorystore/docs/redis) URI. + RedisInstance string `json:"redisInstance,omitempty"` // ForceSendFields is a list of field names (e.g. "AppEngineVersion") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4825,10 +4831,10 @@ type ProjectsLocationsVpcFlowLogsConfigsCreateCall struct { // Create: Creates a new `VpcFlowLogsConfig`. If a configuration with the exact // same settings already exists (even if the ID is different), the creation // fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. -// The following fields are not considrered as `settings` for the purpose of -// the check mentioned above, therefore - creating another configuration with -// the same fields but different values for the following fields will fail as -// well: - name - create_time - update_time - labels - description +// The following fields are not considered as `settings` for the purpose of the +// check mentioned above, therefore - creating another configuration with the +// same fields but different values for the following fields will fail as well: +// - name - create_time - update_time - labels - description // // - parent: The parent resource of the VPC Flow Logs configuration to create: // `projects/{project_id}/locations/global`. @@ -5306,11 +5312,12 @@ type ProjectsLocationsVpcFlowLogsConfigsPatchCall struct { // Patch: Updates an existing `VpcFlowLogsConfig`. If a configuration with the // exact same settings already exists (even if the ID is different), the -// creation fails. Notes: 1. The following fields are not considrered as -// `settings` for the purpose of the check mentioned above, therefore - -// updating another configuration with the same fields but different values for -// the following fields will fail as well: - name - create_time - update_time - -// labels - description +// creation fails. Notes: 1. Updating a configuration with state=DISABLED will +// fail. 2. The following fields are not considered as `settings` for the +// purpose of the check mentioned above, therefore - updating another +// configuration with the same fields but different values for the following +// fields will fail as well: - name - create_time - update_time - labels - +// description // // - name: Identifier. Unique name of the configuration using the form: // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_c diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 6280adc0dbe..e43177cd4e1 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2408,7 +2408,7 @@ } } }, - "revision": "20240721", + "revision": "20240818", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2814,6 +2814,18 @@ }, "type": "array" }, + "routingMode": { + "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", + "enum": [ + "EXPLICIT_ROUTING_MODE", + "NEXT_HOP_ROUTING_MODE" + ], + "enumDescriptions": [ + "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", + "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." + ], + "type": "string" + }, "scope": { "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", "type": "string" @@ -3049,7 +3061,7 @@ "type": "object" }, "GrpcRouteRetryPolicy": { - "description": "The specifications for retries.", + "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", "id": "GrpcRouteRetryPolicy", "properties": { "numRetries": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index b3355652ab6..dc86537ce0c 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -967,6 +967,19 @@ type Gateway struct { // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple // ports. Ports []int64 `json:"ports,omitempty"` + // RoutingMode: Optional. The routing mode of the Gateway. This field is + // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is + // required for gateways of type SECURE_WEB_GATEWAY. + // + // Possible values: + // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are + // configured to send traffic through the gateway. This is the default routing + // mode. + // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are + // unaware of the gateway, and a route (advanced route or other route type) can + // be configured to direct traffic from client to gateway. The gateway then + // acts as a next-hop to the destination. + RoutingMode string `json:"routingMode,omitempty"` // Scope: Optional. Scope determines how configuration across multiple Gateway // instances are merged. The configuration for multiple Gateway instances with // the same scope will be merged as presented as a single coniguration to the @@ -1278,7 +1291,8 @@ func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GrpcRouteRetryPolicy: The specifications for retries. +// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more +// conditions for which this retry rule applies. Valid values are: type GrpcRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must be > // 0. If not specified, default to 1. diff --git a/searchads360/v0/searchads360-api.json b/searchads360/v0/searchads360-api.json index 54d6a06092a..a81c1109c11 100644 --- a/searchads360/v0/searchads360-api.json +++ b/searchads360/v0/searchads360-api.json @@ -260,7 +260,7 @@ } } }, - "revision": "20240808", + "revision": "20240822", "rootUrl": "https://searchads360.googleapis.com/", "schemas": { "GoogleAdsSearchads360V0Common__AdScheduleInfo": { @@ -4320,6 +4320,12 @@ "description": "Immutable. The label assigned to the ad group ad.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group ad label. Ad group ad label resource names have the form: `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`", "type": "string" @@ -4742,6 +4748,12 @@ "description": "Immutable. The label assigned to the ad group criterion.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group criterion label. Ad group criterion label resource names have the form: `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`", "type": "string" @@ -4761,6 +4773,12 @@ "description": "Immutable. The label assigned to the ad group.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group label. Ad group label resource names have the form: `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}`", "type": "string" @@ -6345,6 +6363,12 @@ "description": "Immutable. The label assigned to the campaign.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. Name of the resource. Campaign label resource names have the form: `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}`", "type": "string" @@ -7036,6 +7060,31 @@ "readOnly": true, "type": "boolean" }, + "renderType": { + "description": "Output only. How the result value of the custom column should be interpreted.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "NUMBER", + "PERCENT", + "MONEY", + "STRING", + "BOOLEAN", + "DATE" + ], + "enumDescriptions": [ + "Not specified.", + "Unknown.", + "The custom column is a raw numerical value. See value_type field to determine if it is an integer or a double.", + "The custom column should be multiplied by 100 to retrieve the percentage value.", + "The custom column value is a monetary value and is in micros.", + "The custom column value is a string.", + "The custom column value is a boolean.", + "The custom column value is a date represented as an integer in YYYYMMDD format." + ], + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the custom column. Custom column resource names have the form: `customers/{customer_id}/customColumns/{custom_column_id}`", "type": "string" @@ -7048,7 +7097,8 @@ "STRING", "INT64", "DOUBLE", - "BOOLEAN" + "BOOLEAN", + "DATE" ], "enumDescriptions": [ "Not specified.", @@ -7056,7 +7106,8 @@ "The custom column value is a string.", "The custom column value is an int64 number.", "The custom column value is a double number.", - "The custom column value is a boolean." + "The custom column value is a boolean.", + "The custom column value is a date, in YYYYMMDD format." ], "readOnly": true, "type": "string" diff --git a/searchads360/v0/searchads360-gen.go b/searchads360/v0/searchads360-gen.go index 17fa8d9443c..db0eac98804 100644 --- a/searchads360/v0/searchads360-gen.go +++ b/searchads360/v0/searchads360-gen.go @@ -4774,6 +4774,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { AdGroupAd string `json:"adGroupAd,omitempty"` // Label: Immutable. The label assigned to the ad group ad. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group ad label. Ad // group ad label resource names have the form: // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` @@ -5154,6 +5156,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupCriterionLabel struct { AdGroupCriterion string `json:"adGroupCriterion,omitempty"` // Label: Immutable. The label assigned to the ad group criterion. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group criterion label. // Ad group criterion label resource names have the form: // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~ @@ -5184,6 +5188,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupLabel struct { AdGroup string `json:"adGroup,omitempty"` // Label: Immutable. The label assigned to the ad group. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group label. Ad group // label resource names have the form: // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` @@ -6615,6 +6621,8 @@ type GoogleAdsSearchads360V0Resources__CampaignLabel struct { Campaign string `json:"campaign,omitempty"` // Label: Immutable. The label assigned to the campaign. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. Name of the resource. Campaign label resource names // have the form: // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` @@ -7225,6 +7233,22 @@ type GoogleAdsSearchads360V0Resources__CustomColumn struct { // ReferencesMetrics: Output only. True when the custom column is referring to // one or more metrics. ReferencesMetrics bool `json:"referencesMetrics,omitempty"` + // RenderType: Output only. How the result value of the custom column should be + // interpreted. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Unknown. + // "NUMBER" - The custom column is a raw numerical value. See value_type + // field to determine if it is an integer or a double. + // "PERCENT" - The custom column should be multiplied by 100 to retrieve the + // percentage value. + // "MONEY" - The custom column value is a monetary value and is in micros. + // "STRING" - The custom column value is a string. + // "BOOLEAN" - The custom column value is a boolean. + // "DATE" - The custom column value is a date represented as an integer in + // YYYYMMDD format. + RenderType string `json:"renderType,omitempty"` // ResourceName: Immutable. The resource name of the custom column. Custom // column resource names have the form: // `customers/{customer_id}/customColumns/{custom_column_id}` @@ -7238,6 +7262,7 @@ type GoogleAdsSearchads360V0Resources__CustomColumn struct { // "INT64" - The custom column value is an int64 number. // "DOUBLE" - The custom column value is a double number. // "BOOLEAN" - The custom column value is a boolean. + // "DATE" - The custom column value is a date, in YYYYMMDD format. ValueType string `json:"valueType,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index 55c52f9d8b5..7698407fe4a 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -1190,7 +1190,7 @@ } } }, - "revision": "20240726", + "revision": "20240816", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -1814,7 +1814,7 @@ "id": "Topic", "properties": { "name": { - "description": "Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", + "description": "Identifier. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", "type": "string" } }, diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index 1ea1fc8ebab..a15d2ad1233 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -1323,7 +1323,7 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // Topic: A Pub/Sub topic which Secret Manager will publish to when control // plane events occur on this secret. type Topic struct { - // Name: Required. The resource name of the Pub/Sub topic that will be + // Name: Identifier. The resource name of the Pub/Sub topic that will be // published to, in the following format: `projects/*/topics/*`. For // publication to succeed, the Secret Manager service agent must have the // `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 4fb50d3f1bf..e1852a77879 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1100,7 +1100,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's name contains the string \"howl\". * `database:prod` - The database's name contains the string \"prod\". * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time \u003c \\\"2018-03-28T14:50:00Z\\\")` - The backup name contains the string \"howl\" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time \u003c \\\"2018-03-28T14:50:00Z\\\"` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes \u003e 10000000000` - The backup's size is greater than 10GB", + "description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` * `backup_schedules` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's name contains the string \"howl\". * `database:prod` - The database's name contains the string \"prod\". * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time \u003c \\\"2018-03-28T14:50:00Z\\\")` - The backup name contains the string \"howl\" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time \u003c \\\"2018-03-28T14:50:00Z\\\"` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes \u003e 10000000000` - The backup's size is greater than 10GB * `backup_schedules:daily` - The backup is created from a schedule with \"daily\" in its name.", "location": "query", "type": "string" }, @@ -3259,7 +3259,7 @@ } } }, - "revision": "20240807", + "revision": "20240814", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 1c24b85fcdd..531974cda26 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -10082,18 +10082,20 @@ func (r *ProjectsInstancesBackupsService) List(parent string) *ProjectsInstances // eligible for filtering: * `name` * `database` * `state` * `create_time` (and // values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values // are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of -// the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple -// expressions by enclosing each expression in parentheses. By default, -// expressions are combined with AND logic, but you can specify AND, OR, and -// NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's -// name contains the string "howl". * `database:prod` - The database's name -// contains the string "prod". * `state:CREATING` - The backup is pending +// the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` * `backup_schedules` You can +// combine multiple expressions by enclosing each expression in parentheses. By +// default, expressions are combined with AND logic, but you can specify AND, +// OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The +// backup's name contains the string "howl". * `database:prod` - The database's +// name contains the string "prod". * `state:CREATING` - The backup is pending // creation. * `state:READY` - The backup is fully created and ready for use. * // `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - The backup name // contains the string "howl" and `create_time` of the backup is before // 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\" - The // backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > -// 10000000000` - The backup's size is greater than 10GB +// 10000000000` - The backup's size is greater than 10GB * +// `backup_schedules:daily` - The backup is created from a schedule with +// "daily" in its name. func (c *ProjectsInstancesBackupsListCall) Filter(filter string) *ProjectsInstancesBackupsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index e0205577440..7874fd5409b 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240724", + "revision": "20240814", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2720,6 +2720,10 @@ "format": "google-datetime", "type": "string" }, + "preferredSecondaryZone": { + "description": "Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types.", + "type": "string" + }, "preferredZone": { "description": "Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.", "type": "string" @@ -2791,7 +2795,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2844,7 +2847,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -2883,7 +2885,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3100,7 +3101,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3153,7 +3153,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3192,7 +3191,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3854,7 +3852,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3907,7 +3904,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3946,7 +3942,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -6293,9 +6288,9 @@ "The database's built-in user type.", "Cloud IAM user.", "Cloud IAM service account.", - "Cloud IAM group non-login user.", - "Cloud IAM group login user.", - "Cloud IAM group login service account." + "Cloud IAM group. Not used for login.", + "Read-only. Login for a user that belongs to the Cloud IAM group.", + "Read-only. Login for a service account that belongs to the Cloud IAM group." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 634534f0894..7c191572660 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -770,6 +770,11 @@ type CloneContext struct { // PointInTime: Timestamp, if specified, identifies the time to which the // source instance is cloned. PointInTime string `json:"pointInTime,omitempty"` + // PreferredSecondaryZone: Optional. Copy clone and point-in-time recovery + // clone of a regional instance in the specified zones. If not specified, clone + // to the same secondary zone as the source instance. This value cannot be the + // same as the preferred_zone field. This field applies to all DB types. + PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` // PreferredZone: Optional. Copy clone and point-in-time recovery clone of an // instance to the specified zone. If no zone is specified, clone to the same // primary zone as the source instance. This field applies to all DB types. @@ -871,8 +876,6 @@ type ConnectSettings struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1118,8 +1121,6 @@ type DatabaseInstance struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1898,8 +1899,6 @@ type Flag struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -4671,9 +4670,11 @@ type User struct { // "BUILT_IN" - The database's built-in user type. // "CLOUD_IAM_USER" - Cloud IAM user. // "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account. - // "CLOUD_IAM_GROUP" - Cloud IAM group non-login user. - // "CLOUD_IAM_GROUP_USER" - Cloud IAM group login user. - // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Cloud IAM group login service account. + // "CLOUD_IAM_GROUP" - Cloud IAM group. Not used for login. + // "CLOUD_IAM_GROUP_USER" - Read-only. Login for a user that belongs to the + // Cloud IAM group. + // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account + // that belongs to the Cloud IAM group. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 103d8f79fae..ac7fa63ea16 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240724", + "revision": "20240814", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2720,6 +2720,10 @@ "format": "google-datetime", "type": "string" }, + "preferredSecondaryZone": { + "description": "Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field.", + "type": "string" + }, "preferredZone": { "description": "Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance.", "type": "string" @@ -2791,7 +2795,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2844,7 +2847,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -2883,7 +2885,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3100,7 +3101,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3153,7 +3153,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3192,7 +3191,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3855,7 +3853,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3908,7 +3905,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3947,7 +3943,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -6292,9 +6287,9 @@ "The database's built-in user type.", "Cloud IAM user.", "Cloud IAM service account.", - "Cloud IAM group non-login user.", - "Cloud IAM group login user.", - "Cloud IAM group service account." + "Cloud IAM group. Not used for login.", + "Read-only. Login for a user that belongs to the Cloud IAM group.", + "Read-only. Login for a service account that belongs to the Cloud IAM group." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index dcce80c9abb..67ee4666614 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -769,6 +769,11 @@ type CloneContext struct { // PointInTime: Timestamp, if specified, identifies the time to which the // source instance is cloned. PointInTime string `json:"pointInTime,omitempty"` + // PreferredSecondaryZone: Optional. Copy clone and point-in-time recovery + // clone of a regional instance in the specified zones. If not specified, clone + // to the same secondary zone as the source instance. This value cannot be the + // same as the preferred_zone field. + PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` // PreferredZone: Optional. Copy clone and point-in-time recovery clone of an // instance to the specified zone. If no zone is specified, clone to the same // primary zone as the source instance. @@ -870,8 +875,6 @@ type ConnectSettings struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1117,8 +1120,6 @@ type DatabaseInstance struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1899,8 +1900,6 @@ type Flag struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -4672,9 +4671,11 @@ type User struct { // "BUILT_IN" - The database's built-in user type. // "CLOUD_IAM_USER" - Cloud IAM user. // "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account. - // "CLOUD_IAM_GROUP" - Cloud IAM group non-login user. - // "CLOUD_IAM_GROUP_USER" - Cloud IAM group login user. - // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Cloud IAM group service account. + // "CLOUD_IAM_GROUP" - Cloud IAM group. Not used for login. + // "CLOUD_IAM_GROUP_USER" - Read-only. Login for a user that belongs to the + // Cloud IAM group. + // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account + // that belongs to the Cloud IAM group. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index 40e02ac1298..d829cc1715f 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -199,6 +199,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "deleteExecutionHistory": { + "description": "Deletes all step entries for an execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:deleteExecutionHistory", + "httpMethod": "POST", + "id": "workflowexecutions.projects.locations.workflows.executions.deleteExecutionHistory", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the execution for which step entries should be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:deleteExecutionHistory", + "request": { + "$ref": "DeleteExecutionHistoryRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "exportData": { "description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData", @@ -384,6 +412,22 @@ "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/stepEntries/[^/]+$", "required": true, "type": "string" + }, + "view": { + "deprecated": true, + "description": "Deprecated field.", + "enum": [ + "EXECUTION_ENTRY_VIEW_UNSPECIFIED", + "EXECUTION_ENTRY_VIEW_BASIC", + "EXECUTION_ENTRY_VIEW_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.", + "Include all data." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -404,7 +448,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", + "description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", "location": "query", "type": "string" }, @@ -425,7 +469,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/", + "description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", "required": true, @@ -436,6 +480,22 @@ "format": "int32", "location": "query", "type": "integer" + }, + "view": { + "deprecated": true, + "description": "Deprecated field.", + "enum": [ + "EXECUTION_ENTRY_VIEW_UNSPECIFIED", + "EXECUTION_ENTRY_VIEW_BASIC", + "EXECUTION_ENTRY_VIEW_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.", + "Include all data." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/stepEntries", @@ -457,7 +517,7 @@ } } }, - "revision": "20240715", + "revision": "20240813", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "Callback": { @@ -497,6 +557,18 @@ "properties": {}, "type": "object" }, + "DeleteExecutionHistoryRequest": { + "description": "Request for the DeleteExecutionHistory method.", + "id": "DeleteExecutionHistoryRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, "Error": { "description": "Error describes why the execution was abnormally terminated.", "id": "Error", @@ -1012,6 +1084,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "variableData": { + "$ref": "VariableData", + "description": "Output only. The VariableData associated to this step.", + "readOnly": true } }, "type": "object" @@ -1080,6 +1157,20 @@ } }, "type": "object" + }, + "VariableData": { + "description": "VariableData contains the variable data for this step.", + "id": "VariableData", + "properties": { + "variables": { + "additionalProperties": { + "type": "any" + }, + "description": "Variables that are associated with this step.", + "type": "object" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 17bf51450b9..f060013906a 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -259,6 +259,20 @@ func (s Callback) MarshalJSON() ([]byte, error) { type CancelExecutionRequest struct { } +// DeleteExecutionHistoryRequest: Request for the DeleteExecutionHistory +// method. +type DeleteExecutionHistoryRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + // Error: Error describes why the execution was abnormally terminated. type Error struct { // Context: Human-readable stack trace string. @@ -839,6 +853,8 @@ type StepEntry struct { StepType string `json:"stepType,omitempty"` // UpdateTime: Output only. The most recently updated time of the step entry. UpdateTime string `json:"updateTime,omitempty"` + // VariableData: Output only. The VariableData associated to this step. + VariableData *VariableData `json:"variableData,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -939,6 +955,28 @@ func (s TriggerPubsubExecutionRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VariableData: VariableData contains the variable data for this step. +type VariableData struct { + // Variables: Variables that are associated with this step. + Variables googleapi.RawMessage `json:"variables,omitempty"` + // ForceSendFields is a list of field names (e.g. "Variables") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Variables") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VariableData) MarshalJSON() ([]byte, error) { + type NoMethod VariableData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsWorkflowsTriggerPubsubExecutionCall struct { s *Service workflow string @@ -1249,6 +1287,110 @@ func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall struct { + s *Service + name string + deleteexecutionhistoryrequest *DeleteExecutionHistoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteExecutionHistory: Deletes all step entries for an execution. +// +// - name: Name of the execution for which step entries should be deleted. +// Format: +// projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex +// ecution}. +func (r *ProjectsLocationsWorkflowsExecutionsService) DeleteExecutionHistory(name string, deleteexecutionhistoryrequest *DeleteExecutionHistoryRequest) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + c := &ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deleteexecutionhistoryrequest = deleteexecutionhistoryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) 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.deleteexecutionhistoryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteExecutionHistory") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workflowexecutions.projects.locations.workflows.executions.deleteExecutionHistory" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsWorkflowsExecutionsExportDataCall struct { s *Service name string @@ -1850,6 +1992,21 @@ func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) Get(name string return c } +// View sets the optional parameter "view": Deprecated field. +// +// Possible values: +// +// "EXECUTION_ENTRY_VIEW_UNSPECIFIED" - The default/unset value. +// "EXECUTION_ENTRY_VIEW_BASIC" - Include basic information in the step +// +// entries. All fields in StepEntry are returned except for variable_data. +// +// "EXECUTION_ENTRY_VIEW_DETAILED" - Include all data. +func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -1953,7 +2110,7 @@ type ProjectsLocationsWorkflowsExecutionsStepEntriesListCall struct { // // - parent: Name of the workflow execution to list entries for. Format: // projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex -// ecution}/stepEntries/. +// ecution}. func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { c := &ProjectsLocationsWorkflowsExecutionsStepEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1963,9 +2120,9 @@ func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent str // Filter sets the optional parameter "filter": Filters applied to the // `[StepEntries.ListStepEntries]` results. The following fields are supported // for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, -// `stepType`, `state`. For details, see AIP-160. For example, if you are using -// the Google APIs Explorer: `state="SUCCEEDED" or `createTime>"2023-08-01" -// AND state="FAILED" +// `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you +// are using the Google APIs Explorer: `state="SUCCEEDED" or +// `createTime>"2023-08-01" AND state="FAILED" func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { c.urlParams_.Set("filter", filter) return c @@ -2007,6 +2164,21 @@ func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Skip(skip int6 return c } +// View sets the optional parameter "view": Deprecated field. +// +// Possible values: +// +// "EXECUTION_ENTRY_VIEW_UNSPECIFIED" - The default/unset value. +// "EXECUTION_ENTRY_VIEW_BASIC" - Include basic information in the step +// +// entries. All fields in StepEntry are returned except for variable_data. +// +// "EXECUTION_ENTRY_VIEW_DETAILED" - Include all data. +func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. From 70a68c2fb4fb4f05a35c726109b0d8087cf6e572 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 25 Aug 2024 00:20:18 -0700 Subject: [PATCH 3/8] feat(all): auto-regenerate discovery clients (#2753) --- connectors/v1/connectors-api.json | 57 +++++++- connectors/v1/connectors-gen.go | 52 ++++++++ notebooks/v1/notebooks-api.json | 10 +- notebooks/v1/notebooks-gen.go | 4 + notebooks/v2/notebooks-api.json | 56 +++++++- notebooks/v2/notebooks-gen.go | 151 ++++++++++++++++++++++ storage/v1/storage-api.json | 14 +- storage/v1/storage-gen.go | 4 + workstations/v1/workstations-api.json | 11 +- workstations/v1/workstations-gen.go | 15 +++ workstations/v1beta/workstations-api.json | 6 +- workstations/v1beta/workstations-gen.go | 6 + 12 files changed, 379 insertions(+), 7 deletions(-) diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index ee8b29ff060..0a33fb67cd4 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1320,6 +1320,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/endpointAttachments/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Specifies which fields of the EndpointAttachment are returned in the response. Defaults to `ENDPOINT_ATTACHMENT_VIEW_BASIC` view.", + "enum": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED", + "ENDPOINT_ATTACHMENT_VIEW_BASIC", + "ENDPOINT_ATTACHMENT_VIEW_FULL" + ], + "enumDescriptions": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED.", + "Do not include status.", + "Includes Status." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -1366,6 +1381,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Specifies which fields of the EndpointAttachment are returned in the response. Defaults to `ENDPOINT_ATTACHMENT_VIEW_BASIC` view.", + "enum": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED", + "ENDPOINT_ATTACHMENT_VIEW_BASIC", + "ENDPOINT_ATTACHMENT_VIEW_FULL" + ], + "enumDescriptions": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED.", + "Do not include status.", + "Includes Status." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/endpointAttachments", @@ -2427,7 +2457,7 @@ } } }, - "revision": "20240811", + "revision": "20240822", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -4058,6 +4088,31 @@ "description": "Required. The path of the service attachment", "type": "string" }, + "state": { + "description": "Output only. The Private Service Connect Connection Endpoint State. This value is only available in the Full view.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "ACCEPTED", + "REJECTED", + "CLOSED", + "FROZEN", + "NEEDS_ATTENTION", + "ACCEPTED_NOT_PROGRAMMED" + ], + "enumDescriptions": [ + "STATE_UNSPECIFIED.", + "The endpoint is pending acceptance by the producer.", + "The endpoint has been accepted by the producer.", + "The endpoint has been rejected by the producer.", + "The endpoint has been closed by the producer and will not serve traffic going forward.", + "The endpoint has been frozen by the producer and will not serve traffic.", + "The endpoint has been accepted by the producer, but it is not ready to serve the traffic due to producer side issues.", + "The endpoint has been accepted by the producer, but it cannot be programmed to the data plane due to invariant violation." + ], + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "Output only. Updated time.", "format": "google-datetime", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 631f6b55666..d638a811167 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1865,6 +1865,24 @@ type EndpointAttachment struct { Name string `json:"name,omitempty"` // ServiceAttachment: Required. The path of the service attachment ServiceAttachment string `json:"serviceAttachment,omitempty"` + // State: Output only. The Private Service Connect Connection Endpoint State. + // This value is only available in the Full view. + // + // Possible values: + // "STATE_UNSPECIFIED" - STATE_UNSPECIFIED. + // "PENDING" - The endpoint is pending acceptance by the producer. + // "ACCEPTED" - The endpoint has been accepted by the producer. + // "REJECTED" - The endpoint has been rejected by the producer. + // "CLOSED" - The endpoint has been closed by the producer and will not serve + // traffic going forward. + // "FROZEN" - The endpoint has been frozen by the producer and will not serve + // traffic. + // "NEEDS_ATTENTION" - The endpoint has been accepted by the producer, but it + // is not ready to serve the traffic due to producer side issues. + // "ACCEPTED_NOT_PROGRAMMED" - The endpoint has been accepted by the + // producer, but it cannot be programmed to the data plane due to invariant + // violation. + State string `json:"state,omitempty"` // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -9588,6 +9606,23 @@ func (r *ProjectsLocationsEndpointAttachmentsService) Get(name string) *Projects return c } +// View sets the optional parameter "view": Specifies which fields of the +// EndpointAttachment are returned in the response. Defaults to +// `ENDPOINT_ATTACHMENT_VIEW_BASIC` view. +// +// Possible values: +// +// "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED" - +// +// ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED. +// +// "ENDPOINT_ATTACHMENT_VIEW_BASIC" - Do not include status. +// "ENDPOINT_ATTACHMENT_VIEW_FULL" - Includes Status. +func (c *ProjectsLocationsEndpointAttachmentsGetCall) View(view string) *ProjectsLocationsEndpointAttachmentsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -9721,6 +9756,23 @@ func (c *ProjectsLocationsEndpointAttachmentsListCall) PageToken(pageToken strin return c } +// View sets the optional parameter "view": Specifies which fields of the +// EndpointAttachment are returned in the response. Defaults to +// `ENDPOINT_ATTACHMENT_VIEW_BASIC` view. +// +// Possible values: +// +// "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED" - +// +// ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED. +// +// "ENDPOINT_ATTACHMENT_VIEW_BASIC" - Do not include status. +// "ENDPOINT_ATTACHMENT_VIEW_FULL" - Includes Status. +func (c *ProjectsLocationsEndpointAttachmentsListCall) View(view string) *ProjectsLocationsEndpointAttachmentsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index 30baebd2cae..f4341260943 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -2008,7 +2008,7 @@ } } }, - "revision": "20240314", + "revision": "20240820", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2035,6 +2035,8 @@ "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", + "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3" ], @@ -2051,6 +2053,8 @@ "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", + "Accelerator type is NVIDIA H100 80GB.", + "Accelerator type is NVIDIA H100 Mega 80GB.", "(Coming soon) Accelerator type is TPU V2.", "(Coming soon) Accelerator type is TPU V3." ], @@ -4058,6 +4062,8 @@ "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", + "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3" ], @@ -4074,6 +4080,8 @@ "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", + "Accelerator type is NVIDIA H100 80GB.", + "Accelerator type is NVIDIA H100 Mega 80GB.", "(Coming soon) Accelerator type is TPU V2.", "(Coming soon) Accelerator type is TPU V3." ], diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 5841e2d61ed..75653bc72a9 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -272,6 +272,8 @@ type AcceleratorConfig struct { // Workstations. // "NVIDIA_TESLA_P4_VWS" - Accelerator type is NVIDIA Tesla P4 Virtual // Workstations. + // "NVIDIA_H100_80GB" - Accelerator type is NVIDIA H100 80GB. + // "NVIDIA_H100_MEGA_80GB" - Accelerator type is NVIDIA H100 Mega 80GB. // "TPU_V2" - (Coming soon) Accelerator type is TPU V2. // "TPU_V3" - (Coming soon) Accelerator type is TPU V3. Type string `json:"type,omitempty"` @@ -2723,6 +2725,8 @@ type SetInstanceAcceleratorRequest struct { // Workstations. // "NVIDIA_TESLA_P4_VWS" - Accelerator type is NVIDIA Tesla P4 Virtual // Workstations. + // "NVIDIA_H100_80GB" - Accelerator type is NVIDIA H100 80GB. + // "NVIDIA_H100_MEGA_80GB" - Accelerator type is NVIDIA H100 Mega 80GB. // "TPU_V2" - (Coming soon) Accelerator type is TPU V2. // "TPU_V3" - (Coming soon) Accelerator type is TPU V3. Type string `json:"type,omitempty"` diff --git a/notebooks/v2/notebooks-api.json b/notebooks/v2/notebooks-api.json index d889d9e6e42..22a4dfac4a2 100644 --- a/notebooks/v2/notebooks-api.json +++ b/notebooks/v2/notebooks-api.json @@ -550,6 +550,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "restore": { + "description": "RestoreInstance restores an Instance from a BackupSource.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:restore", + "httpMethod": "POST", + "id": "notebooks.projects.locations.instances.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:restore", + "request": { + "$ref": "RestoreInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "rollback": { "description": "Rollbacks a notebook instance to the previous version.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rollback", @@ -876,7 +904,7 @@ } } }, - "revision": "20240731", + "revision": "20240820", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1768,6 +1796,17 @@ }, "type": "object" }, + "RestoreInstanceRequest": { + "description": "Request for restoring the notebook instance from a BackupSource.", + "id": "RestoreInstanceRequest", + "properties": { + "snapshot": { + "$ref": "Snapshot", + "description": "Snapshot to be used for restore." + } + }, + "type": "object" + }, "RollbackInstanceRequest": { "description": "Request for rollbacking a notebook instance", "id": "RollbackInstanceRequest", @@ -1833,6 +1872,21 @@ }, "type": "object" }, + "Snapshot": { + "description": "Snapshot represents the snapshot of the data disk used to restore the Workbench Instance from. Refers to: compute/v1/projects/{project_id}/global/snapshots/{snapshot_id}", + "id": "Snapshot", + "properties": { + "projectId": { + "description": "Required. The project ID of the snapshot.", + "type": "string" + }, + "snapshotId": { + "description": "Required. The ID of the snapshot.", + "type": "string" + } + }, + "type": "object" + }, "StartInstanceRequest": { "description": "Request for starting a notebook instance", "id": "StartInstanceRequest", diff --git a/notebooks/v2/notebooks-gen.go b/notebooks/v2/notebooks-gen.go index df5fb7850ba..3b13b939e21 100644 --- a/notebooks/v2/notebooks-gen.go +++ b/notebooks/v2/notebooks-gen.go @@ -1364,6 +1364,29 @@ func (s ResizeDiskRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RestoreInstanceRequest: Request for restoring the notebook instance from a +// BackupSource. +type RestoreInstanceRequest struct { + // Snapshot: Snapshot to be used for restore. + Snapshot *Snapshot `json:"snapshot,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snapshot") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Snapshot") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RestoreInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreInstanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RollbackInstanceRequest: Request for rollbacking a notebook instance type RollbackInstanceRequest struct { // RevisionId: Required. Output only. Revision Id @@ -1479,6 +1502,32 @@ func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Snapshot: Snapshot represents the snapshot of the data disk used to restore +// the Workbench Instance from. Refers to: +// compute/v1/projects/{project_id}/global/snapshots/{snapshot_id} +type Snapshot struct { + // ProjectId: Required. The project ID of the snapshot. + ProjectId string `json:"projectId,omitempty"` + // SnapshotId: Required. The ID of the snapshot. + SnapshotId string `json:"snapshotId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Snapshot) MarshalJSON() ([]byte, error) { + type NoMethod Snapshot + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StartInstanceRequest: Request for starting a notebook instance type StartInstanceRequest struct { } @@ -3320,6 +3369,108 @@ func (c *ProjectsLocationsInstancesResizeDiskCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsInstancesRestoreCall struct { + s *Service + name string + restoreinstancerequest *RestoreInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: RestoreInstance restores an Instance from a BackupSource. +// +// - name: Format: +// `projects/{project_id}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Restore(name string, restoreinstancerequest *RestoreInstanceRequest) *ProjectsLocationsInstancesRestoreCall { + c := &ProjectsLocationsInstancesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restoreinstancerequest = restoreinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesRestoreCall) Context(ctx context.Context) *ProjectsLocationsInstancesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesRestoreCall) 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.restoreinstancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "notebooks.projects.locations.instances.restore" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesRollbackCall struct { s *Service name string diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 5ee9276a0b8..597daf0a724 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -43,7 +43,7 @@ "location": "me-central2" } ], - "etag": "\"34373939373134303235393739323331393435\"", + "etag": "\"38363036373236373330353534313035333932\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -4136,7 +4136,7 @@ } } }, - "revision": "20240809", + "revision": "20240819", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AnywhereCache": { @@ -4349,6 +4349,11 @@ "format": "int64", "type": "string" }, + "hardDeleteTime": { + "description": "The hard delete time of the bucket in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, "hierarchicalNamespace": { "description": "The bucket's hierarchical namespace configuration.", "properties": { @@ -4675,6 +4680,11 @@ }, "type": "object" }, + "softDeleteTime": { + "description": "The soft delete time of the bucket in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, "storageClass": { "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes).", "type": "string" diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index 8a16d773485..b16e3f227b2 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -463,6 +463,8 @@ type Bucket struct { Etag string `json:"etag,omitempty"` // Generation: The generation of this bucket. Generation int64 `json:"generation,omitempty,string"` + // HardDeleteTime: The hard delete time of the bucket in RFC 3339 format. + HardDeleteTime string `json:"hardDeleteTime,omitempty"` // HierarchicalNamespace: The bucket's hierarchical namespace configuration. HierarchicalNamespace *BucketHierarchicalNamespace `json:"hierarchicalNamespace,omitempty"` // IamConfiguration: The bucket's IAM configuration. @@ -525,6 +527,8 @@ type Bucket struct { // of time that soft-deleted objects will be retained, and cannot be // permanently deleted. SoftDeletePolicy *BucketSoftDeletePolicy `json:"softDeletePolicy,omitempty"` + // SoftDeleteTime: The soft delete time of the bucket in RFC 3339 format. + SoftDeleteTime string `json:"softDeleteTime,omitempty"` // StorageClass: The bucket's default storage class, used whenever no // storageClass is specified for a newly-created object. This defines how // objects in the bucket are stored and determines the SLA and the cost of diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index 25c276048de..cbbb6d77837 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -1195,7 +1195,7 @@ } } }, - "revision": "20240723", + "revision": "20240820", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -2374,6 +2374,10 @@ "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, + "grantWorkstationAdminRoleOnCreate": { + "description": "Optional. Grant creator of a workstation `roles/workstations.policyAdmin` role along with `roles/workstations.user` role on the workstation created by them. This allows workstation users to share access to either their entire workstation, or individual ports. Defaults to false.", + "type": "boolean" + }, "host": { "$ref": "Host", "description": "Optional. Runtime host for the workstation." @@ -2390,6 +2394,11 @@ "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", "type": "object" }, + "maxUsableWorkstations": { + "description": "Optional. Maximum number of workstations under this config a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified defaults to 0 which indicates unlimited.", + "format": "int32", + "type": "integer" + }, "name": { "description": "Identifier. Full name of this workstation configuration.", "type": "string" diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index dbec8df6886..e884f50b230 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -1876,6 +1876,12 @@ type WorkstationConfig struct { // delete requests to make sure that the client has an up-to-date value before // proceeding. Etag string `json:"etag,omitempty"` + // GrantWorkstationAdminRoleOnCreate: Optional. Grant creator of a workstation + // `roles/workstations.policyAdmin` role along with `roles/workstations.user` + // role on the workstation created by them. This allows workstation users to + // share access to either their entire workstation, or individual ports. + // Defaults to false. + GrantWorkstationAdminRoleOnCreate bool `json:"grantWorkstationAdminRoleOnCreate,omitempty"` // Host: Optional. Runtime host for the workstation. Host *Host `json:"host,omitempty"` // IdleTimeout: Optional. Number of seconds to wait before automatically @@ -1891,6 +1897,15 @@ type WorkstationConfig struct { // applied to the workstation configuration and that are also propagated to the // underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` + // MaxUsableWorkstations: Optional. Maximum number of workstations under this + // config a user can have `workstations.workstation.use` permission on. Only + // enforced on CreateWorkstation API calls on the user issuing the API request. + // Can be overridden by: - granting a user + // workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, + // or - having a user with that permission create a workstation and granting + // another user `workstations.workstation.use` permission on that workstation. + // If not specified defaults to 0 which indicates unlimited. + MaxUsableWorkstations int64 `json:"maxUsableWorkstations,omitempty"` // Name: Identifier. Full name of this workstation configuration. Name string `json:"name,omitempty"` // PersistentDirectories: Optional. Directories to persist across workstation diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 9a59a79eed1..9396cd533a3 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -1127,7 +1127,7 @@ } } }, - "revision": "20240803", + "revision": "20240820", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -2356,6 +2356,10 @@ "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, + "grantWorkstationAdminRoleOnCreate": { + "description": "Optional. Grant creator of a workstation `roles/workstations.policyAdmin` role along with `roles/workstations.user` role on the workstation created by them. This allows workstation users to share access to either their entire workstation, or individual ports. Defaults to false.", + "type": "boolean" + }, "host": { "$ref": "Host", "description": "Optional. Runtime host for the workstation." diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 3388f1c8371..63e98651639 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -1941,6 +1941,12 @@ type WorkstationConfig struct { // delete requests to make sure that the client has an up-to-date value before // proceeding. Etag string `json:"etag,omitempty"` + // GrantWorkstationAdminRoleOnCreate: Optional. Grant creator of a workstation + // `roles/workstations.policyAdmin` role along with `roles/workstations.user` + // role on the workstation created by them. This allows workstation users to + // share access to either their entire workstation, or individual ports. + // Defaults to false. + GrantWorkstationAdminRoleOnCreate bool `json:"grantWorkstationAdminRoleOnCreate,omitempty"` // Host: Optional. Runtime host for the workstation. Host *Host `json:"host,omitempty"` // HttpOptions: Optional. HTTP options that customize the behavior of the From 3f3bd668270c5baff4e058dd572ba85cd12ead4d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 26 Aug 2024 00:22:20 -0700 Subject: [PATCH 4/8] feat(all): auto-regenerate discovery clients (#2755) --- dataplex/v1/dataplex-api.json | 810 +++- dataplex/v1/dataplex-gen.go | 7049 ++++++++++++++++++++----------- privateca/v1/privateca-api.json | 6 +- privateca/v1/privateca-gen.go | 5 + 4 files changed, 5316 insertions(+), 2554 deletions(-) diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index e89d993714e..5d121278879 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -199,6 +199,129 @@ ] } } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "dataplex.organizations.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "dataplex.organizations.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "dataplex.organizations.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listOperations": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "dataplex.organizations.locations.operations.listOperations", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -2396,6 +2519,97 @@ } } }, + "entryLinkTypes": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryLinkTypes.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryLinkTypes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryLinkTypes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "entryTypes": { "methods": { "create": { @@ -2742,17 +2956,201 @@ "required": true, "type": "string" } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "categories": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.glossaries.categories.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.categories.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.categories.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "terms": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.glossaries.terms.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.terms.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.terms.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -5599,9 +5997,397 @@ } } }, - "revision": "20240802", + "revision": "20240820", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { + "CloudReliabilityZicyWs3DataplaneProtosAssetLocation": { + "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocation", + "properties": { + "ccfeRmsPath": { + "description": "Spanner path of the CCFE RMS database. It is only applicable for CCFE tenants that use CCFE RMS for storing resource metadata.", + "type": "string" + }, + "expected": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations", + "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." + }, + "extraParameters": { + "description": "Defines extra parameters required for specific asset types.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosExtraParameter" + }, + "type": "array" + }, + "locationData": { + "description": "Contains all kinds of physical location definitions for this asset.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosLocationData" + }, + "type": "array" + }, + "parentAsset": { + "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations": { + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations", + "properties": { + "requirementOverride": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride", + "description": "Explicit overrides for ZI and ZS requirements to be used for resources that should be excluded from ZI/ZS verification logic." + }, + "ziOrgPolicy": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionPolicy": { + "enum": [ + "ZI_REGION_POLICY_UNSPECIFIED", + "ZI_REGION_POLICY_UNKNOWN", + "ZI_REGION_POLICY_NOT_SET", + "ZI_REGION_POLICY_FAIL_OPEN", + "ZI_REGION_POLICY_FAIL_CLOSED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionState": { + "enum": [ + "ZI_REGION_UNSPECIFIED", + "ZI_REGION_UNKNOWN", + "ZI_REGION_NOT_ENABLED", + "ZI_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zoneIsolation": { + "deprecated": true, + "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zoneSeparation": { + "deprecated": true, + "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsOrgPolicy": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsRegionState": { + "enum": [ + "ZS_REGION_UNSPECIFIED", + "ZS_REGION_UNKNOWN", + "ZS_REGION_NOT_ENABLED", + "ZS_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking of the asset ZS-bit is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride": { + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride", + "properties": { + "ziOverride": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zsOverride": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation": { + "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", + "id": "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation", + "properties": { + "policyId": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosCloudAsset": { + "id": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset", + "properties": { + "assetName": { + "type": "string" + }, + "assetType": { + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition": { + "id": "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition", + "properties": { + "childAsset": { + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment": { + "id": "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment", + "properties": { + "location": { + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosExtraParameter": { + "description": "Defines parameters that should only be used for specific asset types.", + "id": "CloudReliabilityZicyWs3DataplaneProtosExtraParameter", + "properties": { + "regionalMigDistributionPolicy": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy", + "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment": { + "id": "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment", + "properties": { + "location": { + "type": "string" + }, + "locationType": { + "enum": [ + "UNSPECIFIED", + "CLUSTER", + "POP", + "CLOUD_ZONE", + "CLOUD_REGION", + "MULTI_REGION_GEO", + "MULTI_REGION_JURISDICTION", + "GLOBAL", + "OTHER" + ], + "enumDescriptions": [ + "", + "1-10: Physical failure domains.", + "", + "11-20: Logical failure domains.", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosLocationData": { + "id": "CloudReliabilityZicyWs3DataplaneProtosLocationData", + "properties": { + "blobstoreLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation" + }, + "childAssetLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition" + }, + "directLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment" + }, + "gcpProjectProxy": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy" + }, + "placerLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation" + }, + "spannerLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation": { + "description": "Message describing that the location of the customer resource is tied to placer allocations", + "id": "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation", + "properties": { + "placerConfig": { + "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy": { + "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", + "id": "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy", + "properties": { + "targetShape": { + "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", + "format": "int32", + "type": "integer" + }, + "zones": { + "description": "Cloud zones used by regional MIG to create instances.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation": { + "id": "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation", + "properties": { + "backupName": { + "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", + "items": { + "type": "string" + }, + "type": "array" + }, + "dbName": { + "description": "Set of databases used by the resource in format /span//", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy": { + "id": "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy", + "properties": { + "projectNumbers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration": { + "id": "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration", + "properties": { + "zone": { + "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", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 07eb76e2755..eccf899e4a8 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -172,6 +172,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.EncryptionConfigs = NewOrganizationsLocationsEncryptionConfigsService(s) + rs.Operations = NewOrganizationsLocationsOperationsService(s) return rs } @@ -179,6 +180,8 @@ type OrganizationsLocationsService struct { s *Service EncryptionConfigs *OrganizationsLocationsEncryptionConfigsService + + Operations *OrganizationsLocationsOperationsService } func NewOrganizationsLocationsEncryptionConfigsService(s *Service) *OrganizationsLocationsEncryptionConfigsService { @@ -190,6 +193,15 @@ type OrganizationsLocationsEncryptionConfigsService struct { s *Service } +func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService { + rs := &OrganizationsLocationsOperationsService{s: s} + return rs +} + +type OrganizationsLocationsOperationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -209,6 +221,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DataScans = NewProjectsLocationsDataScansService(s) rs.DataTaxonomies = NewProjectsLocationsDataTaxonomiesService(s) rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) + rs.EntryLinkTypes = NewProjectsLocationsEntryLinkTypesService(s) rs.EntryTypes = NewProjectsLocationsEntryTypesService(s) rs.Glossaries = NewProjectsLocationsGlossariesService(s) rs.GovernanceRules = NewProjectsLocationsGovernanceRulesService(s) @@ -231,6 +244,8 @@ type ProjectsLocationsService struct { EntryGroups *ProjectsLocationsEntryGroupsService + EntryLinkTypes *ProjectsLocationsEntryLinkTypesService + EntryTypes *ProjectsLocationsEntryTypesService Glossaries *ProjectsLocationsGlossariesService @@ -325,6 +340,15 @@ type ProjectsLocationsEntryGroupsEntriesService struct { s *Service } +func NewProjectsLocationsEntryLinkTypesService(s *Service) *ProjectsLocationsEntryLinkTypesService { + rs := &ProjectsLocationsEntryLinkTypesService{s: s} + return rs +} + +type ProjectsLocationsEntryLinkTypesService struct { + s *Service +} + func NewProjectsLocationsEntryTypesService(s *Service) *ProjectsLocationsEntryTypesService { rs := &ProjectsLocationsEntryTypesService{s: s} return rs @@ -336,11 +360,35 @@ type ProjectsLocationsEntryTypesService struct { func NewProjectsLocationsGlossariesService(s *Service) *ProjectsLocationsGlossariesService { rs := &ProjectsLocationsGlossariesService{s: s} + rs.Categories = NewProjectsLocationsGlossariesCategoriesService(s) + rs.Terms = NewProjectsLocationsGlossariesTermsService(s) return rs } type ProjectsLocationsGlossariesService struct { s *Service + + Categories *ProjectsLocationsGlossariesCategoriesService + + Terms *ProjectsLocationsGlossariesTermsService +} + +func NewProjectsLocationsGlossariesCategoriesService(s *Service) *ProjectsLocationsGlossariesCategoriesService { + rs := &ProjectsLocationsGlossariesCategoriesService{s: s} + return rs +} + +type ProjectsLocationsGlossariesCategoriesService struct { + s *Service +} + +func NewProjectsLocationsGlossariesTermsService(s *Service) *ProjectsLocationsGlossariesTermsService { + rs := &ProjectsLocationsGlossariesTermsService{s: s} + return rs +} + +type ProjectsLocationsGlossariesTermsService struct { + s *Service } func NewProjectsLocationsGovernanceRulesService(s *Service) *ProjectsLocationsGovernanceRulesService { @@ -535,6 +583,428 @@ type ProjectsLocationsOperationsService struct { s *Service } +// CloudReliabilityZicyWs3DataplaneProtosAssetLocation: Provides the mapping of +// a cloud asset to a direct physical location or to a proxy that defines the +// location on its behalf. +type CloudReliabilityZicyWs3DataplaneProtosAssetLocation struct { + // CcfeRmsPath: Spanner path of the CCFE RMS database. It is only applicable + // for CCFE tenants that use CCFE RMS for storing resource metadata. + CcfeRmsPath string `json:"ccfeRmsPath,omitempty"` + // Expected: Defines the customer expectation around ZI/ZS for this asset and + // ZI/ZS state of the region at the time of asset creation. + Expected *CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations `json:"expected,omitempty"` + // ExtraParameters: Defines extra parameters required for specific asset types. + ExtraParameters []*CloudReliabilityZicyWs3DataplaneProtosExtraParameter `json:"extraParameters,omitempty"` + // LocationData: Contains all kinds of physical location definitions for this + // asset. + LocationData []*CloudReliabilityZicyWs3DataplaneProtosLocationData `json:"locationData,omitempty"` + // ParentAsset: Defines parents assets if any in order to allow later + // generation of child_asset_location data via child assets. + ParentAsset []*CloudReliabilityZicyWs3DataplaneProtosCloudAsset `json:"parentAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "CcfeRmsPath") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CcfeRmsPath") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosAssetLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations struct { + // RequirementOverride: Explicit overrides for ZI and ZS requirements to be + // used for resources that should be excluded from ZI/ZS verification logic. + RequirementOverride *CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride `json:"requirementOverride,omitempty"` + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` + // Possible values: + // "ZI_REGION_POLICY_UNSPECIFIED" + // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_POLICY_NOT_SET" + // "ZI_REGION_POLICY_FAIL_OPEN" + // "ZI_REGION_POLICY_FAIL_CLOSED" + ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` + // Possible values: + // "ZI_REGION_UNSPECIFIED" + // "ZI_REGION_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_NOT_ENABLED" + // "ZI_REGION_ENABLED" + ZiRegionState string `json:"ziRegionState,omitempty"` + // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and + // zi_region_state instead for setting ZI expectations as per + // go/zicy-publish-physical-location. + // + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZoneIsolation string `json:"zoneIsolation,omitempty"` + // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead + // for setting Zs expectations as per go/zicy-publish-physical-location. + // + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZoneSeparation string `json:"zoneSeparation,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` + // Possible values: + // "ZS_REGION_UNSPECIFIED" + // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not + // available + // "ZS_REGION_NOT_ENABLED" + // "ZS_REGION_ENABLED" + ZsRegionState string `json:"zsRegionState,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequirementOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequirementOverride") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride struct { + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOverride string `json:"ziOverride,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOverride string `json:"zsOverride,omitempty"` + // ForceSendFields is a list of field names (e.g. "ZiOverride") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ZiOverride") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation: Policy ID that +// identified data placement in Blobstore as per +// go/blobstore-user-guide#data-metadata-placement-and-failure-domains +type CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation struct { + PolicyId []string `json:"policyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PolicyId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PolicyId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosCloudAsset struct { + AssetName string `json:"assetName,omitempty"` + AssetType string `json:"assetType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssetName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssetName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosCloudAsset) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosCloudAsset + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition struct { + ChildAsset []*CloudReliabilityZicyWs3DataplaneProtosCloudAsset `json:"childAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildAsset") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChildAsset") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment struct { + Location []*CloudReliabilityZicyWs3DataplaneProtosLocationAssignment `json:"location,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosExtraParameter: Defines parameters +// that should only be used for specific asset types. +type CloudReliabilityZicyWs3DataplaneProtosExtraParameter struct { + // RegionalMigDistributionPolicy: Details about zones used by regional + // compute.googleapis.com/InstanceGroupManager to create instances. + RegionalMigDistributionPolicy *CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RegionalMigDistributionPolicy") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionalMigDistributionPolicy") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosExtraParameter) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosExtraParameter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosLocationAssignment struct { + Location string `json:"location,omitempty"` + // Possible values: + // "UNSPECIFIED" + // "CLUSTER" - 1-10: Physical failure domains. + // "POP" + // "CLOUD_ZONE" - 11-20: Logical failure domains. + // "CLOUD_REGION" + // "MULTI_REGION_GEO" + // "MULTI_REGION_JURISDICTION" + // "GLOBAL" + // "OTHER" + LocationType string `json:"locationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosLocationData struct { + BlobstoreLocation *CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation `json:"blobstoreLocation,omitempty"` + ChildAssetLocation *CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition `json:"childAssetLocation,omitempty"` + DirectLocation *CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment `json:"directLocation,omitempty"` + GcpProjectProxy *CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy `json:"gcpProjectProxy,omitempty"` + PlacerLocation *CloudReliabilityZicyWs3DataplaneProtosPlacerLocation `json:"placerLocation,omitempty"` + SpannerLocation *CloudReliabilityZicyWs3DataplaneProtosSpannerLocation `json:"spannerLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlobstoreLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosLocationData) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosLocationData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosPlacerLocation: Message describing +// that the location of the customer resource is tied to placer allocations +type CloudReliabilityZicyWs3DataplaneProtosPlacerLocation struct { + // PlacerConfig: Directory with a config related to it in placer (e.g. + // "/placer/prod/home/my-root/my-dir") + PlacerConfig string `json:"placerConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlacerConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PlacerConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosPlacerLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosPlacerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy: To be +// used for specifying the intended distribution of regional +// compute.googleapis.com/InstanceGroupManager instances +type CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy struct { + // TargetShape: The shape in which the group converges around distribution of + // resources. Instance of proto2 enum + TargetShape int64 `json:"targetShape,omitempty"` + // Zones: Cloud zones used by regional MIG to create instances. + Zones []*CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration `json:"zones,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetShape") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TargetShape") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosSpannerLocation struct { + // BackupName: Set of backups used by the resource with name in the same format + // as what is available at http://table/spanner_automon.backup_metadata + BackupName []string `json:"backupName,omitempty"` + // DbName: Set of databases used by the resource in format /span// + DbName []string `json:"dbName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosSpannerLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosSpannerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy struct { + ProjectNumbers []string `json:"projectNumbers,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectNumbers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectNumbers") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration struct { + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Zone") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration + 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 @@ -8244,66 +8714,68 @@ func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) Do(opts return ret, nil } -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { + c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsOperationsCancelCall) 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.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8314,13 +8786,12 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.get" call. +// Do executes the "dataplex.organizations.locations.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8339,7 +8810,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8352,90 +8823,57 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this service. +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// google.rpc.Code.UNIMPLEMENTED. // -// - name: The resource that owns the locations collection, if applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *OrganizationsLocationsOperationsService) Delete(name string) *OrganizationsLocationsOperationsDeleteCall { + c := &OrganizationsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": A filter to narrow down results -// to a preferred subset. The filtering language accepts strings like -// "displayName=tokyo", and is documented in more detail in AIP-160 -// (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token received -// from the next_page_token field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -8446,13 +8884,12 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.list" call. +// Do executes the "dataplex.organizations.locations.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8471,7 +8908,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8484,28 +8921,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLookupEntryCall struct { +type OrganizationsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -8514,68 +8930,21 @@ type ProjectsLocationsLookupEntryCall struct { header_ http.Header } -// LookupEntry: Looks up a single Entry by name using the permission on the -// source system. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The project to which the request should be attributed in the -// following form: projects/{project}/locations/{location}. -func (r *ProjectsLocationsService) LookupEntry(name string) *ProjectsLocationsLookupEntryCall { - c := &ProjectsLocationsLookupEntryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects -// returned to the provided aspect types. It only works for CUSTOM view. -func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) - return c -} - -// Entry sets the optional parameter "entry": Required. The resource name of -// the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{en -// try}. -func (c *ProjectsLocationsLookupEntryCall) Entry(entry string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.Set("entry", entry) - return c -} - -// Paths sets the optional parameter "paths": Limits the aspects returned to -// those associated with the provided paths within the Entry. It only works for -// CUSTOM view. -func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// View sets the optional parameter "view": View to control which parts of an -// entry the service should return. -// -// Possible values: -// -// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. -// "BASIC" - Returns entry only, without aspects. -// "FULL" - Returns all required aspects as well as the keys of all -// -// non-required aspects. -// -// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If -// -// the number of aspects exceeds 100, the first 100 will be returned. -// -// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the -// -// first 100 will be returned. -func (c *ProjectsLocationsLookupEntryCall) View(view string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.Set("view", view) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8583,27 +8952,27 @@ func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *Project // 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 *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLookupEntryCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -8611,7 +8980,7 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupEntry") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8624,13 +8993,13 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lookupEntry" call. +// Do executes the "dataplex.organizations.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8649,7 +9018,7 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8662,93 +9031,88 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsSearchEntriesCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsListOperationsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SearchEntries: Searches for Entries matching the given query and scope. +// ListOperations: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// UNIMPLEMENTED. // -// - name: The project to which the request should be attributed in the -// following form: projects/{project}/locations/{location}. -func (r *ProjectsLocationsService) SearchEntries(name string) *ProjectsLocationsSearchEntriesCall { - c := &ProjectsLocationsSearchEntriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) ListOperations(name string) *OrganizationsLocationsOperationsListOperationsCall { + c := &OrganizationsLocationsOperationsListOperationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering of -// results. -func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("orderBy", orderBy) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *OrganizationsLocationsOperationsListOperationsCall) Filter(filter string) *OrganizationsLocationsOperationsListOperationsCall { + c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Number of results in the -// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. -// Throws an invalid argument for page_size > 1000. -func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *OrganizationsLocationsOperationsListOperationsCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListOperationsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous SearchEntries call. Provide this to retrieve the subsequent page. -func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *OrganizationsLocationsOperationsListOperationsCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListOperationsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Query sets the optional parameter "query": Required. The query against which -// entries in scope should be matched. -func (c *ProjectsLocationsSearchEntriesCall) Query(query string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("query", query) - return c -} - -// Scope sets the optional parameter "scope": The scope under which the search -// should be operating. It must either be organizations/ or projects/. If it is -// unspecified, it defaults to the organization where the project provided in -// name is located. -func (c *ProjectsLocationsSearchEntriesCall) Scope(scope string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("scope", scope) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { +func (c *OrganizationsLocationsOperationsListOperationsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListOperationsCall { 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 *OrganizationsLocationsOperationsListOperationsCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListOperationsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { +func (c *OrganizationsLocationsOperationsListOperationsCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListOperationsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSearchEntriesCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsListOperationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsListOperationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:searchEntries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -8759,13 +9123,13 @@ func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.searchEntries" call. +// Do executes the "dataplex.organizations.locations.operations.listOperations" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1SearchEntriesResponse.ServerResponse.Header or (if a +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, error) { +func (c *OrganizationsLocationsOperationsListOperationsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8784,7 +9148,7 @@ func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1SearchEntriesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8800,7 +9164,7 @@ func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (* // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) error) error { +func (c *OrganizationsLocationsOperationsListOperationsCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -8818,94 +9182,83 @@ func (c *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsAspectTypesCreateCall struct { - s *Service - parent string - googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an AspectType. +// Get: Gets information about a location. // -// - parent: The resource name of the AspectType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsAspectTypesService) Create(parent string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesCreateCall { - c := &ProjectsLocationsAspectTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype - return c -} - -// AspectTypeId sets the optional parameter "aspectTypeId": Required. -// AspectType identifier. -func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("aspectTypeId", aspectTypeId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesCreateCall) 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.googleclouddataplexv1aspecttype) - if err != nil { - return nil, err +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.create" call. +// Do executes the "dataplex.projects.locations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8924,7 +9277,7 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8937,64 +9290,90 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsAspectTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an AspectType. +// List: Lists information about the supported locations for this service. // -// - name: The resource name of the AspectType: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { - c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteAspectTypeRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsAspectTypesDeleteCall) Etag(etag string) *ProjectsLocationsAspectTypesDeleteCall { - c.urlParams_.Set("etag", etag) +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the next_page_token field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9005,13 +9384,13 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.delete" call. +// Do executes the "dataplex.projects.locations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9030,7 +9409,7 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9043,7 +9422,28 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsAspectTypesGetCall struct { +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsLookupEntryCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9052,49 +9452,1553 @@ type ProjectsLocationsAspectTypesGetCall struct { header_ http.Header } -// Get: Gets an AspectType. +// LookupEntry: Looks up a single Entry by name using the permission on the +// source system. // -// - name: The resource name of the AspectType: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Get(name string) *ProjectsLocationsAspectTypesGetCall { - c := &ProjectsLocationsAspectTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) LookupEntry(name string) *ProjectsLocationsLookupEntryCall { + c := &ProjectsLocationsLookupEntryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsAspectTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects +// returned to the provided aspect types. It only works for CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) 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 *ProjectsLocationsAspectTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetCall { - c.ifNoneMatch_ = entityTag +// Entry sets the optional parameter "entry": Required. The resource name of +// the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{en +// try}. +func (c *ProjectsLocationsLookupEntryCall) Entry(entry string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("entry", entry) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects returned to +// those associated with the provided paths within the Entry. It only works for +// CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View to control which parts of an +// entry the service should return. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If +// +// the number of aspects exceeds 100, the first 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the +// +// first 100 will be returned. +func (c *ProjectsLocationsLookupEntryCall) View(view string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("view", view) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsLookupEntryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupEntry") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lookupEntry" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, 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 := &GoogleCloudDataplexV1Entry{ + 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 ProjectsLocationsSearchEntriesCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchEntries: Searches for Entries matching the given query and scope. +// +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) SearchEntries(name string) *ProjectsLocationsSearchEntriesCall { + c := &ProjectsLocationsSearchEntriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. +func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results in the +// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. +// Throws an invalid argument for page_size > 1000. +func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous SearchEntries call. Provide this to retrieve the subsequent page. +func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Required. The query against which +// entries in scope should be matched. +func (c *ProjectsLocationsSearchEntriesCall) Query(query string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("query", query) + return c +} + +// Scope sets the optional parameter "scope": The scope under which the search +// should be operating. It must either be organizations/ or projects/. If it is +// unspecified, it defaults to the organization where the project provided in +// name is located. +func (c *ProjectsLocationsSearchEntriesCall) Scope(scope string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("scope", scope) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSearchEntriesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:searchEntries") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.searchEntries" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1SearchEntriesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, 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 := &GoogleCloudDataplexV1SearchEntriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsAspectTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an AspectType. +// +// - parent: The resource name of the AspectType, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsAspectTypesService) Create(parent string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesCreateCall { + c := &ProjectsLocationsAspectTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// AspectTypeId sets the optional parameter "aspectTypeId": Required. +// AspectType identifier. +func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("aspectTypeId", aspectTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesCreateCall) 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.googleclouddataplexv1aspecttype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + 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 "dataplex.projects.locations.aspectTypes.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an AspectType. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { + c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value, the DeleteAspectTypeRequest method +// returns an ABORTED error response. +func (c *ProjectsLocationsAspectTypesDeleteCall) Etag(etag string) *ProjectsLocationsAspectTypesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an AspectType. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Get(name string) *ProjectsLocationsAspectTypesGetCall { + c := &ProjectsLocationsAspectTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1AspectType.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1AspectType, 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 := &GoogleCloudDataplexV1AspectType{ + 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 ProjectsLocationsAspectTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c := &ProjectsLocationsAspectTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists AspectType resources in a project and location. +// +// - parent: The resource name of the AspectType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsAspectTypesService) List(parent string) *ProjectsLocationsAspectTypesListCall { + c := &ProjectsLocationsAspectTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"These restrictions can be conjoined with +// AND, OR, and NOT conjunctions. +func (c *ProjectsLocationsAspectTypesListCall) Filter(filter string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Orders the result by name or +// create_time fields. If not specified, the ordering is undefined. +func (c *ProjectsLocationsAspectTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AspectTypes to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 AspectTypes. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsAspectTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListAspectTypes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provide to ListAspectTypes +// must match the call that provided the page token. +func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesListCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + 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 "dataplex.projects.locations.aspectTypes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1ListAspectTypesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAspectTypesResponse, 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 := &GoogleCloudDataplexV1ListAspectTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAspectTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsAspectTypesPatchCall struct { + s *Service + name string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an AspectType. +// +// - name: Output only. The relative resource name of the AspectType, of the +// form: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Patch(name string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesPatchCall { + c := &ProjectsLocationsAspectTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsAspectTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesPatchCall) 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.googleclouddataplexv1aspecttype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c := &ProjectsLocationsAspectTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + 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 ProjectsLocationsDataAttributeBindingsCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a DataAttributeBinding resource. +// +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { + c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding + return c +} + +// DataAttributeBindingId sets the optional parameter "dataAttributeBindingId": +// Required. DataAttributeBinding identifier. * Must contain only lowercase +// letters, numbers and hyphens. * Must start with a letter. * Must be between +// 1-63 characters. * Must end with a number or a letter. * Must be unique +// within the Location. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) 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.googleclouddataplexv1dataattributebinding) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + 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 "dataplex.projects.locations.dataAttributeBindings.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataAttributeBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataAttributeBinding resource. All attributes within the +// DataAttributeBinding must be deleted before the DataAttributeBinding can be +// deleted. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da +// ta_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Required. If the client provided +// etag value does not match the current etag value, the +// DeleteDataAttributeBindingRequest method returns an ABORTED error response. +// Etags must be used when calling the DeleteDataAttributeBinding. +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetCall { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataAttributeBindings.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataAttributeBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a DataAttributeBinding resource. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da +// ta_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { + c := &ProjectsLocationsDataAttributeBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9115,13 +11019,13 @@ func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.get" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1AspectType.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1DataAttributeBinding.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1AspectType, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9140,7 +11044,7 @@ func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1AspectType{ + ret := &GoogleCloudDataplexV1DataAttributeBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9153,7 +11057,7 @@ func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsAspectTypesGetIamPolicyCall struct { +type ProjectsLocationsDataAttributeBindingsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -9168,8 +11072,8 @@ type ProjectsLocationsAspectTypesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { - c := &ProjectsLocationsAspectTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -9186,7 +11090,7 @@ func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *Pro // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -9194,7 +11098,7 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVer // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9202,27 +11106,27 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9243,13 +11147,13 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9281,7 +11185,7 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsAspectTypesListCall struct { +type ProjectsLocationsDataAttributeBindingsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -9290,47 +11194,46 @@ type ProjectsLocationsAspectTypesListCall struct { header_ http.Header } -// List: Lists AspectType resources in a project and location. +// List: Lists DataAttributeBinding resources in a project and location. // -// - parent: The resource name of the AspectType location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsAspectTypesService) List(parent string) *ProjectsLocationsAspectTypesListCall { - c := &ProjectsLocationsAspectTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location: +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { + c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. Filters are -// case-sensitive. The service supports the following formats: labels.key1 = -// "value1" labels:key1 name = "value"These restrictions can be conjoined with -// AND, OR, and NOT conjunctions. -func (c *ProjectsLocationsAspectTypesListCall) Filter(filter string) *ProjectsLocationsAspectTypesListCall { +// Filter sets the optional parameter "filter": Filter request. Filter using +// resource: filter=resource:"resource-name" Filter using attribute: +// filter=attributes:"attribute-name" Filter using attribute in paths list: +// filter=paths.attributes:"attribute-name" +func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("filter", filter) return c -} - -// OrderBy sets the optional parameter "orderBy": Orders the result by name or -// create_time fields. If not specified, the ordering is undefined. -func (c *ProjectsLocationsAspectTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAspectTypesListCall { +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// AspectTypes to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 AspectTypes. The maximum value -// is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsAspectTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAspectTypesListCall { +// DataAttributeBindings to return. The service may return fewer than this +// value. If unspecified, at most 10 DataAttributeBindings will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListAspectTypes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provide to ListAspectTypes -// must match the call that provided the page token. -func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *ProjectsLocationsAspectTypesListCall { +// a previous ListDataAttributeBindings call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// ListDataAttributeBindings must match the call that provided the page token. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -9338,7 +11241,7 @@ func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9346,27 +11249,27 @@ func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsAspectTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesListCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesListCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9374,7 +11277,7 @@ func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9387,13 +11290,15 @@ func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.list" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListAspectTypesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAspectTypesResponse, error) { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9412,7 +11317,7 @@ func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListAspectTypesResponse{ + ret := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9428,7 +11333,7 @@ func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAspectTypesResponse) error) error { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -9446,38 +11351,38 @@ func (c *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func } } -type ProjectsLocationsAspectTypesPatchCall struct { - s *Service - name string - googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataAttributeBindingsPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an AspectType. +// Patch: Updates a DataAttributeBinding resource. // -// - name: Output only. The relative resource name of the AspectType, of the -// form: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Patch(name string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesPatchCall { - c := &ProjectsLocationsAspectTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the Data Attribute +// Binding, of the form: +// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_ +// attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { + c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsAspectTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -9485,30 +11390,30 @@ func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) 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.googleclouddataplexv1aspecttype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) if err != nil { return nil, err } @@ -9527,13 +11432,13 @@ func (c *ProjectsLocationsAspectTypesPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.patch" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9565,7 +11470,7 @@ func (c *ProjectsLocationsAspectTypesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsAspectTypesSetIamPolicyCall struct { +type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -9581,8 +11486,8 @@ type ProjectsLocationsAspectTypesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { - c := &ProjectsLocationsAspectTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -9591,27 +11496,27 @@ func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, goog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -9633,13 +11538,13 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9667,189 +11572,69 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.Call target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil -} - -type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataplex.projects.locations.aspectTypes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ - 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 ProjectsLocationsDataAttributeBindingsCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a DataAttributeBinding resource. -// -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { - c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// DataAttributeBindingId sets the optional parameter "dataAttributeBindingId": -// Required. DataAttributeBinding identifier. * Must contain only lowercase -// letters, numbers and hyphens. * Must start with a letter. * Must be between -// 1-63 characters. * Must end with a number or a letter. * Must be unique -// within the Location. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) - return c + } + return ret, nil } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { + c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) 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.googleclouddataplexv1dataattributebinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9857,18 +11642,18 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.create" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9887,7 +11672,7 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9900,84 +11685,95 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataAttributeBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansCreateCall struct { + s *Service + parent string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataAttributeBinding resource. All attributes within the -// DataAttributeBinding must be deleted before the DataAttributeBinding can be -// deleted. +// Create: Creates a DataScan resource. // -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da -// ta_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to a +// project_id or project_number and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { + c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan return c } -// Etag sets the optional parameter "etag": Required. If the client provided -// etag value does not match the current etag value, the -// DeleteDataAttributeBindingRequest method returns an ABORTED error response. -// Etags must be used when calling the DeleteDataAttributeBinding. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c.urlParams_.Set("etag", etag) +// DataScanId sets the optional parameter "dataScanId": Required. DataScan +// identifier. Must contain only lowercase letters, numbers and hyphens. Must +// start with a letter. Must end with a number or a letter. Must be between +// 1-63 characters. Must be unique within the customer project / location. +func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { + c.urlParams_.Set("dataScanId", dataScanId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataScansCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataScansCreateCall) 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.googleclouddataplexv1datascan) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.delete" call. +// Do executes the "dataplex.projects.locations.dataScans.create" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10009,22 +11805,22 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataAttributeBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a DataAttributeBinding resource. +// Delete: Deletes a DataScan resource. // -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da -// ta_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { - c := &ProjectsLocationsDataAttributeBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { + c := &ProjectsLocationsDataScansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10032,45 +11828,34 @@ func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataScansDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -10081,13 +11866,13 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.get" call. +// Do executes the "dataplex.projects.locations.dataScans.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataAttributeBinding.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, error) { +func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10106,7 +11891,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttributeBinding{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10119,103 +11904,82 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataAttributeBindingsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). +func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Header() http.Header { if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + c.header_ = make(http.Header) } + return c.header_ +} + +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) 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.googleclouddataplexv1generatedataqualityrulesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.generateDataQualityRules" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10234,7 +11998,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10247,63 +12011,44 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataAttributeBindingsListCall struct { +type ProjectsLocationsDataScansGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists DataAttributeBinding resources in a project and location. +// Get: Gets a DataScan resource. // -// - parent: The resource name of the Location: -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { - c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. Filter using -// resource: filter=resource:"resource-name" Filter using attribute: -// filter=attributes:"attribute-name" Filter using attribute in paths list: -// filter=paths.attributes:"attribute-name" -func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributeBindings to return. The service may return fewer than this -// value. If unspecified, at most 10 DataAttributeBindings will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { + c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataAttributeBindings call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// ListDataAttributeBindings must match the call that provided the page token. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageToken", pageToken) +// View sets the optional parameter "view": Select the DataScan view to return. +// Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC view. +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10311,27 +12056,27 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.F // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -10339,7 +12084,7 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10347,20 +12092,18 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.list" call. +// Do executes the "dataplex.projects.locations.dataScans.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDataplexV1DataScan.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, error) { +func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10379,7 +12122,7 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ + ret := &GoogleCloudDataplexV1DataScan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10392,115 +12135,103 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataAttributeBindingsPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttributeBinding resource. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: Output only. The relative resource name of the Data Attribute -// Binding, of the form: -// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_ -// attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { - c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { + c := &ProjectsLocationsDataScansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { 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 *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) 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.googleclouddataplexv1dataattributebinding) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.patch" call. +// Do executes the "dataplex.projects.locations.dataScans.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10519,7 +12250,7 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10532,81 +12263,116 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DataScans. +// +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to a +// project_id or project_number and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { + c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("filter", filter) + return c } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// OrderBy sets the optional parameter "orderBy": Order by fields (name or +// create_time) for the result. If not specified, the ordering is undefined. +func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of dataScans +// to return. The service may return fewer than this value. If unspecified, at +// most 500 scans will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataScans call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListDataScans must match +// the call that provided the page token. +func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { 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 *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1ListDataScansResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10625,7 +12391,7 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1ListDataScansResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10638,84 +12404,115 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +type ProjectsLocationsDataScansPatchCall struct { + s *Service + name string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataScan resource. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { - c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: Output only. The relative resource name of the scan, of the form: +// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { + c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataScansPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansPatchCall) 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.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataScans.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10734,7 +12531,7 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10747,76 +12544,61 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . return ret, nil } -type ProjectsLocationsDataScansCreateCall struct { - s *Service - parent string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansRunCall struct { + s *Service + name string + googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataScan resource. +// Run: Runs an on-demand execution of a DataScan // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to a -// project_id or project_number and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { - c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan - return c -} - -// DataScanId sets the optional parameter "dataScanId": Required. DataScan -// identifier. Must contain only lowercase letters, numbers and hyphens. Must -// start with a letter. Must end with a number or a letter. Must be between -// 1-63 characters. Must be unique within the customer project / location. -func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { - c.urlParams_.Set("dataScanId", dataScanId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: The resource name of the DataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where +// project refers to a project_id or project_number and location_id refers to +// a GCP region.Only OnDemand data scans are allowed. +func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { + c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataScansRunCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansRunCall) 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.googleclouddataplexv1datascan) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1rundatascanrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10824,18 +12606,18 @@ func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.create" call. +// Do executes the "dataplex.projects.locations.dataScans.run" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1RunDataScanResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10854,7 +12636,7 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1RunDataScanResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10867,74 +12649,81 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataScan resource. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { - c := &ProjectsLocationsDataScansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { + c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataScansSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.delete" call. +// Do executes the "dataplex.projects.locations.dataScans.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10953,7 +12742,7 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10966,63 +12755,65 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { - s *Service - name string - googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateDataQualityRules: Generates recommended data quality rules based on -// the results of a data profiling scan.Use the recommendations to build rules -// for a data quality scan. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The name must be one of the following: The name of a data scan with -// at least one successful, completed data profiling job The name of a -// successful, completed data profiling job (a data scan job where the job -// type is data profiling). -func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { - c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { + c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Header() http.Header { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) 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.googleclouddataplexv1generatedataqualityrulesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11030,18 +12821,18 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.generateDataQualityRules" call. +// Do executes the "dataplex.projects.locations.dataScans.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11060,7 +12851,7 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11073,82 +12864,65 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataScansGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataScan resource. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { - c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). +func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// View sets the optional parameter "view": Select the DataScan view to return. -// Defaults to BASIC. -// -// Possible values: -// -// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC view. -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { - c.urlParams_.Set("view", view) + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansGetCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) 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.googleclouddataplexv1generatedataqualityrulesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -11159,13 +12933,13 @@ func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.get" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataScan.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, error) { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11184,7 +12958,7 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScan{ + ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11197,48 +12971,44 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsDataScansGetIamPolicyCall struct { +type ProjectsLocationsDataScansJobsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets a DataScanJob resource. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { - c := &ProjectsLocationsDataScansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the DataScanJob: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{d +// ata_scan_job_id} where project refers to a project_id or project_number +// and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { + c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// View sets the optional parameter "view": Select the DataScanJob view to +// return. Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the BASIC view. +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11246,27 +13016,27 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11274,7 +13044,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11282,18 +13052,18 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1DataScanJob.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11312,7 +13082,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1DataScanJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11325,7 +13095,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataScansListCall struct { +type ProjectsLocationsDataScansJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -11334,44 +13104,46 @@ type ProjectsLocationsDataScansListCall struct { header_ http.Header } -// List: Lists DataScans. +// List: Lists DataScanJobs under the given DataScan. // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to a -// project_id or project_number and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { - c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent environment: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { + c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the ListDataScanJobs request.If unspecified, all datascan jobs +// will be returned. Multiple filters can be applied (with AND, OR logical +// operators). Filters are case-sensitive.Allowed fields are: start_time +// end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. +// 2018-10-08T18:30:00-07:00).For instance, 'start_time > +// 2018-10-08T00:00:00.123456789Z AND end_time < +// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between +// specified start and end times. +func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Order by fields (name or -// create_time) for the result. If not specified, the ordering is undefined. -func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of dataScans -// to return. The service may return fewer than this value. If unspecified, at -// most 500 scans will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataScanJobs to return. The service may return fewer than this value. If +// unspecified, at most 10 DataScanJobs will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataScans call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListDataScans must match -// the call that provided the page token. -func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { +// a previous ListDataScanJobs call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataScanJobs +// must match the call that provided the page token. +func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11379,7 +13151,7 @@ func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11387,27 +13159,27 @@ func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *Proje // 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 *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansListCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11415,7 +13187,7 @@ func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11428,13 +13200,13 @@ func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.list" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataScansResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListDataScanJobsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { +func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11453,7 +13225,7 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScansResponse{ + ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11469,7 +13241,7 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) error) error { +func (c *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -11487,77 +13259,185 @@ func (c *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsDataScansPatchCall struct { - s *Service - name string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesCreateCall struct { + s *Service + parent string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataScan resource. +// Create: Create a DataTaxonomy resource. // -// - name: Output only. The relative resource name of the scan, of the form: -// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { - c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan +// - parent: The resource name of the data taxonomy location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { + c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// DataTaxonomyId sets the optional parameter "dataTaxonomyId": Required. +// DataTaxonomy identifier. * Must contain only lowercase letters, numbers and +// hyphens. * Must start with a letter. * Must be between 1-63 characters. * +// Must end with a number or a letter. * Must be unique within the Project. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataTaxonomiesCreateCall) 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.googleclouddataplexv1datataxonomy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + 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 "dataplex.projects.locations.dataTaxonomies.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataTaxonomiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataTaxonomy resource. All attributes within the +// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. +// +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value,the DeleteDataTaxonomy method returns +// an ABORTED error. +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c.urlParams_.Set("etag", etag) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -11568,13 +13448,13 @@ func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.patch" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11606,63 +13486,68 @@ func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDataScansRunCall struct { - s *Service - name string - googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Run: Runs an on-demand execution of a DataScan +// Get: Retrieves a DataTaxonomy resource. // -// - name: The resource name of the DataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where -// project refers to a project_id or project_number and location_id refers to -// a GCP region.Only OnDemand data scans are allowed. -func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { - c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { + c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansRunCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansRunCall) 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.googleclouddataplexv1rundatascanrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11673,13 +13558,13 @@ func (c *ProjectsLocationsDataScansRunCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.run" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1RunDataScanResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1DataTaxonomy.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11698,7 +13583,7 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1RunDataScanResponse{ + ret := &GoogleCloudDataplexV1DataTaxonomy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11711,64 +13596,86 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsDataScansSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - resource: REQUIRED: The resource for which the policy is being specified. +// - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { - c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11779,13 +13686,13 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11817,84 +13724,116 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataScansTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// List: Lists DataTaxonomy resources in a project and location. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { - c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the DataTaxonomy location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { + c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataTaxonomies to return. The service may return fewer than this value. If +// unspecified, at most 10 DataTaxonomies will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataTaxonomies call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataTaxonomies +// must match the call that provided the page token. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { 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 *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11913,7 +13852,7 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11926,65 +13865,98 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { - s *Service - name string - googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// GenerateDataQualityRules: Generates recommended data quality rules based on -// the results of a data profiling scan.Use the recommendations to build rules -// for a data quality scan. +type ProjectsLocationsDataTaxonomiesPatchCall struct { + s *Service + name string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataTaxonomy resource. // -// - name: The name must be one of the following: The name of a data scan with -// at least one successful, completed data profiling job The name of a -// successful, completed data profiling job (a data scan job where the job -// type is data profiling). -func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { - c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the DataTaxonomy, of the +// form: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { + c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) 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.googleclouddataplexv1generatedataqualityrulesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -11995,13 +13967,13 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12020,7 +13992,7 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12033,99 +14005,81 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataScansJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a DataScanJob resource. -// -// - name: The resource name of the DataScanJob: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{d -// ata_scan_job_id} where project refers to a project_id or project_number -// and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { - c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Select the DataScanJob view to -// return. Defaults to BASIC. -// -// Possible values: +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the BASIC view. -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { - c.urlParams_.Set("view", view) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { 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 *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataScanJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12144,7 +14098,7 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScanJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12157,118 +14111,84 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists DataScanJobs under the given DataScan. -// -// - parent: The resource name of the parent environment: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { - c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the ListDataScanJobs request.If unspecified, all datascan jobs -// will be returned. Multiple filters can be applied (with AND, OR logical -// operators). Filters are case-sensitive.Allowed fields are: start_time -// end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. -// 2018-10-08T18:30:00-07:00).For instance, 'start_time > -// 2018-10-08T00:00:00.123456789Z AND end_time < -// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between -// specified start and end times. -func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataScanJobs to return. The service may return fewer than this value. If -// unspecified, at most 10 DataScanJobs will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataScanJobs call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataScanJobs -// must match the call that provided the page token. -func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataScansJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataScanJobsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12287,7 +14207,7 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12300,60 +14220,40 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataTaxonomiesCreateCall struct { - s *Service - parent string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataTaxonomy resource. +// Create: Create a DataAttribute resource. // -// - parent: The resource name of the data taxonomy location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { - c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute return c } -// DataTaxonomyId sets the optional parameter "dataTaxonomyId": Required. -// DataTaxonomy identifier. * Must contain only lowercase letters, numbers and +// DataAttributeId sets the optional parameter "dataAttributeId": Required. +// DataAttribute identifier. * Must contain only lowercase letters, numbers and // hyphens. * Must start with a letter. * Must be between 1-63 characters. * -// Must end with a number or a letter. * Must be unique within the Project. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { - c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) +// Must end with a number or a letter. * Must be unique within the +// DataTaxonomy. +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c.urlParams_.Set("dataAttributeId", dataAttributeId) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12361,36 +14261,36 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) 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.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12403,13 +14303,13 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.create" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.create" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12441,7 +14341,7 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataTaxonomiesDeleteCall struct { +type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12449,22 +14349,21 @@ type ProjectsLocationsDataTaxonomiesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DataTaxonomy resource. All attributes within the -// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. +// Delete: Deletes a Data Attribute resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value,the DeleteDataTaxonomy method returns -// an ABORTED error. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { +// does not match the current etag value, the DeleteDataAttribute method +// returns an ABORTED error response. +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -12472,27 +14371,27 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12510,13 +14409,13 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.delete" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12548,7 +14447,7 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataTaxonomiesGetCall struct { +type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12557,13 +14456,13 @@ type ProjectsLocationsDataTaxonomiesGetCall struct { header_ http.Header } -// Get: Retrieves a DataTaxonomy resource. +// Get: Retrieves a Data Attribute resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { - c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the dataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12571,7 +14470,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12579,27 +14478,27 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12620,13 +14519,13 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataTaxonomy.ServerResponse.Header or (if a response +// *GoogleCloudDataplexV1DataAttribute.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12645,7 +14544,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataTaxonomy{ + ret := &GoogleCloudDataplexV1DataAttribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12658,7 +14557,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { +type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12673,8 +14572,8 @@ type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12691,7 +14590,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) * // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12699,7 +14598,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicy // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12707,27 +14606,27 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12748,13 +14647,13 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12786,7 +14685,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataTaxonomiesListCall struct { +type ProjectsLocationsDataTaxonomiesAttributesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12795,44 +14694,44 @@ type ProjectsLocationsDataTaxonomiesListCall struct { header_ http.Header } -// List: Lists DataTaxonomy resources in a project and location. +// List: Lists Data Attribute resources in a DataTaxonomy. // -// - parent: The resource name of the DataTaxonomy location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { - c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Order by fields for the // result. -func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// DataTaxonomies to return. The service may return fewer than this value. If -// unspecified, at most 10 DataTaxonomies will be returned. The maximum value +// DataAttributes to return. The service may return fewer than this value. If +// unspecified, at most 10 dataAttributes will be returned. The maximum value // is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataTaxonomies call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataTaxonomies +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataAttributes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataAttributes // must match the call that provided the page token. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12840,7 +14739,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12848,27 +14747,27 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12876,7 +14775,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12889,13 +14788,13 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.ServerResponse.Header or +// *GoogleCloudDataplexV1ListDataAttributesResponse.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12914,7 +14813,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ + ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12930,7 +14829,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) error) error { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12948,38 +14847,38 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f f } } -type ProjectsLocationsDataTaxonomiesPatchCall struct { - s *Service - name string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataTaxonomy resource. +// Patch: Updates a DataAttribute resource. // -// - name: Output only. The relative resource name of the DataTaxonomy, of the +// - name: Output only. The relative resource name of the dataAttribute, of the // form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { - c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { + c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12987,30 +14886,30 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) 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.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) if err != nil { return nil, err } @@ -13029,13 +14928,13 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13067,7 +14966,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { +type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -13083,8 +14982,8 @@ type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -13093,27 +14992,27 @@ func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, g // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -13135,13 +15034,13 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13173,7 +15072,7 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { +type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -13192,8 +15091,8 @@ type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -13202,27 +15101,27 @@ func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) @@ -13244,13 +15143,13 @@ func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13282,40 +15181,38 @@ func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataAttribute resource. +// Create: Creates an EntryGroup. // -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { + c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } -// DataAttributeId sets the optional parameter "dataAttributeId": Required. -// DataAttribute identifier. * Must contain only lowercase letters, numbers and -// hyphens. * Must start with a letter. * Must be between 1-63 characters. * -// Must end with a number or a letter. * Must be unique within the -// DataTaxonomy. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c.urlParams_.Set("dataAttributeId", dataAttributeId) +// EntryGroupId sets the optional parameter "entryGroupId": Required. +// EntryGroup identifier. +func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { + c.urlParams_.Set("entryGroupId", entryGroupId) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13323,36 +15220,36 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(valid // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) 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.googleclouddataplexv1dataattribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13365,13 +15262,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.create" call. +// Do executes the "dataplex.projects.locations.entryGroups.create" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13403,7 +15300,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { +type ProjectsLocationsEntryGroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13411,21 +15308,21 @@ type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { header_ http.Header } -// Delete: Deletes a Data Attribute resource. +// Delete: Deletes an EntryGroup. // -// - name: The resource name of the DataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ +// id}. +func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { + c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteDataAttribute method +// does not match the current etag value, the DeleteEntryGroupRequest method // returns an ABORTED error response. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Etag(etag string) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -13433,27 +15330,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -13471,13 +15368,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.delete" call. +// Do executes the "dataplex.projects.locations.entryGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13509,7 +15406,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { +type ProjectsLocationsEntryGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13518,13 +15415,13 @@ type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { header_ http.Header } -// Get: Retrieves a Data Attribute resource. +// Get: Gets an EntryGroup. // -// - name: The resource name of the dataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ +// id}. +func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { + c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13532,7 +15429,7 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13540,27 +15437,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13581,13 +15478,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. +// Do executes the "dataplex.projects.locations.entryGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataAttribute.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1EntryGroup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { +func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13606,7 +15503,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttribute{ + ret := &GoogleCloudDataplexV1EntryGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13619,7 +15516,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -13634,8 +15531,8 @@ type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -13652,7 +15549,7 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -13660,7 +15557,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsReque // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13668,27 +15565,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ... // 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13709,13 +15606,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13747,7 +15644,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesListCall struct { +type ProjectsLocationsEntryGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13756,44 +15653,44 @@ type ProjectsLocationsDataTaxonomiesAttributesListCall struct { header_ http.Header } -// List: Lists Data Attribute resources in a DataTaxonomy. +// List: Lists EntryGroup resources in a project and location. // -// - parent: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { - c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { + c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Filter(filter string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Order by fields for the // result. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributes to return. The service may return fewer than this value. If -// unspecified, at most 10 dataAttributes will be returned. The maximum value +// EntryGroups to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 EntryGroups. The maximum value // is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataAttributes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataAttributes +// a previous ListEntryGroups call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provide to ListEntryGroups // must match the call that provided the page token. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13801,7 +15698,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13809,27 +15706,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13837,7 +15734,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13850,13 +15747,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. +// Do executes the "dataplex.projects.locations.entryGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataAttributesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListEntryGroupsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { +func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13875,7 +15772,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ + ret := &GoogleCloudDataplexV1ListEntryGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13891,7 +15788,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) error) error { +func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -13909,38 +15806,39 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Co } } -type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsPatchCall struct { + s *Service + name string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttribute resource. +// Patch: Updates an EntryGroup. // -// - name: Output only. The relative resource name of the dataAttribute, of the -// form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { - c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the EntryGroup, in the +// format +// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ +// group_id}. +func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { + c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request, without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryGroupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13948,30 +15846,30 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(valida // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) 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.googleclouddataplexv1dataattribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) if err != nil { return nil, err } @@ -13990,13 +15888,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" call. +// Do executes the "dataplex.projects.locations.entryGroups.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14028,7 +15926,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -14044,8 +15942,8 @@ type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -14054,27 +15952,27 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -14096,13 +15994,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14134,7 +16032,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { +type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -14153,8 +16051,8 @@ type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { + c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -14163,155 +16061,36 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(re // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ - 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 ProjectsLocationsEntryGroupsCreateCall struct { - s *Service - parent string - googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an EntryGroup. -// -// - parent: The resource name of the entryGroup, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { - c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup - return c -} - -// EntryGroupId sets the optional parameter "entryGroupId": Required. -// EntryGroup identifier. -func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { - c.urlParams_.Set("entryGroupId", entryGroupId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) 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.googleclouddataplexv1entrygroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14319,18 +16098,18 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.create" call. +// Do executes the "dataplex.projects.locations.entryGroups.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14349,7 +16128,7 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14362,81 +16141,96 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsEntryGroupsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an EntryGroup. +// Create: Creates an Entry. // -// - name: The resource name of the EntryGroup: -// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ -// id}. -func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { - c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteEntryGroupRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Etag(etag string) *ProjectsLocationsEntryGroupsDeleteCall { - c.urlParams_.Set("etag", etag) +// EntryId sets the optional parameter "entryId": Required. Entry identifier. +// It has to be unique within an Entry Group.Entries corresponding to Google +// Cloud resources use an Entry ID format based on full resource names +// (https://cloud.google.com/apis/design/resource_names#full_resource_name). +// The format is a full resource name of the resource without the prefix double +// slashes in the API service name part of the full resource name. This allows +// retrieval of entries using their associated resource name.For example, if +// the full resource name of a resource is +// //library.googleapis.com/shelves/shelf1/books/book2, then the suggested +// entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also +// suggested to follow the same convention for entries corresponding to +// resources from providers or systems other than Google Cloud.The maximum size +// of the field is 4000 characters. +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c.urlParams_.Set("entryId", entryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) 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.googleclouddataplexv1entry) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.delete" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14455,7 +16249,7 @@ func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14468,22 +16262,21 @@ func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsEntryGroupsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an EntryGroup. +// Delete: Deletes an Entry. // -// - name: The resource name of the EntryGroup: -// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ -// id}. -func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { - c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ +// entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { + c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14491,45 +16284,34 @@ func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocation // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 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 *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14540,13 +16322,13 @@ func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.get" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1EntryGroup.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryGroup, error) { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14565,7 +16347,7 @@ func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1EntryGroup{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14578,48 +16360,68 @@ func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsEntriesGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets an Entry. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ +// entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects +// returned to the provided aspect types. It only works for CUSTOM view. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects returned to +// those associated with the provided paths within the Entry. It only works for +// CUSTOM view. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Paths(paths ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View to control which parts of an +// entry the service should return. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If +// +// the number of aspects exceeds 100, the first 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the +// +// first 100 will be returned. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) View(view string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14627,27 +16429,27 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14655,7 +16457,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14663,18 +16465,18 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14693,7 +16495,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14706,7 +16508,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryGroupsListCall struct { +type ProjectsLocationsEntryGroupsEntriesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14715,44 +16517,45 @@ type ProjectsLocationsEntryGroupsListCall struct { header_ http.Header } -// List: Lists EntryGroup resources in a project and location. +// List: Lists Entries within an EntryGroup. // -// - parent: The resource name of the entryGroup location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { - c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { + c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsEntryGroupsListCall) Filter(filter string) *ProjectsLocationsEntryGroupsListCall { +// Filter sets the optional parameter "filter": A filter on the entries to +// return. Filters are case-sensitive. You can filter the request by the +// following fields: entry_type entry_source.display_nameThe comparison +// operators are =, !=, <, >, <=, >=. The service compares strings according to +// lexical order.You can use the logical operators AND, OR, NOT in the +// filter.You can use Wildcard "*", but for entry_type you need to provide the +// full project id or number.Example filter expressions: +// "entry_source.display_name=AnExampleDisplayName" +// "entry_type=projects/example-project/locations/global/entryTypes/example-entr +// y_type" "entry_type=projects/example-project/locations/us/entryTypes/a* OR +// entry_type=projects/another-project/locations/*" "NOT +// entry_source.display_name=AnotherExampleDisplayName" +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Filter(filter string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsEntryGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsEntryGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EntryGroups to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 EntryGroups. The maximum value -// is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { +// PageSize sets the optional parameter "pageSize": Number of items to return +// per page. If there are remaining results, the service returns a +// next_page_token. If unspecified, the service returns at most 10 Entries. The +// maximum value is 100; values above 100 will be coerced to 100. +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntryGroups call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provide to ListEntryGroups -// must match the call that provided the page token. -func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { +// a previous ListEntries call. Provide this to retrieve the subsequent page. +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14760,7 +16563,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14768,27 +16571,27 @@ func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14796,7 +16599,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14809,13 +16612,13 @@ func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.list" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntryGroupsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListEntriesResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryGroupsResponse, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14834,7 +16637,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntryGroupsResponse{ + ret := &GoogleCloudDataplexV1ListEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14850,7 +16653,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryGroupsResponse) error) error { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -14868,70 +16671,92 @@ func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func } } -type ProjectsLocationsEntryGroupsPatchCall struct { - s *Service - name string - googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesPatchCall struct { + s *Service + name string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an EntryGroup. +// Patch: Updates an Entry. // -// - name: Output only. The relative resource name of the EntryGroup, in the -// format +// - name: Identifier. The relative resource name of the entry, in the format // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ -// group_id}. -func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { - c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// group_id}/entries/{entry_id}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to true and +// the entry doesn't exist, the service will create it. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request, without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryGroupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// AspectKeys sets the optional parameter "aspectKeys": The map keys of the +// Aspects which the service should modify. It supports the following syntaxes: +// - matches an aspect of the given type and empty path. @path - matches an +// aspect of the given type and specified path. * - matches aspects of the +// given type for all paths. *@path - matches aspects of all types on the given +// path.The service will not remove existing aspects matching the syntax unless +// delete_missing_aspects is set to true.If this field is left empty, the +// service treats it as specifying exactly those Aspects present in the +// request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AspectKeys(aspectKeys ...string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.SetMulti("aspectKeys", append([]string{}, aspectKeys...)) + return c +} + +// DeleteMissingAspects sets the optional parameter "deleteMissingAspects": If +// set to true and the aspect_keys specify aspect ranges, the service deletes +// any existing aspects from that range that weren't provided in the request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) DeleteMissingAspects(deleteMissingAspects bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("deleteMissingAspects", fmt.Sprint(deleteMissingAspects)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask of fields to +// update. To update Aspects, the update_mask must contain the value +// "aspects".If the update_mask is empty, the service will update all +// modifiable fields present in the request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + 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 *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) 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.googleclouddataplexv1entrygroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) if err != nil { return nil, err } @@ -14950,13 +16775,141 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.patch" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, 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 := &GoogleCloudDataplexV1Entry{ + 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 ProjectsLocationsEntryLinkTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryLinkTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryLinkTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + 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 *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.entryLinkTypes.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14975,7 +16928,7 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14988,7 +16941,7 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { +type ProjectsLocationsEntryLinkTypesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -15004,8 +16957,8 @@ type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryLinkTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { + c := &ProjectsLocationsEntryLinkTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -15014,27 +16967,27 @@ func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, goog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -15056,13 +17009,13 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryLinkTypes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15094,7 +17047,7 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { +type ProjectsLocationsEntryLinkTypesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -15113,8 +17066,8 @@ type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { - c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryLinkTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { + c := &ProjectsLocationsEntryLinkTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -15123,27 +17076,27 @@ func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) @@ -15165,13 +17118,13 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.entryLinkTypes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15203,77 +17156,75 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsEntryGroupsEntriesCreateCall struct { - s *Service - parent string - googleclouddataplexv1entry *GoogleCloudDataplexV1Entry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Entry. +// Create: Creates an EntryType. // -// - parent: The resource name of the parent Entry Group: -// projects/{project}/locations/{location}/entryGroups/{entry_group}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { - c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the EntryType, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryTypesService) Create(parent string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesCreateCall { + c := &ProjectsLocationsEntryTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1entry = googleclouddataplexv1entry + c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype return c } -// EntryId sets the optional parameter "entryId": Required. Entry identifier. -// It has to be unique within an Entry Group.Entries corresponding to Google -// Cloud resources use an Entry ID format based on full resource names -// (https://cloud.google.com/apis/design/resource_names#full_resource_name). -// The format is a full resource name of the resource without the prefix double -// slashes in the API service name part of the full resource name. This allows -// retrieval of entries using their associated resource name.For example, if -// the full resource name of a resource is -// //library.googleapis.com/shelves/shelf1/books/book2, then the suggested -// entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also -// suggested to follow the same convention for entries corresponding to -// resources from providers or systems other than Google Cloud.The maximum size -// of the field is 4000 characters. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { - c.urlParams_.Set("entryId", entryId) +// EntryTypeId sets the optional parameter "entryTypeId": Required. EntryType +// identifier. +func (c *ProjectsLocationsEntryTypesCreateCall) EntryTypeId(entryTypeId string) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("entryTypeId", entryTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) 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.googleclouddataplexv1entry) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15286,13 +17237,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.create" call. +// Do executes the "dataplex.projects.locations.entryTypes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15311,7 +17262,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15324,7 +17275,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { +type ProjectsLocationsEntryTypesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15332,41 +17283,49 @@ type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { header_ http.Header } -// Delete: Deletes an Entry. +// Delete: Deletes an EntryType. // -// - name: The resource name of the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ -// entry}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { - c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Delete(name string) *ProjectsLocationsEntryTypesDeleteCall { + c := &ProjectsLocationsEntryTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value, the DeleteEntryTypeRequest method +// returns an ABORTED error response. +func (c *ProjectsLocationsEntryTypesDeleteCall) Etag(etag string) *ProjectsLocationsEntryTypesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -15384,13 +17343,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.delete" call. +// Do executes the "dataplex.projects.locations.entryTypes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15409,7 +17368,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15422,7 +17381,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEntryGroupsEntriesGetCall struct { +type ProjectsLocationsEntryTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15431,59 +17390,21 @@ type ProjectsLocationsEntryGroupsEntriesGetCall struct { header_ http.Header } -// Get: Gets an Entry. +// Get: Gets an EntryType. // -// - name: The resource name of the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ -// entry}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Get(name string) *ProjectsLocationsEntryTypesGetCall { + c := &ProjectsLocationsEntryTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects -// returned to the provided aspect types. It only works for CUSTOM view. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) - return c -} - -// Paths sets the optional parameter "paths": Limits the aspects returned to -// those associated with the provided paths within the Entry. It only works for -// CUSTOM view. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Paths(paths ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// View sets the optional parameter "view": View to control which parts of an -// entry the service should return. -// -// Possible values: -// -// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. -// "BASIC" - Returns entry only, without aspects. -// "FULL" - Returns all required aspects as well as the keys of all -// -// non-required aspects. -// -// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If -// -// the number of aspects exceeds 100, the first 100 will be returned. -// -// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the -// -// first 100 will be returned. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) View(view string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.Set("view", view) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15491,27 +17412,27 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15532,13 +17453,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.get" call. +// Do executes the "dataplex.projects.locations.entryTypes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1EntryType.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15557,7 +17478,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleCloudDataplexV1EntryType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15570,62 +17491,48 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsEntryGroupsEntriesListCall struct { +type ProjectsLocationsEntryTypesGetIamPolicyCall struct { s *Service - parent string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Entries within an EntryGroup. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - parent: The resource name of the parent Entry Group: -// projects/{project}/locations/{location}/entryGroups/{entry_group}. -func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { - c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter on the entries to -// return. Filters are case-sensitive. You can filter the request by the -// following fields: entry_type entry_source.display_nameThe comparison -// operators are =, !=, <, >, <=, >=. The service compares strings according to -// lexical order.You can use the logical operators AND, OR, NOT in the -// filter.You can use Wildcard "*", but for entry_type you need to provide the -// full project id or number.Example filter expressions: -// "entry_source.display_name=AnExampleDisplayName" -// "entry_type=projects/example-project/locations/global/entryTypes/example-entr -// y_type" "entry_type=projects/example-project/locations/us/entryTypes/a* OR -// entry_type=projects/another-project/locations/*" "NOT -// entry_source.display_name=AnotherExampleDisplayName" -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Filter(filter string) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Number of items to return -// per page. If there are remaining results, the service returns a -// next_page_token. If unspecified, the service returns at most 10 Entries. The -// maximum value is 100; values above 100 will be coerced to 100. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntries call. Provide this to retrieve the subsequent page. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("pageToken", pageToken) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15633,27 +17540,27 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15661,7 +17568,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15669,18 +17576,18 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.list" call. +// Do executes the "dataplex.projects.locations.entryTypes.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntriesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntriesResponse, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15699,7 +17606,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntriesResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15712,138 +17619,119 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallO return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsEntryGroupsEntriesPatchCall struct { - s *Service - name string - googleclouddataplexv1entry *GoogleCloudDataplexV1Entry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Entry. +// List: Lists EntryType resources in a project and location. // -// - name: Identifier. The relative resource name of the entry, in the format -// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ -// group_id}/entries/{entry_id}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1entry = googleclouddataplexv1entry +// - parent: The resource name of the EntryType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryTypesService) List(parent string) *ProjectsLocationsEntryTypesListCall { + c := &ProjectsLocationsEntryTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// AllowMissing sets the optional parameter "allowMissing": If set to true and -// the entry doesn't exist, the service will create it. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"These restrictions can be conjoined with +// AND, OR, and NOT conjunctions. +func (c *ProjectsLocationsEntryTypesListCall) Filter(filter string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("filter", filter) return c } -// AspectKeys sets the optional parameter "aspectKeys": The map keys of the -// Aspects which the service should modify. It supports the following syntaxes: -// - matches an aspect of the given type and empty path. @path - matches an -// aspect of the given type and specified path. * - matches aspects of the -// given type for all paths. *@path - matches aspects of all types on the given -// path.The service will not remove existing aspects matching the syntax unless -// delete_missing_aspects is set to true.If this field is left empty, the -// service treats it as specifying exactly those Aspects present in the -// request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AspectKeys(aspectKeys ...string) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.SetMulti("aspectKeys", append([]string{}, aspectKeys...)) +// OrderBy sets the optional parameter "orderBy": Orders the result by name or +// create_time fields. If not specified, the ordering is undefined. +func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// DeleteMissingAspects sets the optional parameter "deleteMissingAspects": If -// set to true and the aspect_keys specify aspect ranges, the service deletes -// any existing aspects from that range that weren't provided in the request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) DeleteMissingAspects(deleteMissingAspects bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("deleteMissingAspects", fmt.Sprint(deleteMissingAspects)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// EntryTypes to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 EntryTypes. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsEntryTypesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Mask of fields to -// update. To update Aspects, the update_mask must contain the value -// "aspects".If the update_mask is empty, the service will update all -// modifiable fields present in the request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListEntryTypes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provided to ListEntryTypes +// must match the call that provided the page token. +func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { +func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { 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 *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { +func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) 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.googleclouddataplexv1entry) - if err != nil { - return nil, err +func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.patch" call. +// Do executes the "dataplex.projects.locations.entryTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListEntryTypesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15862,7 +17750,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15875,38 +17763,60 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryTypesCreateCall struct { +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsEntryTypesPatchCall struct { s *Service - parent string + name string googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates an EntryType. +// Patch: Updates an EntryType. // -// - parent: The resource name of the EntryType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryTypesService) Create(parent string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesCreateCall { - c := &ProjectsLocationsEntryTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the EntryType, of the +// form: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Patch(name string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesPatchCall { + c := &ProjectsLocationsEntryTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype return c } -// EntryTypeId sets the optional parameter "entryTypeId": Required. EntryType -// identifier. -func (c *ProjectsLocationsEntryTypesCreateCall) EntryTypeId(entryTypeId string) *ProjectsLocationsEntryTypesCreateCall { - c.urlParams_.Set("entryTypeId", entryTypeId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsEntryTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": The service // validates the request without performing any mutations. The default is // false. -func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -15914,27 +17824,27 @@ func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) 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.googleclouddataplexv1entrytype) @@ -15943,26 +17853,26 @@ func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Res } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.create" call. +// Do executes the "dataplex.projects.locations.entryTypes.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15994,81 +17904,81 @@ func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an EntryType. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the EntryType: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Delete(name string) *ProjectsLocationsEntryTypesDeleteCall { - c := &ProjectsLocationsEntryTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteEntryTypeRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsEntryTypesDeleteCall) Etag(etag string) *ProjectsLocationsEntryTypesDeleteCall { - c.urlParams_.Set("etag", etag) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { + c := &ProjectsLocationsEntryTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.delete" call. +// Do executes the "dataplex.projects.locations.entryTypes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16087,7 +17997,7 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16100,85 +18010,84 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an EntryType. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The resource name of the EntryType: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Get(name string) *ProjectsLocationsEntryTypesGetCall { - c := &ProjectsLocationsEntryTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { + c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.get" call. +// Do executes the "dataplex.projects.locations.entryTypes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1EntryType.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16197,7 +18106,7 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1EntryType{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16210,7 +18119,7 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsEntryTypesGetIamPolicyCall struct { +type ProjectsLocationsGlossariesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -16225,8 +18134,8 @@ type ProjectsLocationsEntryTypesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesGetIamPolicyCall { + c := &ProjectsLocationsGlossariesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -16243,7 +18152,7 @@ func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *Proj // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -16251,7 +18160,7 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVers // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16259,27 +18168,27 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16300,13 +18209,13 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16338,119 +18247,190 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists EntryType resources in a project and location. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - parent: The resource name of the EntryType location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryTypesService) List(parent string) *ProjectsLocationsEntryTypesListCall { - c := &ProjectsLocationsEntryTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesSetIamPolicyCall { + c := &ProjectsLocationsGlossariesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } -// Filter sets the optional parameter "filter": Filter request. Filters are -// case-sensitive. The service supports the following formats: labels.key1 = -// "value1" labels:key1 name = "value"These restrictions can be conjoined with -// AND, OR, and NOT conjunctions. -func (c *ProjectsLocationsEntryTypesListCall) Filter(filter string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Orders the result by name or -// create_time fields. If not specified, the ordering is undefined. -func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesSetIamPolicyCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// EntryTypes to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 EntryTypes. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsEntryTypesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.glossaries.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGlossariesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntryTypes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provided to ListEntryTypes -// must match the call that provided the page token. -func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.list" call. +// Do executes the "dataplex.projects.locations.glossaries.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntryTypesResponse.ServerResponse.Header or (if a +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryTypesResponse, error) { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16469,7 +18449,7 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16482,116 +18462,103 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsEntryTypesPatchCall struct { - s *Service - name string - googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesCategoriesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an EntryType. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: Output only. The relative resource name of the EntryType, of the -// form: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Patch(name string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesPatchCall { - c := &ProjectsLocationsEntryTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsEntryTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryTypesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsGlossariesCategoriesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c := &ProjectsLocationsGlossariesCategoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { 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 *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesPatchCall) 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.googleclouddataplexv1entrytype) - if err != nil { - return nil, err +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.patch" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16610,7 +18577,7 @@ func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16623,7 +18590,7 @@ func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesSetIamPolicyCall struct { +type ProjectsLocationsGlossariesCategoriesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -16639,8 +18606,8 @@ type ProjectsLocationsEntryTypesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { - c := &ProjectsLocationsEntryTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesCategoriesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { + c := &ProjectsLocationsGlossariesCategoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -16649,27 +18616,27 @@ func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -16691,13 +18658,13 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16729,7 +18696,7 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { +type ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -16748,8 +18715,8 @@ type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { - c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesCategoriesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -16758,27 +18725,27 @@ func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) @@ -16800,13 +18767,13 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16838,7 +18805,7 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGlossariesGetIamPolicyCall struct { +type ProjectsLocationsGlossariesTermsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -16853,8 +18820,8 @@ type ProjectsLocationsGlossariesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesGetIamPolicyCall { - c := &ProjectsLocationsGlossariesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { + c := &ProjectsLocationsGlossariesTermsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -16871,7 +18838,7 @@ func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *Proj // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -16879,7 +18846,7 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVers // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16887,27 +18854,27 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsGlossariesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16928,13 +18895,13 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16966,7 +18933,7 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsGlossariesSetIamPolicyCall struct { +type ProjectsLocationsGlossariesTermsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -16982,8 +18949,8 @@ type ProjectsLocationsGlossariesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesSetIamPolicyCall { - c := &ProjectsLocationsGlossariesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { + c := &ProjectsLocationsGlossariesTermsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -16992,27 +18959,27 @@ func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) @@ -17034,13 +19001,13 @@ func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17072,7 +19039,7 @@ func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsGlossariesTestIamPermissionsCall struct { +type ProjectsLocationsGlossariesTermsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -17091,8 +19058,8 @@ type ProjectsLocationsGlossariesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTestIamPermissionsCall { - c := &ProjectsLocationsGlossariesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesTermsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -17101,27 +19068,27 @@ func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) @@ -17143,13 +19110,13 @@ func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index 8e4eda8e548..dcd90fe2b1e 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1605,7 +1605,7 @@ } } }, - "revision": "20240529", + "revision": "20240819", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2113,6 +2113,10 @@ "$ref": "KeyId", "description": "Provides a means of identifiying certificates that contain a particular public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2." }, + "tbsCertificateDigest": { + "description": "The hash of the pre-signed certificate, which will be signed by the CA. Corresponds to the TBS Certificate in https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be populated.", + "type": "string" + }, "x509Description": { "$ref": "X509Parameters", "description": "Describes some of the technical X.509 fields in a certificate." diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index c0a2f54ce88..ae4c8322986 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -906,6 +906,11 @@ type CertificateDescription struct { // particular public key, per // https://tools.ietf.org/html/rfc5280#section-4.2.1.2. SubjectKeyId *KeyId `json:"subjectKeyId,omitempty"` + // TbsCertificateDigest: The hash of the pre-signed certificate, which will be + // signed by the CA. Corresponds to the TBS Certificate in + // https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be + // populated. + TbsCertificateDigest string `json:"tbsCertificateDigest,omitempty"` // X509Description: Describes some of the technical X.509 fields in a // certificate. X509Description *X509Parameters `json:"x509Description,omitempty"` From 47629a19b97ad0c75f7f98e74a2c814658589b2c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 26 Aug 2024 17:43:36 +0200 Subject: [PATCH 5/8] chore(all): update all to 4ba0660 (#2754) --- go.mod | 6 +++--- go.sum | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 6245f606507..ad92d09b6b5 100644 --- a/go.mod +++ b/go.mod @@ -19,9 +19,9 @@ require ( golang.org/x/oauth2 v0.22.0 golang.org/x/sync v0.8.0 golang.org/x/time v0.6.0 - google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/genproto/googleapis/bytestream v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c + google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c + google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 ) diff --git a/go.sum b/go.sum index 6074d9e3ba5..02eb96d7e4b 100644 --- a/go.sum +++ b/go.sum @@ -128,14 +128,14 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= -google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= -google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf h1:GillM0Ef0pkZPIB+5iO6SDK+4T9pf6TpaYR6ICD5rVE= -google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:OFMYQFHJ4TM3JRlWDZhJbZfra2uqc3WLBZiaaqP4DtU= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240814211410-ddb44dafa142 h1:abw8n4dbagiJlEWXb1eDu2nB0NDSf6o4J7YO8Fb/ik0= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240814211410-ddb44dafa142/go.mod h1:gQizMG9jZ0L2ADJaM+JdZV4yTCON/CQpnHRPoM+54w4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c h1:TYOEhrQMrNDTAd2rX9m+WgGr8Ku6YNuj1D7OX6rWSok= +google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c/go.mod h1:2rC5OendXvZ8wGEo/cSLheztrZDZaSoHanUcd1xtZnw= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c h1:5SFTbgH011A1/MostoGp5314PMnSH9ZLxZX/xynmp64= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c/go.mod h1:gQizMG9jZ0L2ADJaM+JdZV4yTCON/CQpnHRPoM+54w4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c h1:Kqjm4WpoWvwhMPcrAczoTyMySQmYa9Wy2iL6Con4zn8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= From e907e01d29910f6480adcfa4054cfc9809fb36fe Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Aug 2024 08:09:46 -0700 Subject: [PATCH 6/8] feat(all): auto-regenerate discovery clients (#2756) --- cloudkms/v1/cloudkms-api.json | 36 ++++- cloudkms/v1/cloudkms-gen.go | 57 +++++++- go.work.sum | 1 + pollen/v1/pollen-api.json | 10 +- pollen/v1/pollen-gen.go | 2 + redis/v1/redis-api.json | 162 ++++++++++++++++++++- redis/v1/redis-gen.go | 262 ++++++++++++++++++++++++++++++++-- redis/v1beta1/redis-api.json | 162 ++++++++++++++++++++- redis/v1beta1/redis-gen.go | 262 ++++++++++++++++++++++++++++++++-- 9 files changed, 924 insertions(+), 30 deletions(-) diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 6313094275c..e2d4c7fa9c1 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -859,6 +859,17 @@ "location": "query", "type": "string" }, + "pageSize": { + "description": "Optional. Optional limit on the number of KeyHandles to include in the response. The service may return fewer than this value. Further KeyHandles can subsequently be obtained by including the ListKeyHandlesResponse.next_page_token in a subsequent request. If unspecified, at most KeyHandles 100 will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Optional pagination token, returned earlier via ListKeyHandlesResponse.next_page_token.", + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Name of the resource project and location from which to list KeyHandles, e.g. `projects/{PROJECT_ID}/locations/{LOCATION}`.", "location": "path", @@ -2101,7 +2112,7 @@ } } }, - "revision": "20240801", + "revision": "20240808", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -2292,6 +2303,23 @@ "name": { "description": "Identifier. Name of the AutokeyConfig resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`.", "type": "string" + }, + "state": { + "description": "Output only. The state for the AutokeyConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "KEY_PROJECT_DELETED", + "UNINITIALIZED" + ], + "enumDescriptions": [ + "The state of the AutokeyConfig is unspecified.", + "The AutokeyConfig is currently active.", + "A previously configured key project has been deleted and the current AutokeyConfig is unusable.", + "The AutokeyConfig is not yet initialized or has been reset to its default uninitialized state." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -2943,7 +2971,7 @@ "type": "string" }, "serviceResolvers": { - "description": "A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.", + "description": "Optional. A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.", "items": { "$ref": "ServiceResolver" }, @@ -3534,6 +3562,10 @@ "$ref": "KeyHandle" }, "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in ListKeyHandlesRequest.page_token to retrieve the next page of results.", + "type": "string" } }, "type": "object" diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index f0feb4b5373..5194747f6cb 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -603,6 +603,16 @@ type AutokeyConfig struct { // Name: Identifier. Name of the AutokeyConfig resource, e.g. // `folders/{FOLDER_NUMBER}/autokeyConfig`. Name string `json:"name,omitempty"` + // State: Output only. The state for the AutokeyConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the AutokeyConfig is unspecified. + // "ACTIVE" - The AutokeyConfig is currently active. + // "KEY_PROJECT_DELETED" - A previously configured key project has been + // deleted and the current AutokeyConfig is unusable. + // "UNINITIALIZED" - The AutokeyConfig is not yet initialized or has been + // reset to its default uninitialized state. + State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1380,9 +1390,9 @@ type EkmConnection struct { // Name: Output only. The resource name for the EkmConnection in the format // `projects/*/locations/*/ekmConnections/*`. Name string `json:"name,omitempty"` - // ServiceResolvers: A list of ServiceResolvers where the EKM can be reached. - // There should be one ServiceResolver per EKM replica. Currently, only a - // single ServiceResolver is supported. + // ServiceResolvers: Optional. A list of ServiceResolvers where the EKM can be + // reached. There should be one ServiceResolver per EKM replica. Currently, + // only a single ServiceResolver is supported. ServiceResolvers []*ServiceResolver `json:"serviceResolvers,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -2232,6 +2242,9 @@ func (s ListImportJobsResponse) MarshalJSON() ([]byte, error) { type ListKeyHandlesResponse struct { // KeyHandles: Resulting KeyHandles. KeyHandles []*KeyHandle `json:"keyHandles,omitempty"` + // NextPageToken: A token to retrieve next page of results. Pass this value in + // ListKeyHandlesRequest.page_token to retrieve the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5849,6 +5862,23 @@ func (c *ProjectsLocationsKeyHandlesListCall) Filter(filter string) *ProjectsLoc return c } +// PageSize sets the optional parameter "pageSize": Optional limit on the +// number of KeyHandles to include in the response. The service may return +// fewer than this value. Further KeyHandles can subsequently be obtained by +// including the ListKeyHandlesResponse.next_page_token in a subsequent +// request. If unspecified, at most KeyHandles 100 will be returned. +func (c *ProjectsLocationsKeyHandlesListCall) PageSize(pageSize int64) *ProjectsLocationsKeyHandlesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Optional pagination +// token, returned earlier via ListKeyHandlesResponse.next_page_token. +func (c *ProjectsLocationsKeyHandlesListCall) PageToken(pageToken string) *ProjectsLocationsKeyHandlesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -5939,6 +5969,27 @@ func (c *ProjectsLocationsKeyHandlesListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsKeyHandlesListCall) Pages(ctx context.Context, f func(*ListKeyHandlesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type ProjectsLocationsKeyRingsCreateCall struct { s *Service parent string diff --git a/go.work.sum b/go.work.sum index 38e5a00aacc..676cd54b394 100644 --- a/go.work.sum +++ b/go.work.sum @@ -62,6 +62,7 @@ cloud.google.com/go/compute v1.27.1 h1:0WbBLIPNANheCRZ4h8QhgzjN53KMutbiVBOLtPiVz cloud.google.com/go/compute v1.27.2 h1:5cE5hdrwJV/92ravlwIFRGnyH9CpLGhh4N0ZDVTU+BA= cloud.google.com/go/compute v1.27.4 h1:XM8ulx6crjdl09XBfji7viFgZOEQuIxBwKmjRH9Rtmc= cloud.google.com/go/compute v1.27.4/go.mod h1:7JZS+h21ERAGHOy5qb7+EPyXlQwzshzrx1x6L9JhTqU= +cloud.google.com/go/compute v1.27.5 h1:iii9Z+FhEeZ5cUkGOEqU+GM7MJSyxMgbE7H7j+JndYY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI= cloud.google.com/go/contactcenterinsights v1.13.6/go.mod h1:mL+DbN3pMQGaAbDC4wZhryLciwSwHf5Tfk4Itr72Zyk= diff --git a/pollen/v1/pollen-api.json b/pollen/v1/pollen-api.json index 31fd9c6ce06..4871c7b32ae 100644 --- a/pollen/v1/pollen-api.json +++ b/pollen/v1/pollen-api.json @@ -233,7 +233,7 @@ } } }, - "revision": "20240720", + "revision": "20240825", "rootUrl": "https://pollen.googleapis.com/", "schemas": { "Color": { @@ -471,7 +471,9 @@ "HAZEL", "GRAMINALES", "RAGWEED", - "MUGWORT" + "MUGWORT", + "JAPANESE_CEDAR", + "JAPANESE_CYPRESS" ], "enumDescriptions": [ "Unspecified plant code.", @@ -489,7 +491,9 @@ "Hazel is classified as a tree pollen type.", "Graminales is classified as a grass pollen type.", "Ragweed is classified as a weed pollen type.", - "Mugwort is classified as a weed pollen type." + "Mugwort is classified as a weed pollen type.", + "Japanese cedar is classified as a tree pollen type.", + "Japanese cypress is classified as a tree pollen type." ], "type": "string" }, diff --git a/pollen/v1/pollen-gen.go b/pollen/v1/pollen-gen.go index 65502de8f5c..f2bd3fb19c6 100644 --- a/pollen/v1/pollen-gen.go +++ b/pollen/v1/pollen-gen.go @@ -549,6 +549,8 @@ type PlantInfo struct { // "GRAMINALES" - Graminales is classified as a grass pollen type. // "RAGWEED" - Ragweed is classified as a weed pollen type. // "MUGWORT" - Mugwort is classified as a weed pollen type. + // "JAPANESE_CEDAR" - Japanese cedar is classified as a tree pollen type. + // "JAPANESE_CYPRESS" - Japanese cypress is classified as a tree pollen type. Code string `json:"code,omitempty"` // DisplayName: A human readable representation of the plant name. Example: // “Cottonwood". diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 8131657b50f..79318d50bb7 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -1003,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1123,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1154,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -3351,6 +3483,32 @@ }, "type": "object" }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index b6ce611ff38..4226d5a6cab 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -223,8 +223,8 @@ type AOFConfig struct { // this configuration, but it's up to the kernel's exact tuning. // "EVERYSEC" - fsync every second. Fast enough, and you may lose 1 second of // data if there is a disaster - // "ALWAYS" - fsync every time new commands are appended to the AOF. It has - // the best data loss protection at the cost of performance + // "ALWAYS" - fsync every time new write commands are appended to the AOF. It + // has the best data loss protection at the cost of performance AppendFsync string `json:"appendFsync,omitempty"` // ForceSendFields is a list of field names (e.g. "AppendFsync") to // unconditionally include in API requests. By default, fields with empty or @@ -247,6 +247,10 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { + // AutomaticFailoverRoutingConfigured: Checks for existence of (multi-cluster) + // routing configuration that allows automatic failover to a different + // zone/region in case of an outage. Applicable to Bigtable resources. + AutomaticFailoverRoutingConfigured bool `json:"automaticFailoverRoutingConfigured,omitempty"` // AvailabilityType: Availability type. Potential values: * `ZONAL`: The // instance serves data from only one zone. Outages in that zone affect data // accessibility. * `REGIONAL`: The instance can serve data from more than one @@ -264,16 +268,18 @@ type AvailabilityConfiguration struct { CrossRegionReplicaConfigured bool `json:"crossRegionReplicaConfigured,omitempty"` ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilityType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } @@ -418,6 +424,12 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to + // allow or deny updates. + MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` + // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only + // Published maintenance schedule. + MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -516,6 +528,65 @@ func (s *Cluster) UnmarshalJSON(data []byte) error { return nil } +// ClusterMaintenancePolicy: Maintenance policy per cluster. +type ClusterMaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created i.e. + // Maintenance Window or Deny Period was assigned. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Output only. The time when the policy was updated i.e. + // Maintenance Window or Deny Period was updated. + UpdateTime string `json:"updateTime,omitempty"` + // WeeklyMaintenanceWindow: Optional. Maintenance window that is applied to + // resources covered by this policy. Minimum 1. For the current version, the + // maximum number of weekly_maintenance_window is expected to be one. + WeeklyMaintenanceWindow []*ClusterWeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterMaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenancePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClusterMaintenanceSchedule: Upcoming maitenance schedule. +type ClusterMaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled maintenance for + // this instance. + EndTime string `json:"endTime,omitempty"` + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + // StartTime: Output only. The start time of any upcoming scheduled maintenance + // for this instance. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterMaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenanceSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ClusterPersistenceConfig: Configuration of the persistence functionality. type ClusterPersistenceConfig struct { // AofConfig: Optional. AOF configuration. This field will be ignored if mode @@ -550,6 +621,42 @@ func (s ClusterPersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterWeeklyMaintenanceWindow: Time window specified for weekly operations. +type ClusterWeeklyMaintenanceWindow struct { + // Day: Allows to define schedule that runs specified day of the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + // Duration: Duration of the time window. + Duration string `json:"duration,omitempty"` + // StartTime: Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterWeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod ClusterWeeklyMaintenanceWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Compliance: Contains compliance information about a security standard // indicating unmet recommendations. type Compliance struct { @@ -2758,6 +2865,40 @@ func (s RemoteCluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RescheduleClusterMaintenanceRequest: Request for rescheduling a cluster +// maintenance. +type RescheduleClusterMaintenanceRequest struct { + // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up + // schedule_time as well. + // + // Possible values: + // "RESCHEDULE_TYPE_UNSPECIFIED" - Not set. + // "IMMEDIATE" - If the user wants to schedule the maintenance to happen now. + // "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a + // specific time. + RescheduleType string `json:"rescheduleType,omitempty"` + // ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled + // to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example + // `2012-11-15T16:19:00.094Z`. + ScheduleTime string `json:"scheduleTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "RescheduleType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RescheduleType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RescheduleClusterMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RescheduleClusterMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up @@ -4117,6 +4258,109 @@ func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsClustersRescheduleClusterMaintenanceCall struct { + s *Service + name string + rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RescheduleClusterMaintenance: Reschedules upcoming maintenance event. +// +// - name: Redis Cluster instance resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) RescheduleClusterMaintenance(name string, rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c := &ProjectsLocationsClustersRescheduleClusterMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rescheduleclustermaintenancerequest = rescheduleclustermaintenancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) 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.rescheduleclustermaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rescheduleClusterMaintenance") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.rescheduleClusterMaintenance" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesCreateCall struct { s *Service parent string diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 7742c590964..56333dd5c80 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -1003,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1123,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1154,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -3358,6 +3490,32 @@ }, "type": "object" }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index ab078697e2d..e2dc9f649e8 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -223,8 +223,8 @@ type AOFConfig struct { // this configuration, but it's up to the kernel's exact tuning. // "EVERYSEC" - fsync every second. Fast enough, and you may lose 1 second of // data if there is a disaster - // "ALWAYS" - fsync every time new commands are appended to the AOF. It has - // the best data loss protection at the cost of performance + // "ALWAYS" - fsync every time new write commands are appended to the AOF. It + // has the best data loss protection at the cost of performance AppendFsync string `json:"appendFsync,omitempty"` // ForceSendFields is a list of field names (e.g. "AppendFsync") to // unconditionally include in API requests. By default, fields with empty or @@ -247,6 +247,10 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { + // AutomaticFailoverRoutingConfigured: Checks for existence of (multi-cluster) + // routing configuration that allows automatic failover to a different + // zone/region in case of an outage. Applicable to Bigtable resources. + AutomaticFailoverRoutingConfigured bool `json:"automaticFailoverRoutingConfigured,omitempty"` // AvailabilityType: Availability type. Potential values: * `ZONAL`: The // instance serves data from only one zone. Outages in that zone affect data // accessibility. * `REGIONAL`: The instance can serve data from more than one @@ -264,16 +268,18 @@ type AvailabilityConfiguration struct { CrossRegionReplicaConfigured bool `json:"crossRegionReplicaConfigured,omitempty"` ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilityType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } @@ -418,6 +424,12 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to + // allow or deny updates. + MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` + // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only + // Published maintenance schedule. + MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -516,6 +528,65 @@ func (s *Cluster) UnmarshalJSON(data []byte) error { return nil } +// ClusterMaintenancePolicy: Maintenance policy per cluster. +type ClusterMaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created i.e. + // Maintenance Window or Deny Period was assigned. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Output only. The time when the policy was updated i.e. + // Maintenance Window or Deny Period was updated. + UpdateTime string `json:"updateTime,omitempty"` + // WeeklyMaintenanceWindow: Optional. Maintenance window that is applied to + // resources covered by this policy. Minimum 1. For the current version, the + // maximum number of weekly_maintenance_window is expected to be one. + WeeklyMaintenanceWindow []*ClusterWeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterMaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenancePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClusterMaintenanceSchedule: Upcoming maitenance schedule. +type ClusterMaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled maintenance for + // this instance. + EndTime string `json:"endTime,omitempty"` + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + // StartTime: Output only. The start time of any upcoming scheduled maintenance + // for this instance. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterMaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenanceSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ClusterPersistenceConfig: Configuration of the persistence functionality. type ClusterPersistenceConfig struct { // AofConfig: Optional. AOF configuration. This field will be ignored if mode @@ -550,6 +621,42 @@ func (s ClusterPersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterWeeklyMaintenanceWindow: Time window specified for weekly operations. +type ClusterWeeklyMaintenanceWindow struct { + // Day: Allows to define schedule that runs specified day of the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + // Duration: Duration of the time window. + Duration string `json:"duration,omitempty"` + // StartTime: Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClusterWeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod ClusterWeeklyMaintenanceWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Compliance: Contains compliance information about a security standard // indicating unmet recommendations. type Compliance struct { @@ -2762,6 +2869,40 @@ func (s RemoteCluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RescheduleClusterMaintenanceRequest: Request for rescheduling a cluster +// maintenance. +type RescheduleClusterMaintenanceRequest struct { + // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up + // schedule_time as well. + // + // Possible values: + // "RESCHEDULE_TYPE_UNSPECIFIED" - Not set. + // "IMMEDIATE" - If the user wants to schedule the maintenance to happen now. + // "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a + // specific time. + RescheduleType string `json:"rescheduleType,omitempty"` + // ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled + // to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example + // `2012-11-15T16:19:00.094Z`. + ScheduleTime string `json:"scheduleTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "RescheduleType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RescheduleType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RescheduleClusterMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RescheduleClusterMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up @@ -4121,6 +4262,109 @@ func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsClustersRescheduleClusterMaintenanceCall struct { + s *Service + name string + rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RescheduleClusterMaintenance: Reschedules upcoming maintenance event. +// +// - name: Redis Cluster instance resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) RescheduleClusterMaintenance(name string, rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c := &ProjectsLocationsClustersRescheduleClusterMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rescheduleclustermaintenancerequest = rescheduleclustermaintenancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) 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.rescheduleclustermaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rescheduleClusterMaintenance") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.rescheduleClusterMaintenance" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesCreateCall struct { s *Service parent string From 04cbad81acfcb65b90194782cc369506febd854f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2024 00:20:20 -0700 Subject: [PATCH 7/8] feat(all): auto-regenerate discovery clients (#2759) --- aiplatform/v1/aiplatform-api.json | 749 +- aiplatform/v1/aiplatform-gen.go | 2683 +- aiplatform/v1beta1/aiplatform-api.json | 741 +- aiplatform/v1beta1/aiplatform-gen.go | 2872 +- .../v1alpha/analyticsadmin-api.json | 72 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 116 +- analyticsadmin/v1beta/analyticsadmin-api.json | 44 +- analyticsadmin/v1beta/analyticsadmin-gen.go | 58 +- analyticsdata/v1beta/analyticsdata-api.json | 42 +- analyticsdata/v1beta/analyticsdata-gen.go | 87 +- artifactregistry/v1/artifactregistry-api.json | 27 +- artifactregistry/v1/artifactregistry-gen.go | 98 + .../v1beta2/artifactregistry-api.json | 12 +- .../v1beta2/artifactregistry-gen.go | 14 + assuredworkloads/v1/assuredworkloads-api.json | 20 +- assuredworkloads/v1/assuredworkloads-gen.go | 10 +- .../v1beta1/assuredworkloads-api.json | 20 +- .../v1beta1/assuredworkloads-gen.go | 10 +- cloudasset/v1/cloudasset-api.json | 12 +- cloudasset/v1/cloudasset-gen.go | 12 +- content/v2.1/content-api.json | 12862 +++----- content/v2.1/content-gen.go | 25158 ++++++---------- developerconnect/v1/developerconnect-api.json | 9 +- places/v1/places-api.json | 4 +- places/v1/places-gen.go | 4 +- retail/v2/retail-api.json | 6 +- retail/v2/retail-gen.go | 11 +- retail/v2alpha/retail-api.json | 6 +- retail/v2alpha/retail-gen.go | 11 +- retail/v2beta/retail-api.json | 6 +- retail/v2beta/retail-gen.go | 11 +- .../v1/servicenetworking-api.json | 36 +- servicenetworking/v1/servicenetworking-gen.go | 40 + .../v1beta/servicenetworking-api.json | 36 +- .../v1beta/servicenetworking-gen.go | 40 + 35 files changed, 19750 insertions(+), 26189 deletions(-) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index be8c217dc61..73eec00f87c 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -305,6 +305,491 @@ }, "protocol": "rest", "resources": { + "datasets": { + "methods": { + "create": { + "description": "Creates a Dataset.", + "flatPath": "v1/datasets", + "httpMethod": "POST", + "id": "aiplatform.datasets.create", + "parameterOrder": [], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to create the Dataset in. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + } + }, + "path": "v1/datasets", + "request": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Dataset resource.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Datasets in a Location.", + "flatPath": "v1/datasets", + "httpMethod": "GET", + "id": "aiplatform.datasets.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `display_name`: supports = and != * `metadata_schema_uri`: supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. Some examples: * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the Dataset's parent resource. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/datasets", + "response": { + "$ref": "GoogleCloudAiplatformV1ListDatasetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the Dataset.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name` * `description` * `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "datasetVersions": { + "methods": { + "create": { + "description": "Create a version from a Dataset.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "POST", + "id": "aiplatform.datasets.datasetVersions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the Dataset resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/datasetVersions", + "request": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.datasetVersions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists DatasetVersions in a Dataset.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The standard list filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Dataset to list DatasetVersions from. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Optional. Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/datasetVersions", + "response": { + "$ref": "GoogleCloudAiplatformV1ListDatasetVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DatasetVersion.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.datasetVersions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the DatasetVersion.", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}:restore", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DatasetVersion resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restore", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "endpoints": { + "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/endpoints/{endpointsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1/endpoints/{endpointsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1/endpoints/{endpointsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, "projects": { "resources": { "locations": { @@ -3288,7 +3773,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -3543,7 +4028,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -13188,7 +13673,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -13304,7 +13789,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -16919,6 +17404,91 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "get": { "description": "Gets a Model Garden publisher model.", "flatPath": "v1/publishers/{publishersId}/models/{modelsId}", @@ -16975,13 +17545,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } } } } }, - "revision": "20240809", + "revision": "20240816", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -18603,7 +19202,7 @@ "The finish reason is unspecified.", "Token generation reached a natural stopping point or a configured stop sequence.", "Token generation reached the configured maximum output tokens.", - "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, Candidate.content is empty if content filters blocks the output.", + "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.", "Token generation stopped because the content potentially contains copyright violations.", "All other reasons that stopped the token generation.", "Token generation stopped because the content contains forbidden terms.", @@ -22282,7 +22881,7 @@ }, "timeSeries": { "$ref": "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries", - "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureOnlineStore.FeatureView) will treat time series sources. If not set, will treat the source as a time-series source with feature_timestamp as timestamp column and no scan boundary." + "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." } }, "type": "object" @@ -22291,7 +22890,7 @@ "id": "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries", "properties": { "timestampColumn": { - "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest featureValues for each entity. Optional. If not provided, a feature_timestamp column of type TIMESTAMP will be used.", + "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest `feature_values` for each entity. Optional. If not provided, column named `feature_timestamp` of type `TIMESTAMP` will be used.", "type": "string" } }, @@ -22912,6 +23511,11 @@ "readOnly": true, "type": "string" }, + "systemWatermarkTime": { + "description": "Lower bound of the system time watermark for the sync job. This is only set for continuously syncing feature views.", + "format": "google-datetime", + "type": "string" + }, "totalSlot": { "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", "format": "int64", @@ -23550,9 +24154,9 @@ ], "enumDescriptions": [ "Unspecified function calling mode. This value should not be used.", - "Default model behavior, model decides to predict either a function call or a natural language response.", - "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", - "Model will not predict any function call. Model behavior is same as when not passing any function declarations." + "Default model behavior, model decides to predict either function calls or natural language response.", + "Model is constrained to always predicting function calls only. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\".", + "Model will not predict any function calls. Model behavior is same as when not passing any function declarations." ], "type": "string" } @@ -23813,7 +24417,7 @@ "type": "object" }, "GoogleCloudAiplatformV1GenerationConfigRoutingConfig": { - "description": "Routing config.", + "description": "The configuration for routing the request to a specific model.", "id": "GoogleCloudAiplatformV1GenerationConfigRoutingConfig", "properties": { "autoMode": { @@ -23855,7 +24459,7 @@ "id": "GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode", "properties": { "modelName": { - "description": "The model name to use. Only the public LLM models are accepted. e.g. gemini-1.5-pro-001.", + "description": "The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'.", "type": "string" } }, @@ -27913,7 +28517,7 @@ "type": "object" }, "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter": { - "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: “a” value_int: 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1", + "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: \"a\" value_int: 42} {name: \"b\" value_float: 1.0} Database Point 1: {name: \"a\" value_int: 10} {name: \"b\" value_float: 2.0} Database Point 2: {name: \"a\" value_int: -1} {name: \"b\" value_float: 3.0} Query: {name: \"a\" value_int: 12 operator: LESS} // Matches Point 1, 2 {name: \"b\" value_float: 2.0 operator: EQUAL} // Matches Point 1", "id": "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter", "properties": { "name": { @@ -28254,7 +28858,7 @@ }, "encryptionSpec": { "$ref": "GoogleCloudAiplatformV1EncryptionSpec", - "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate has an encryption spec." + "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookService.NotebookRuntimeTemplate has an encryption spec." }, "executionTimeout": { "description": "Max running time of the execution job in seconds (default 86400s / 24 hrs).", @@ -29042,6 +29646,16 @@ "$ref": "GoogleCloudAiplatformV1ResourceRuntimeSpec", "description": "Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "startTime": { "description": "Output only. Time when the PersistentResource for the first time entered the `RUNNING` state.", "format": "google-datetime", @@ -29966,6 +30580,10 @@ "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, + "multiDeployVertex": { + "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", + "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." + }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -30092,6 +30710,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex": { + "description": "Multiple setups to deploy the PublisherModel.", + "id": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", + "properties": { + "multiDeployVertex": { + "description": "Optional. One click deployment configurations.", + "items": { + "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeploy" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines", @@ -31224,6 +31856,10 @@ "vertexAiSearch": { "$ref": "GoogleCloudAiplatformV1VertexAISearch", "description": "Set to use data source powered by Vertex AI Search." + }, + "vertexRagStore": { + "$ref": "GoogleCloudAiplatformV1VertexRagStore", + "description": "Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService." } }, "type": "object" @@ -31774,6 +32410,11 @@ "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", "type": "boolean" }, + "maxWaitDuration": { + "description": "Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.", + "format": "google-duration", + "type": "string" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" @@ -31785,21 +32426,24 @@ "ON_DEMAND", "LOW_COST", "STANDARD", - "SPOT" + "SPOT", + "DWS_FLEX_START" ], "enumDeprecated": [ false, true, true, false, + false, false ], "enumDescriptions": [ "Strategy will default to STANDARD.", - "Regular on-demand provisioning strategy.", - "Low cost by making potential use of spot resources.", + "Deprecated. Regular on-demand provisioning strategy.", + "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", - "Spot provisioning strategy uses spot resources." + "Spot provisioning strategy uses spot resources.", + "DWS Flex start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -37044,12 +37688,25 @@ "readOnly": true, "type": "string" }, + "totalTruncatedExampleCount": { + "description": "The number of examples in the dataset that have been truncated by any amount.", + "format": "int64", + "type": "string" + }, "totalTuningCharacterCount": { "description": "Output only. Number of tuning characters in the tuning dataset.", "format": "int64", "readOnly": true, "type": "string" }, + "truncatedExampleIndices": { + "description": "A partial sample of the indices (starting from 1) of the truncated examples.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "tuningDatasetExampleCount": { "description": "Output only. Number of examples in the tuning dataset.", "format": "int64", @@ -38874,16 +39531,66 @@ "type": "object" }, "GoogleCloudAiplatformV1VertexAISearch": { - "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1VertexAISearch", "properties": { "datastore": { - "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", + "description": "Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", "type": "string" } }, "type": "object" }, + "GoogleCloudAiplatformV1VertexRagStore": { + "description": "Retrieve from Vertex RAG Store for grounding.", + "id": "GoogleCloudAiplatformV1VertexRagStore", + "properties": { + "ragCorpora": { + "deprecated": true, + "description": "Optional. Deprecated. Please use rag_resources instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ragResources": { + "description": "Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.", + "items": { + "$ref": "GoogleCloudAiplatformV1VertexRagStoreRagResource" + }, + "type": "array" + }, + "similarityTopK": { + "description": "Optional. Number of top k results to return from the selected corpora.", + "format": "int32", + "type": "integer" + }, + "vectorDistanceThreshold": { + "description": "Optional. Only return results with vector distance smaller than the threshold.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1VertexRagStoreRagResource": { + "description": "The definition of the Rag resource.", + "id": "GoogleCloudAiplatformV1VertexRagStoreRagResource", + "properties": { + "ragCorpus": { + "description": "Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", + "type": "string" + }, + "ragFileIds": { + "description": "Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1VideoMetadata": { "description": "Metadata describes the input video content.", "id": "GoogleCloudAiplatformV1VideoMetadata", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index dae57bb4796..cb450856922 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -145,6 +145,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Datasets = NewDatasetsService(s) + s.Endpoints = NewEndpointsService(s) s.Projects = NewProjectsService(s) s.Publishers = NewPublishersService(s) return s, nil @@ -155,6 +157,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Datasets *DatasetsService + + Endpoints *EndpointsService + Projects *ProjectsService Publishers *PublishersService @@ -167,6 +173,36 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewDatasetsService(s *Service) *DatasetsService { + rs := &DatasetsService{s: s} + rs.DatasetVersions = NewDatasetsDatasetVersionsService(s) + return rs +} + +type DatasetsService struct { + s *Service + + DatasetVersions *DatasetsDatasetVersionsService +} + +func NewDatasetsDatasetVersionsService(s *Service) *DatasetsDatasetVersionsService { + rs := &DatasetsDatasetVersionsService{s: s} + return rs +} + +type DatasetsDatasetVersionsService struct { + s *Service +} + +func NewEndpointsService(s *Service) *EndpointsService { + rs := &EndpointsService{s: s} + return rs +} + +type EndpointsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -3702,8 +3738,8 @@ type GoogleCloudAiplatformV1Candidate struct { // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially - // contains safety violations. NOTE: When streaming, Candidate.content is empty - // if content filters blocks the output. + // contains safety violations. NOTE: When streaming, content is empty if + // content filters blocks the output. // "RECITATION" - Token generation stopped because the content potentially // contains copyright violations. // "OTHER" - All other reasons that stopped the token generation. @@ -8894,10 +8930,9 @@ type GoogleCloudAiplatformV1FeatureGroupBigQuery struct { // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` // TimeSeries: Optional. If the source is a time-series source, this can be set - // to control how downstream sources (ex: FeatureOnlineStore.FeatureView) will - // treat time series sources. If not set, will treat the source as a - // time-series source with feature_timestamp as timestamp column and no scan - // boundary. + // to control how downstream sources (ex: FeatureView ) will treat time-series + // sources. If not set, will treat the source as a time-series source with + // `feature_timestamp` as timestamp column and no scan boundary. TimeSeries *GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries `json:"timeSeries,omitempty"` // ForceSendFields is a list of field names (e.g. "BigQuerySource") to // unconditionally include in API requests. By default, fields with empty or @@ -8919,9 +8954,9 @@ func (s GoogleCloudAiplatformV1FeatureGroupBigQuery) MarshalJSON() ([]byte, erro type GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries struct { // TimestampColumn: Optional. Column hosting timestamp values for a time-series - // source. Will be used to determine the latest featureValues for each entity. - // Optional. If not provided, a feature_timestamp column of type TIMESTAMP will - // be used. + // source. Will be used to determine the latest `feature_values` for each + // entity. Optional. If not provided, column named `feature_timestamp` of type + // `TIMESTAMP` will be used. TimestampColumn string `json:"timestampColumn,omitempty"` // ForceSendFields is a list of field names (e.g. "TimestampColumn") to // unconditionally include in API requests. By default, fields with empty or @@ -9817,6 +9852,9 @@ func (s GoogleCloudAiplatformV1FeatureViewSyncConfig) MarshalJSON() ([]byte, err type GoogleCloudAiplatformV1FeatureViewSyncSyncSummary struct { // RowSynced: Output only. Total number of rows synced. RowSynced int64 `json:"rowSynced,omitempty,string"` + // SystemWatermarkTime: Lower bound of the system time watermark for the sync + // job. This is only set for continuously syncing feature views. + SystemWatermarkTime string `json:"systemWatermarkTime,omitempty"` // TotalSlot: Output only. BigQuery slot milliseconds consumed for the sync // job. TotalSlot int64 `json:"totalSlot,omitempty,string"` @@ -10891,13 +10929,13 @@ type GoogleCloudAiplatformV1FunctionCallingConfig struct { // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. - // "AUTO" - Default model behavior, model decides to predict either a - // function call or a natural language response. - // "ANY" - Model is constrained to always predicting a function call only. If - // "allowed_function_names" are set, the predicted function call will be + // "AUTO" - Default model behavior, model decides to predict either function + // calls or natural language response. + // "ANY" - Model is constrained to always predicting function calls only. If + // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function - // call will be any one of the provided "function_declarations". - // "NONE" - Model will not predict any function call. Model behavior is same + // calls will be any one of the provided "function_declarations". + // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to @@ -11253,7 +11291,8 @@ func (s *GoogleCloudAiplatformV1GenerationConfig) UnmarshalJSON(data []byte) err return nil } -// GoogleCloudAiplatformV1GenerationConfigRoutingConfig: Routing config. +// GoogleCloudAiplatformV1GenerationConfigRoutingConfig: The configuration for +// routing the request to a specific model. type GoogleCloudAiplatformV1GenerationConfigRoutingConfig struct { // AutoMode: Automated routing. AutoMode *GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode `json:"autoMode,omitempty"` @@ -11311,7 +11350,7 @@ func (s GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode) Mar // manual routing is set, the specified model will be used directly. type GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode struct { // ModelName: The model name to use. Only the public LLM models are accepted. - // e.g. gemini-1.5-pro-001. + // e.g. 'gemini-1.5-pro-001'. ModelName string `json:"modelName,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelName") to // unconditionally include in API requests. By default, fields with empty or @@ -17002,12 +17041,11 @@ func (s *GoogleCloudAiplatformV1NearestNeighborQueryEmbedding) UnmarshalJSON(dat // GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter: Numeric filter is // used to search a subset of the entities by using boolean rules on numeric -// columns. For example: Database Point 0: {name: “a” value_int: 42} {name: -// “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} -// {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -// -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 -// operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 -// operator: EQUAL} // Matches Point 1 +// columns. For example: Database Point 0: {name: "a" value_int: 42} {name: "b" +// value_float: 1.0} Database Point 1: {name: "a" value_int: 10} {name: "b" +// value_float: 2.0} Database Point 2: {name: "a" value_int: -1} {name: "b" +// value_float: 3.0} Query: {name: "a" value_int: 12 operator: LESS} // Matches +// Point 1, 2 {name: "b" value_float: 2.0 operator: EQUAL} // Matches Point 1 type GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter struct { // Name: Required. Column name in BigQuery that used as filters. Name string `json:"name,omitempty"` @@ -17474,8 +17512,8 @@ type GoogleCloudAiplatformV1NotebookExecutionJob struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for the notebook - // execution job. This field is auto-populated if the NotebookRuntimeTemplate - // has an encryption spec. + // execution job. This field is auto-populated if the + // NotebookService.NotebookRuntimeTemplate has an encryption spec. EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` // ExecutionTimeout: Max running time of the execution job in seconds (default // 86400s / 24 hrs). @@ -18392,6 +18430,10 @@ type GoogleCloudAiplatformV1PersistentResource struct { // ResourceRuntimeSpec: Optional. Persistent Resource runtime spec. For // example, used for Ray cluster configuration. ResourceRuntimeSpec *GoogleCloudAiplatformV1ResourceRuntimeSpec `json:"resourceRuntimeSpec,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // StartTime: Output only. Time when the PersistentResource for the first time // entered the `RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -19538,6 +19580,9 @@ type GoogleCloudAiplatformV1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` + // MultiDeployVertex: Optional. Multiple setups to deploy the PublisherModel to + // Vertex Endpoint. + MultiDeployVertex *GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -19682,6 +19727,29 @@ func (s GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex: Multiple +// setups to deploy the PublisherModel. +type GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex struct { + // MultiDeployVertex: Optional. One click deployment configurations. + MultiDeployVertex []*GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` + // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MultiDeployVertex") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines: // Open fine tuning pipelines. type GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -21511,6 +21579,9 @@ type GoogleCloudAiplatformV1Retrieval struct { DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1VertexAISearch `json:"vertexAiSearch,omitempty"` + // VertexRagStore: Set to use data source powered by Vertex RAG store. User + // data is uploaded via the VertexRagDataService. + VertexRagStore *GoogleCloudAiplatformV1VertexRagStore `json:"vertexRagStore,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableAttribution") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -22241,6 +22312,11 @@ type GoogleCloudAiplatformV1Scheduling struct { // errors after the job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. DisableRetries bool `json:"disableRetries,omitempty"` + // MaxWaitDuration: Optional. This is the maximum duration that a job will wait + // for the requested resources to be provisioned if the scheduling strategy is + // set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait + // indefinitely. The default is 24 hours. + MaxWaitDuration string `json:"maxWaitDuration,omitempty"` // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker gets // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. @@ -22250,11 +22326,14 @@ type GoogleCloudAiplatformV1Scheduling struct { // // Possible values: // "STRATEGY_UNSPECIFIED" - Strategy will default to STANDARD. - // "ON_DEMAND" - Regular on-demand provisioning strategy. - // "LOW_COST" - Low cost by making potential use of spot resources. + // "ON_DEMAND" - Deprecated. Regular on-demand provisioning strategy. + // "LOW_COST" - Deprecated. Low cost by making potential use of spot + // resources. // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. + // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for + // resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -30708,9 +30787,15 @@ type GoogleCloudAiplatformV1SupervisedTuningDataStats struct { // TotalBillableTokenCount: Output only. Number of billable tokens in the // tuning dataset. TotalBillableTokenCount int64 `json:"totalBillableTokenCount,omitempty,string"` + // TotalTruncatedExampleCount: The number of examples in the dataset that have + // been truncated by any amount. + TotalTruncatedExampleCount int64 `json:"totalTruncatedExampleCount,omitempty,string"` // TotalTuningCharacterCount: Output only. Number of tuning characters in the // tuning dataset. TotalTuningCharacterCount int64 `json:"totalTuningCharacterCount,omitempty,string"` + // TruncatedExampleIndices: A partial sample of the indices (starting from 1) + // of the truncated examples. + TruncatedExampleIndices googleapi.Int64s `json:"truncatedExampleIndices,omitempty"` // TuningDatasetExampleCount: Output only. Number of examples in the tuning // dataset. TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` @@ -33242,10 +33327,9 @@ func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { } // GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See -// https://cloud.google.com/vertex-ai-search-and-conversation +// datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource + // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` @@ -33268,6 +33352,81 @@ func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for +// grounding. +type GoogleCloudAiplatformV1VertexRagStore struct { + // RagCorpora: Optional. Deprecated. Please use rag_resources instead. + RagCorpora []string `json:"ragCorpora,omitempty"` + // RagResources: Optional. The representation of the rag source. It can be used + // to specify corpus only or ragfiles. Currently only support one corpus or + // multiple files from one corpus. In the future we may open up multiple + // corpora support. + RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` + // SimilarityTopK: Optional. Number of top k results to return from the + // selected corpora. + SimilarityTopK int64 `json:"similarityTopK,omitempty"` + // VectorDistanceThreshold: Optional. Only return results with vector distance + // smaller than the threshold. + VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpora") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagCorpora") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + var s1 struct { + VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) + return nil +} + +// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag +// resource. +type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { + // RagCorpus: Optional. RagCorpora resource name. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + RagCorpus string `json:"ragCorpus,omitempty"` + // RagFileIds: Optional. rag_file_id. The files should be in the same + // rag_corpus set in rag_corpus field. + RagFileIds []string `json:"ragFileIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpus") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagCorpus") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video // content. type GoogleCloudAiplatformV1VideoMetadata struct { @@ -34176,78 +34335,175 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ProjectsLocationsEvaluateInstancesCall struct { - s *Service - location string - googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EvaluateInstances: Evaluates instances based on a given metric. -// -// - location: The resource name of the Location to evaluate the instances. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { - c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("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 *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { +func (c *DatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsCreateCall) 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.googlecloudaiplatformv1evaluateinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset. +// +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Do executes the "aiplatform.datasets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, error) { +func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34266,7 +34522,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34279,7 +34535,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsGetCall struct { +type DatasetsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34288,19 +34544,26 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets a Dataset. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34308,27 +34571,27 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *DatasetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34349,13 +34612,13 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.get" call. +// Do executes the "aiplatform.datasets.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34374,7 +34637,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34387,52 +34650,73 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { +type DatasetsListCall struct { s *Service - name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this service. -// -// - name: The resource that owns the locations collection, if applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// Filter sets the optional parameter "filter": A filter to narrow down results -// to a preferred subset. The filtering language accepts strings like -// "displayName=tokyo", and is documented in more detail in AIP-160 -// (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token received -// from the `next_page_token` field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34440,27 +34724,27 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *DatasetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34468,26 +34752,23 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.list" call. +// Do executes the "aiplatform.datasets.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34506,7 +34787,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34522,7 +34803,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { +func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -34540,69 +34821,69 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleClo } } -type ProjectsLocationsBatchPredictionJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on -// the BatchPredictionJob. The server makes the best effort to cancel the job, -// but success is not guaranteed. Clients can use -// JobService.GetBatchPredictionJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// a successful cancellation, the BatchPredictionJob is not deleted;instead its -// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted -// by the job are not deleted. +// Patch: Updates a Dataset. // -// - name: The name of the BatchPredictionJob to cancel. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { - c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { +func (c *DatasetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsPatchCall) 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.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -34613,13 +34894,13 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Do executes the "aiplatform.datasets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34638,7 +34919,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34651,60 +34932,59 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will -// right away be attempted to start. +// Create: Create a version from a Dataset. // -// - parent: The resource name of the Location to create the BatchPredictionJob -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { - c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { +func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDatasetVersionsCreateCall) 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.googlecloudaiplatformv1batchpredictionjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34717,13 +34997,13 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.create" call. +// Do executes the "aiplatform.datasets.datasetVersions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34742,7 +35022,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34755,7 +35035,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsDeleteCall struct { +type DatasetsDatasetVersionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34763,14 +35043,13 @@ type ProjectsLocationsBatchPredictionJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that -// already finished. +// Delete: Deletes a Dataset version. // -// - name: The name of the BatchPredictionJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { - c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34778,27 +35057,27 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { +func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -34816,13 +35095,1612 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. +// Do executes the "aiplatform.datasets.datasetVersions.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + 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 DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + 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 "aiplatform.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) 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.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + 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 DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.restore" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) 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.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + 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 EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) 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.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + 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 EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) 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.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + 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 EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) 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.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + 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 ProjectsLocationsEvaluateInstancesCall struct { + s *Service + location string + googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EvaluateInstances: Evaluates instances based on a given metric. +// +// - location: The resource name of the Location to evaluate the instances. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { + c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluateInstancesCall) 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.googlecloudaiplatformv1evaluateinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, 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 := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + 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 ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, 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 := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, 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 := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsBatchPredictionJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on +// the BatchPredictionJob. The server makes the best effort to cancel the job, +// but success is not guaranteed. Clients can use +// JobService.GetBatchPredictionJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// a successful cancellation, the BatchPredictionJob is not deleted;instead its +// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted +// by the job are not deleted. +// +// - name: The name of the BatchPredictionJob to cancel. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { + c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) 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.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsBatchPredictionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will +// right away be attempted to start. +// +// - parent: The resource name of the Location to create the BatchPredictionJob +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { + c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) 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.googlecloudaiplatformv1batchpredictionjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + 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 "aiplatform.projects.locations.batchPredictionJobs.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, 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 := &GoogleCloudAiplatformV1BatchPredictionJob{ + 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 ProjectsLocationsBatchPredictionJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that +// already finished. +// +// - name: The name of the BatchPredictionJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44956,8 +46834,11 @@ type ProjectsLocationsEndpointsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -45875,8 +47756,11 @@ type ProjectsLocationsEndpointsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -81580,8 +83464,11 @@ type ProjectsLocationsPublishersModelsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -81998,8 +83885,11 @@ type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -95414,6 +97304,318 @@ func (c *ProjectsLocationsTuningJobsOperationsListCall) Pages(ctx context.Contex } } +type PublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *PublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *PublishersModelsComputeTokensCall { + c := &PublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *PublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsComputeTokensCall) Context(ctx context.Context) *PublishersModelsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsComputeTokensCall) 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.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + 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 PublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *PublishersModelsCountTokensCall { + c := &PublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *PublishersModelsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsCountTokensCall) Context(ctx context.Context) *PublishersModelsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsCountTokensCall) 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.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + 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 PublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *PublishersModelsGenerateContentCall { + c := &PublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsGenerateContentCall) Context(ctx context.Context) *PublishersModelsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsGenerateContentCall) 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.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + 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 PublishersModelsGetCall struct { s *Service name string @@ -95566,3 +97768,110 @@ func (c *PublishersModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloud } return ret, nil } + +type PublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *PublishersModelsStreamGenerateContentCall { + c := &PublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *PublishersModelsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsStreamGenerateContentCall) 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.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index e4d53a0c0b7..712436009e2 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -305,6 +305,492 @@ }, "protocol": "rest", "resources": { + "datasets": { + "methods": { + "create": { + "description": "Creates a Dataset.", + "flatPath": "v1beta1/datasets", + "httpMethod": "POST", + "id": "aiplatform.datasets.create", + "parameterOrder": [], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to create the Dataset in. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/datasets", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Dataset resource.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Datasets in a Location.", + "flatPath": "v1beta1/datasets", + "httpMethod": "GET", + "id": "aiplatform.datasets.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `display_name`: supports = and != * `metadata_schema_uri`: supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. Some examples: * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the Dataset's parent resource. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/datasets", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ListDatasetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the Dataset.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name` * `description` * `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "datasetVersions": { + "methods": { + "create": { + "description": "Create a version from a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "POST", + "id": "aiplatform.datasets.datasetVersions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the Dataset resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/datasetVersions", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.datasetVersions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists DatasetVersions in a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The standard list filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Dataset to list DatasetVersions from. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Optional. Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/datasetVersions", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DatasetVersion.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.datasetVersions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the DatasetVersion.", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}:restore", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DatasetVersion resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:restore", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "endpoints": { + "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1beta1/endpoints/{endpointsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1beta1/endpoints/{endpointsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/endpoints/{endpointsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, "media": { "methods": { "upload": { @@ -4033,7 +4519,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -4342,7 +4828,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -4463,7 +4949,7 @@ ], "parameters": { "endpoint": { - "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/openapi`", + "description": "Required. The name of the endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -15688,7 +16174,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -15835,7 +16321,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -20327,6 +20813,92 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "get": { "description": "Gets a Model Garden publisher model.", "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}", @@ -20451,13 +21023,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } } } } }, - "revision": "20240809", + "revision": "20240816", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22348,7 +22949,7 @@ "The finish reason is unspecified.", "Token generation reached a natural stopping point or a configured stop sequence.", "Token generation reached the configured maximum output tokens.", - "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, Candidate.content is empty if content filters blocks the output.", + "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.", "Token generation stopped because the content potentially contains copyright violations.", "All other reasons that stopped the token generation.", "Token generation stopped because the content contains forbidden terms.", @@ -26494,7 +27095,7 @@ }, "timeSeries": { "$ref": "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries", - "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureOnlineStore.FeatureView) will treat time series sources. If not set, will treat the source as a time-series source with feature_timestamp as timestamp column and no scan boundary." + "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." } }, "type": "object" @@ -26503,7 +27104,7 @@ "id": "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries", "properties": { "timestampColumn": { - "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest featureValues for each entity. Optional. If not provided, a feature_timestamp column of type TIMESTAMP will be used.", + "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest `feature_values` for each entity. Optional. If not provided, column named `feature_timestamp` of type `TIMESTAMP` will be used.", "type": "string" } }, @@ -27165,6 +27766,11 @@ "readOnly": true, "type": "string" }, + "systemWatermarkTime": { + "description": "Lower bound of the system time watermark for the sync job. This is only set for continuously syncing feature views.", + "format": "google-datetime", + "type": "string" + }, "totalSlot": { "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", "format": "int64", @@ -27897,9 +28503,9 @@ ], "enumDescriptions": [ "Unspecified function calling mode. This value should not be used.", - "Default model behavior, model decides to predict either a function call or a natural language response.", - "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", - "Model will not predict any function call. Model behavior is same as when not passing any function declarations." + "Default model behavior, model decides to predict either function calls or natural language response.", + "Model is constrained to always predicting function calls only. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\".", + "Model will not predict any function calls. Model behavior is same as when not passing any function declarations." ], "type": "string" } @@ -28229,7 +28835,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig": { - "description": "Routing config.", + "description": "The configuration for routing the request to a specific model.", "id": "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig", "properties": { "autoMode": { @@ -28271,7 +28877,7 @@ "id": "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode", "properties": { "modelName": { - "description": "The model name to use. Only the public LLM models are accepted. e.g. gemini-1.5-pro-001.", + "description": "The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'.", "type": "string" } }, @@ -29431,7 +30037,8 @@ "EUC_AGENT_API_STATE", "IDLE_SHUTDOWN_AGENT_STATE", "PROXY_AGENT_STATE", - "GCR_DNS_STATE" + "GCR_DNS_STATE", + "GUEST_ATTRIBUTE_STATE" ], "enumDescriptions": [ "Service name unknown.", @@ -29444,7 +30051,8 @@ "Represents the EUC agent server API endpoint.", "Represents the idle shutdown agent sidecar container.", "Represents the proxy agent sidecar container.", - "Represents resolving DNS for the gcr.io endpoint." + "Represents resolving DNS for the gcr.io endpoint.", + "Represents if the guest attribute service is enabled." ], "type": "string" }, @@ -33442,7 +34050,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter": { - "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: “a” value_int: 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1", + "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: \"a\" value_int: 42} {name: \"b\" value_float: 1.0} Database Point 1: {name: \"a\" value_int: 10} {name: \"b\" value_float: 2.0} Database Point 2: {name: \"a\" value_int: -1} {name: \"b\" value_float: 3.0} Query: {name: \"a\" value_int: 12 operator: LESS} // Matches Point 1, 2 {name: \"b\" value_float: 2.0 operator: EQUAL} // Matches Point 1", "id": "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter", "properties": { "name": { @@ -33783,7 +34391,7 @@ }, "encryptionSpec": { "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", - "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate has an encryption spec." + "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookService.NotebookRuntimeTemplate has an encryption spec." }, "executionTimeout": { "description": "Max running time of the execution job in seconds (default 86400s / 24 hrs).", @@ -34575,6 +35183,16 @@ "$ref": "GoogleCloudAiplatformV1beta1ResourceRuntimeSpec", "description": "Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "startTime": { "description": "Output only. Time when the PersistentResource for the first time entered the `RUNNING` state.", "format": "google-datetime", @@ -35541,6 +36159,10 @@ "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, + "multiDeployVertex": { + "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", + "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." + }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -35667,6 +36289,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex": { + "description": "Multiple setups to deploy the PublisherModel.", + "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", + "properties": { + "multiDeployVertex": { + "description": "Optional. One click deployment configurations.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines", @@ -36630,10 +37266,6 @@ "description": "Specifies the parsing config for RagFiles.", "id": "GoogleCloudAiplatformV1beta1RagFileParsingConfig", "properties": { - "parsePdfsUsingOcr": { - "description": "Whether to use OCR for PDFs.", - "type": "boolean" - }, "useAdvancedPdfParsing": { "description": "Whether to use advanced PDF parsing.", "type": "boolean" @@ -36645,6 +37277,10 @@ "description": "A query to retrieve relevant contexts.", "id": "GoogleCloudAiplatformV1beta1RagQuery", "properties": { + "ranking": { + "$ref": "GoogleCloudAiplatformV1beta1RagQueryRanking", + "description": "Optional. Configurations for hybrid search results ranking." + }, "similarityTopK": { "description": "Optional. The number of contexts to retrieve.", "format": "int32", @@ -36657,6 +37293,18 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagQueryRanking": { + "description": "Configurations for hybrid search results ranking.", + "id": "GoogleCloudAiplatformV1beta1RagQueryRanking", + "properties": { + "alpha": { + "description": "Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RawPredictRequest": { "description": "Request message for PredictionService.RawPredict.", "id": "GoogleCloudAiplatformV1beta1RawPredictRequest", @@ -37381,10 +38029,6 @@ }, "type": "array" }, - "ranking": { - "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking", - "description": "Optional. Configurations for hybrid search results ranking." - }, "vectorDistanceThreshold": { "description": "Optional. Only return contexts with vector distance smaller than the threshold.", "format": "double", @@ -37411,18 +38055,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking": { - "description": "Configurations for hybrid search results ranking.", - "id": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking", - "properties": { - "alpha": { - "description": "Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RetrieveContextsResponse": { "description": "Response message for VertexRagService.RetrieveContexts.", "id": "GoogleCloudAiplatformV1beta1RetrieveContextsResponse", @@ -38039,6 +38671,11 @@ "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", "type": "boolean" }, + "maxWaitDuration": { + "description": "Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.", + "format": "google-duration", + "type": "string" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" @@ -38050,21 +38687,24 @@ "ON_DEMAND", "LOW_COST", "STANDARD", - "SPOT" + "SPOT", + "DWS_FLEX_START" ], "enumDeprecated": [ false, true, true, false, + false, false ], "enumDescriptions": [ "Strategy will default to STANDARD.", - "Regular on-demand provisioning strategy.", - "Low cost by making potential use of spot resources.", + "Deprecated. Regular on-demand provisioning strategy.", + "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", - "Spot provisioning strategy uses spot resources." + "Spot provisioning strategy uses spot resources.", + "DWS Flex start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -43471,12 +44111,25 @@ "readOnly": true, "type": "string" }, + "totalTruncatedExampleCount": { + "description": "The number of examples in the dataset that have been truncated by any amount.", + "format": "int64", + "type": "string" + }, "totalTuningCharacterCount": { "description": "Output only. Number of tuning characters in the tuning dataset.", "format": "int64", "readOnly": true, "type": "string" }, + "truncatedExampleIndices": { + "description": "A partial sample of the indices (starting from 1) of the truncated examples.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "tuningDatasetExampleCount": { "description": "Output only. Number of examples in the tuning dataset.", "format": "int64", @@ -45436,11 +46089,11 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1VertexAISearch": { - "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1beta1VertexAISearch", "properties": { "datastore": { - "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", + "description": "Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", "type": "string" } }, diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index d63a29924a3..1c6a0879bf3 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -145,6 +145,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Datasets = NewDatasetsService(s) + s.Endpoints = NewEndpointsService(s) s.Media = NewMediaService(s) s.Projects = NewProjectsService(s) s.Publishers = NewPublishersService(s) @@ -156,6 +158,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Datasets *DatasetsService + + Endpoints *EndpointsService + Media *MediaService Projects *ProjectsService @@ -170,6 +176,36 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewDatasetsService(s *Service) *DatasetsService { + rs := &DatasetsService{s: s} + rs.DatasetVersions = NewDatasetsDatasetVersionsService(s) + return rs +} + +type DatasetsService struct { + s *Service + + DatasetVersions *DatasetsDatasetVersionsService +} + +func NewDatasetsDatasetVersionsService(s *Service) *DatasetsDatasetVersionsService { + rs := &DatasetsDatasetVersionsService{s: s} + return rs +} + +type DatasetsDatasetVersionsService struct { + s *Service +} + +func NewEndpointsService(s *Service) *EndpointsService { + rs := &EndpointsService{s: s} + return rs +} + +type EndpointsService struct { + s *Service +} + func NewMediaService(s *Service) *MediaService { rs := &MediaService{s: s} return rs @@ -4402,8 +4438,8 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially - // contains safety violations. NOTE: When streaming, Candidate.content is empty - // if content filters blocks the output. + // contains safety violations. NOTE: When streaming, content is empty if + // content filters blocks the output. // "RECITATION" - Token generation stopped because the content potentially // contains copyright violations. // "OTHER" - All other reasons that stopped the token generation. @@ -10231,10 +10267,9 @@ type GoogleCloudAiplatformV1beta1FeatureGroupBigQuery struct { // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` // TimeSeries: Optional. If the source is a time-series source, this can be set - // to control how downstream sources (ex: FeatureOnlineStore.FeatureView) will - // treat time series sources. If not set, will treat the source as a - // time-series source with feature_timestamp as timestamp column and no scan - // boundary. + // to control how downstream sources (ex: FeatureView ) will treat time-series + // sources. If not set, will treat the source as a time-series source with + // `feature_timestamp` as timestamp column and no scan boundary. TimeSeries *GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries `json:"timeSeries,omitempty"` // ForceSendFields is a list of field names (e.g. "BigQuerySource") to // unconditionally include in API requests. By default, fields with empty or @@ -10256,9 +10291,9 @@ func (s GoogleCloudAiplatformV1beta1FeatureGroupBigQuery) MarshalJSON() ([]byte, type GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries struct { // TimestampColumn: Optional. Column hosting timestamp values for a time-series - // source. Will be used to determine the latest featureValues for each entity. - // Optional. If not provided, a feature_timestamp column of type TIMESTAMP will - // be used. + // source. Will be used to determine the latest `feature_values` for each + // entity. Optional. If not provided, column named `feature_timestamp` of type + // `TIMESTAMP` will be used. TimestampColumn string `json:"timestampColumn,omitempty"` // ForceSendFields is a list of field names (e.g. "TimestampColumn") to // unconditionally include in API requests. By default, fields with empty or @@ -11215,6 +11250,9 @@ func (s GoogleCloudAiplatformV1beta1FeatureViewSyncConfig) MarshalJSON() ([]byte type GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary struct { // RowSynced: Output only. Total number of rows synced. RowSynced int64 `json:"rowSynced,omitempty,string"` + // SystemWatermarkTime: Lower bound of the system time watermark for the sync + // job. This is only set for continuously syncing feature views. + SystemWatermarkTime string `json:"systemWatermarkTime,omitempty"` // TotalSlot: Output only. BigQuery slot milliseconds consumed for the sync // job. TotalSlot int64 `json:"totalSlot,omitempty,string"` @@ -12394,13 +12432,13 @@ type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. - // "AUTO" - Default model behavior, model decides to predict either a - // function call or a natural language response. - // "ANY" - Model is constrained to always predicting a function call only. If - // "allowed_function_names" are set, the predicted function call will be + // "AUTO" - Default model behavior, model decides to predict either function + // calls or natural language response. + // "ANY" - Model is constrained to always predicting function calls only. If + // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function - // call will be any one of the provided "function_declarations". - // "NONE" - Model will not predict any function call. Model behavior is same + // calls will be any one of the provided "function_declarations". + // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to @@ -12854,7 +12892,8 @@ func (s *GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON(data []byte return nil } -// GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig: Routing config. +// GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig: The configuration +// for routing the request to a specific model. type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig struct { // AutoMode: Automated routing. AutoMode *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode `json:"autoMode,omitempty"` @@ -12912,7 +12951,7 @@ func (s GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode // When manual routing is set, the specified model will be used directly. type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode struct { // ModelName: The model name to use. Only the public LLM models are accepted. - // e.g. gemini-1.5-pro-001. + // e.g. 'gemini-1.5-pro-001'. ModelName string `json:"modelName,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelName") to // unconditionally include in API requests. By default, fields with empty or @@ -14433,6 +14472,8 @@ type GoogleCloudAiplatformV1beta1InternalOsServiceStateInstance struct { // container. // "PROXY_AGENT_STATE" - Represents the proxy agent sidecar container. // "GCR_DNS_STATE" - Represents resolving DNS for the gcr.io endpoint. + // "GUEST_ATTRIBUTE_STATE" - Represents if the guest attribute service is + // enabled. ServiceName string `json:"serviceName,omitempty"` // ServiceState: Required. internal service state. // @@ -20228,12 +20269,12 @@ func (s *GoogleCloudAiplatformV1beta1NearestNeighborQueryEmbedding) UnmarshalJSO // GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter: Numeric // filter is used to search a subset of the entities by using boolean rules on -// numeric columns. For example: Database Point 0: {name: “a” value_int: -// 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” -// value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: -// “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: -// “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” -// value_float: 2.0 operator: EQUAL} // Matches Point 1 +// numeric columns. For example: Database Point 0: {name: "a" value_int: 42} +// {name: "b" value_float: 1.0} Database Point 1: {name: "a" value_int: 10} +// {name: "b" value_float: 2.0} Database Point 2: {name: "a" value_int: -1} +// {name: "b" value_float: 3.0} Query: {name: "a" value_int: 12 operator: LESS} +// // Matches Point 1, 2 {name: "b" value_float: 2.0 operator: EQUAL} // +// Matches Point 1 type GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter struct { // Name: Required. Column name in BigQuery that used as filters. Name string `json:"name,omitempty"` @@ -20702,8 +20743,8 @@ type GoogleCloudAiplatformV1beta1NotebookExecutionJob struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for the notebook - // execution job. This field is auto-populated if the NotebookRuntimeTemplate - // has an encryption spec. + // execution job. This field is auto-populated if the + // NotebookService.NotebookRuntimeTemplate has an encryption spec. EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // ExecutionTimeout: Max running time of the execution job in seconds (default // 86400s / 24 hrs). @@ -21624,6 +21665,10 @@ type GoogleCloudAiplatformV1beta1PersistentResource struct { // ResourceRuntimeSpec: Optional. Persistent Resource runtime spec. For // example, used for Ray cluster configuration. ResourceRuntimeSpec *GoogleCloudAiplatformV1beta1ResourceRuntimeSpec `json:"resourceRuntimeSpec,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // StartTime: Output only. Time when the PersistentResource for the first time // entered the `RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -22840,6 +22885,9 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` + // MultiDeployVertex: Optional. Multiple setups to deploy the PublisherModel to + // Vertex Endpoint. + MultiDeployVertex *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -22984,6 +23032,29 @@ func (s GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex: Multiple +// setups to deploy the PublisherModel. +type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex struct { + // MultiDeployVertex: Optional. One click deployment configurations. + MultiDeployVertex []*GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` + // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MultiDeployVertex") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines // : Open fine tuning pipelines. type GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -24447,19 +24518,17 @@ func (s GoogleCloudAiplatformV1beta1RagFileChunkingConfig) MarshalJSON() ([]byte // GoogleCloudAiplatformV1beta1RagFileParsingConfig: Specifies the parsing // config for RagFiles. type GoogleCloudAiplatformV1beta1RagFileParsingConfig struct { - // ParsePdfsUsingOcr: Whether to use OCR for PDFs. - ParsePdfsUsingOcr bool `json:"parsePdfsUsingOcr,omitempty"` // UseAdvancedPdfParsing: Whether to use advanced PDF parsing. UseAdvancedPdfParsing bool `json:"useAdvancedPdfParsing,omitempty"` - // ForceSendFields is a list of field names (e.g. "ParsePdfsUsingOcr") to + // ForceSendFields is a list of field names (e.g. "UseAdvancedPdfParsing") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ParsePdfsUsingOcr") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "UseAdvancedPdfParsing") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -24471,19 +24540,21 @@ func (s GoogleCloudAiplatformV1beta1RagFileParsingConfig) MarshalJSON() ([]byte, // GoogleCloudAiplatformV1beta1RagQuery: A query to retrieve relevant contexts. type GoogleCloudAiplatformV1beta1RagQuery struct { + // Ranking: Optional. Configurations for hybrid search results ranking. + Ranking *GoogleCloudAiplatformV1beta1RagQueryRanking `json:"ranking,omitempty"` // SimilarityTopK: Optional. The number of contexts to retrieve. SimilarityTopK int64 `json:"similarityTopK,omitempty"` // Text: Optional. The query in text format to get relevant contexts. Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "SimilarityTopK") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Ranking") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SimilarityTopK") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Ranking") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -24493,6 +24564,46 @@ func (s GoogleCloudAiplatformV1beta1RagQuery) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagQueryRanking: Configurations for hybrid +// search results ranking. +type GoogleCloudAiplatformV1beta1RagQueryRanking struct { + // Alpha: Optional. Alpha value controls the weight between dense and sparse + // vector search results. The range is [0, 1], while 0 means sparse vector + // search only and 1 means dense vector search only. The default value is 0.5 + // which balances sparse and dense vector search equally. + Alpha float64 `json:"alpha,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Alpha") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagQueryRanking) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagQueryRanking + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1RagQueryRanking) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1RagQueryRanking + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + return nil +} + // GoogleCloudAiplatformV1beta1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1beta1RawPredictRequest struct { @@ -25620,8 +25731,6 @@ type GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore struct { // multiple files from one corpus. In the future we may open up multiple // corpora support. RagResources []*GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRagResource `json:"ragResources,omitempty"` - // Ranking: Optional. Configurations for hybrid search results ranking. - Ranking *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking `json:"ranking,omitempty"` // VectorDistanceThreshold: Optional. Only return contexts with vector distance // smaller than the threshold. VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` @@ -25685,46 +25794,6 @@ func (s GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRagReso return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking: -// Configurations for hybrid search results ranking. -type GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking struct { - // Alpha: Optional. Alpha value controls the weight between dense and sparse - // vector search results. The range is [0, 1], while 0 means sparse vector - // search only and 1 means dense vector search only. The default value is 0.5 - // which balances sparse and dense vector search equally. - Alpha float64 `json:"alpha,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alpha") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - return nil -} - // GoogleCloudAiplatformV1beta1RetrieveContextsResponse: Response message for // VertexRagService.RetrieveContexts. type GoogleCloudAiplatformV1beta1RetrieveContextsResponse struct { @@ -26565,6 +26634,11 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // errors after the job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. DisableRetries bool `json:"disableRetries,omitempty"` + // MaxWaitDuration: Optional. This is the maximum duration that a job will wait + // for the requested resources to be provisioned if the scheduling strategy is + // set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait + // indefinitely. The default is 24 hours. + MaxWaitDuration string `json:"maxWaitDuration,omitempty"` // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker gets // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. @@ -26574,11 +26648,14 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // // Possible values: // "STRATEGY_UNSPECIFIED" - Strategy will default to STANDARD. - // "ON_DEMAND" - Regular on-demand provisioning strategy. - // "LOW_COST" - Low cost by making potential use of spot resources. + // "ON_DEMAND" - Deprecated. Regular on-demand provisioning strategy. + // "LOW_COST" - Deprecated. Low cost by making potential use of spot + // resources. // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. + // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for + // resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -35312,9 +35389,15 @@ type GoogleCloudAiplatformV1beta1SupervisedTuningDataStats struct { // TotalBillableTokenCount: Output only. Number of billable tokens in the // tuning dataset. TotalBillableTokenCount int64 `json:"totalBillableTokenCount,omitempty,string"` + // TotalTruncatedExampleCount: The number of examples in the dataset that have + // been truncated by any amount. + TotalTruncatedExampleCount int64 `json:"totalTruncatedExampleCount,omitempty,string"` // TotalTuningCharacterCount: Output only. Number of tuning characters in the // tuning dataset. TotalTuningCharacterCount int64 `json:"totalTuningCharacterCount,omitempty,string"` + // TruncatedExampleIndices: A partial sample of the indices (starting from 1) + // of the truncated examples. + TruncatedExampleIndices googleapi.Int64s `json:"truncatedExampleIndices,omitempty"` // TuningDatasetExampleCount: Output only. Number of examples in the tuning // dataset. TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` @@ -38046,10 +38129,9 @@ func (s *GoogleCloudAiplatformV1beta1Value) UnmarshalJSON(data []byte) error { } // GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See -// https://cloud.google.com/vertex-ai-search-and-conversation +// datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1beta1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource + // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` @@ -39136,128 +39218,78 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type MediaUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest - urlParams_ gensupport.URLParams - mediaInfo_ *gensupport.MediaInfo - ctx_ context.Context - header_ http.Header -} - -// Upload: Upload a file into a RagCorpus. -// -// - parent: The name of the RagCorpus resource into which to upload the file. -// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *MediaService) Upload(parent string, googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest) *MediaUploadCall { - c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1uploadragfilerequest = googlecloudaiplatformv1beta1uploadragfilerequest - return c -} - -// Media specifies the media to upload in one or more chunks. The chunk size -// may be controlled by supplying a MediaOption generated by -// googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload -// request will be determined by sniffing the contents of r, unless a -// MediaOption generated by googleapi.ContentType is supplied. -// At most one of Media and ResumableMedia may be set. -func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { - c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) - return c +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResumableMedia specifies the media to upload in chunks and can be canceled -// with ctx. -// -// Deprecated: use Media instead. -// -// At most one of Media and ResumableMedia may be set. mediaType identifies the -// MIME media type of the upload, such as "image/png". If mediaType is "", it -// will be auto-detected. The provided ctx will supersede any context -// previously provided to the Context method. -func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { - c.ctx_ = ctx - c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1beta1dataset = googlecloudaiplatformv1beta1dataset return c } -// ProgressUpdater provides a callback function that will be called after every -// chunk. It should be a low-latency function in order to not slow down the -// upload operation. This should only be called when using ResumableMedia (as -// opposed to Media). -func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { - c.mediaInfo_.SetProgressUpdater(pu) +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("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 *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MediaUploadCall) Header() http.Header { +func (c *DatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsCreateCall) 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.googlecloudaiplatformv1beta1uploadragfilerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/ragFiles:upload") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta1/{+parent}/ragFiles:upload") - c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) - } - if body == nil { - body = new(bytes.Buffer) - reqHeaders.Set("Content-Type", "application/json") - } - body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) - defer cleanup() + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - req.GetBody = getBody - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.media.upload" call. +// Do executes the "aiplatform.datasets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1UploadRagFileResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1UploadRagFileResponse, error) { +func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39276,24 +39308,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) - if rx != nil { - rx.Client = c.s.client - rx.UserAgent = c.s.userAgent() - ctx := c.ctx_ - if ctx == nil { - ctx = context.TODO() - } - res, err = rx.Upload(ctx) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - } - ret := &GoogleCloudAiplatformV1beta1UploadRagFileResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39306,21 +39321,20 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type ProjectsGetCacheConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetCacheConfig: Gets a GenAI cache config. +// Delete: Deletes a Dataset. // -// - name: Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { - c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -39328,148 +39342,34 @@ func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { +func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { 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 *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCacheConfigCall) Header() http.Header { +func (c *DatasetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.getCacheConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1CacheConfig.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CacheConfig, 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 := &GoogleCloudAiplatformV1beta1CacheConfig{ - 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 ProjectsUpdateCacheConfigCall struct { - s *Service - name string - googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateCacheConfig: Updates a cache config. -// -// - name: Identifier. Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig) *ProjectsUpdateCacheConfigCall { - c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1beta1cacheconfig = googlecloudaiplatformv1beta1cacheconfig - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUpdateCacheConfigCall) 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.googlecloudaiplatformv1beta1cacheconfig) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -39480,13 +39380,1914 @@ func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Do executes the "aiplatform.datasets.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset. +// +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { + 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 *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1Dataset.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1Dataset, 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 := &GoogleCloudAiplatformV1beta1Dataset{ + 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 DatasetsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { + 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 *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListDatasetsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListDatasetsResponse, 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 := &GoogleCloudAiplatformV1beta1ListDatasetsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListDatasetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. +// +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1dataset = googlecloudaiplatformv1beta1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + 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 *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsPatchCall) 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.googlecloudaiplatformv1beta1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1Dataset.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1Dataset, 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 := &GoogleCloudAiplatformV1beta1Dataset{ + 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 DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a version from a Dataset. +// +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1datasetversion = googlecloudaiplatformv1beta1datasetversion + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsCreateCall) 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.googlecloudaiplatformv1beta1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasetVersions") + 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 "aiplatform.datasets.datasetVersions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DatasetVersion, 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 := &GoogleCloudAiplatformV1beta1DatasetVersion{ + 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 DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasetVersions") + 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 "aiplatform.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse.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 *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1datasetversion = googlecloudaiplatformv1beta1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) 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.googlecloudaiplatformv1beta1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DatasetVersion, 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 := &GoogleCloudAiplatformV1beta1DatasetVersion{ + 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 DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.restore" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) 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.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + 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 EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1counttokensrequest = googlecloudaiplatformv1beta1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) 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.googlecloudaiplatformv1beta1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CountTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, 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 := &GoogleCloudAiplatformV1beta1CountTokensResponse{ + 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 EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + 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 EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + 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 MediaUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Upload a file into a RagCorpus. +// +// - parent: The name of the RagCorpus resource into which to upload the file. +// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *MediaService) Upload(parent string, googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1uploadragfilerequest = googlecloudaiplatformv1beta1uploadragfilerequest + return c +} + +// Media specifies the media to upload in one or more chunks. The chunk size +// may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload +// request will be determined by sniffing the contents of r, unless a +// MediaOption generated by googleapi.ContentType is supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c +} + +// ResumableMedia specifies the media to upload in chunks and can be canceled +// with ctx. +// +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType identifies the +// MIME media type of the upload, such as "image/png". If mediaType is "", it +// will be auto-detected. The provided ctx will supersede any context +// previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called after every +// chunk. It should be a low-latency function in order to not slow down the +// upload operation. This should only be called when using ResumableMedia (as +// opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *MediaUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaUploadCall) 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.googlecloudaiplatformv1beta1uploadragfilerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/ragFiles:upload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta1/{+parent}/ragFiles:upload") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + req.GetBody = getBody + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.media.upload" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1UploadRagFileResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1UploadRagFileResponse, 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) + } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + } + ret := &GoogleCloudAiplatformV1beta1UploadRagFileResponse{ + 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 ProjectsGetCacheConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCacheConfig: Gets a GenAI cache config. +// +// - name: Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { + c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { + 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 *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsGetCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.getCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CacheConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CacheConfig, 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 := &GoogleCloudAiplatformV1beta1CacheConfig{ + 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 ProjectsUpdateCacheConfigCall struct { + s *Service + name string + googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCacheConfig: Updates a cache config. +// +// - name: Identifier. Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig) *ProjectsUpdateCacheConfigCall { + c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1cacheconfig = googlecloudaiplatformv1beta1cacheconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateCacheConfigCall) 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.googlecloudaiplatformv1beta1cacheconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52695,8 +54496,11 @@ type ProjectsLocationsEndpointsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -53827,8 +55631,11 @@ type ProjectsLocationsEndpointsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -54251,8 +56058,8 @@ type ProjectsLocationsEndpointsChatCompletionsCall struct { // Completions: Exposes an OpenAI-compatible endpoint for chat completions. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/openapi`. +// - endpoint: The name of the endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint @@ -95821,8 +97628,11 @@ type ProjectsLocationsPublishersModelsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -96355,8 +98165,11 @@ type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -113085,6 +114898,318 @@ func (c *ProjectsLocationsTuningJobsListCall) Pages(ctx context.Context, f func( } } +type PublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *PublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *PublishersModelsComputeTokensCall { + c := &PublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *PublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsComputeTokensCall) Context(ctx context.Context) *PublishersModelsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsComputeTokensCall) 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.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + 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 PublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *PublishersModelsCountTokensCall { + c := &PublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1counttokensrequest = googlecloudaiplatformv1beta1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *PublishersModelsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsCountTokensCall) Context(ctx context.Context) *PublishersModelsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsCountTokensCall) 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.googlecloudaiplatformv1beta1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CountTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, 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 := &GoogleCloudAiplatformV1beta1CountTokensResponse{ + 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 PublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *PublishersModelsGenerateContentCall { + c := &PublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsGenerateContentCall) Context(ctx context.Context) *PublishersModelsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + 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 PublishersModelsGetCall struct { s *Service name string @@ -113426,3 +115551,110 @@ func (c *PublishersModelsListCall) Pages(ctx context.Context, f func(*GoogleClou c.PageToken(x.NextPageToken) } } + +type PublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *PublishersModelsStreamGenerateContentCall { + c := &PublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *PublishersModelsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublishersModelsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsStreamGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 4c9b2d2a641..842121015cd 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -226,7 +226,7 @@ ] }, "list": { - "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", "flatPath": "v1alpha/accounts", "httpMethod": "GET", "id": "analyticsadmin.accounts.list", @@ -311,7 +311,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1alpha/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -320,7 +320,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -666,7 +666,7 @@ ] }, "create": { - "description": "Creates an \"GA4\" property with the specified location and attributes.", + "description": "Creates a Google Analytics property with the specified location and attributes.", "flatPath": "v1alpha/properties", "httpMethod": "POST", "id": "analyticsadmin.properties.create", @@ -720,7 +720,7 @@ ] }, "delete": { - "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", + "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", "flatPath": "v1alpha/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -804,7 +804,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" Property.", + "description": "Lookup for a single GA Property.", "flatPath": "v1alpha/properties/{propertiesId}", "httpMethod": "GET", "id": "analyticsadmin.properties.get", @@ -908,7 +908,7 @@ ] }, "list": { - "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "description": "Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", "flatPath": "v1alpha/properties", "httpMethod": "GET", "id": "analyticsadmin.properties.list", @@ -1017,7 +1017,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -1026,7 +1026,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -3341,7 +3341,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "description": "Lookup for a single MeasurementProtocolSecret.", "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", @@ -4886,7 +4886,7 @@ } } }, - "revision": "20240821", + "revision": "20240823", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -5323,7 +5323,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAccountSummary": { - "description": "A virtual resource representing an overview of an account and all its child GA4 properties.", + "description": "A virtual resource representing an overview of an account and all its child Google Analytics properties.", "id": "GoogleAnalyticsAdminV1alphaAccountSummary", "properties": { "account": { @@ -5366,11 +5366,11 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAdSenseLink": { - "description": "A link between a GA4 Property and an AdSense for Content ad client.", + "description": "A link between a Google Analytics property and an AdSense for Content ad client.", "id": "GoogleAnalyticsAdminV1alphaAdSenseLink", "properties": { "adClientCode": { - "description": "Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: \"ca-pub-1234567890\"", + "description": "Immutable. The AdSense ad client code that the Google Analytics property is linked to. Example format: \"ca-pub-1234567890\"", "type": "string" }, "name": { @@ -5491,7 +5491,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAudience": { - "description": "A resource message representing a GA4 Audience.", + "description": "A resource message representing an Audience.", "id": "GoogleAnalyticsAdminV1alphaAudience", "properties": { "adsPersonalizationEnabled": { @@ -5992,7 +5992,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaBigQueryLink": { - "description": "A link between a GA4 Property and BigQuery project.", + "description": "A link between a Google Analytics property and BigQuery project.", "id": "GoogleAnalyticsAdminV1alphaBigQueryLink", "properties": { "createTime": { @@ -7017,7 +7017,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink": { - "description": "A link between a GA4 property and a Display \u0026 Video 360 advertiser.", + "description": "A link between a Google Analytics property and a Display \u0026 Video 360 advertiser.", "id": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink", "properties": { "adsPersonalizationEnabled": { @@ -7034,11 +7034,11 @@ "type": "string" }, "campaignDataSharingEnabled": { - "description": "Immutable. Enables the import of campaign data from Display \u0026 Video 360 into the GA4 property. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of campaign data from Display \u0026 Video 360 into the Google Analytics property. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "costDataSharingEnabled": { - "description": "Immutable. Enables the import of cost data from Display \u0026 Video 360 into the GA4 property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of cost data from Display \u0026 Video 360 into the Google Analytics property. This can only be enabled if `campaign_data_sharing_enabled` is true. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "name": { @@ -7050,7 +7050,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal": { - "description": "A proposal for a link between a GA4 property and a Display \u0026 Video 360 advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once approved. Google Analytics admins approve inbound proposals while Display \u0026 Video 360 admins approve outbound proposals.", + "description": "A proposal for a link between a Google Analytics property and a Display \u0026 Video 360 advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once approved. Google Analytics admins approve inbound proposals while Display \u0026 Video 360 admins approve outbound proposals.", "id": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal", "properties": { "adsPersonalizationEnabled": { @@ -7217,7 +7217,7 @@ "id": "GoogleAnalyticsAdminV1alphaEventMapping", "properties": { "eventName": { - "description": "Required. Name of the GA4 event. It must always be set. The max allowed display name length is 40 UTF-16 code units.", + "description": "Required. Name of the Google Analytics event. It must always be set. The max allowed display name length is 40 UTF-16 code units.", "type": "string" }, "maxEventCount": { @@ -7244,7 +7244,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaExpandedDataSet": { - "description": "A resource message representing a GA4 ExpandedDataSet.", + "description": "A resource message representing an `ExpandedDataSet`.", "id": "GoogleAnalyticsAdminV1alphaExpandedDataSet", "properties": { "dataCollectionStartTime": { @@ -7420,7 +7420,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaFirebaseLink": { - "description": "A link between a GA4 property and a Firebase project.", + "description": "A link between a Google Analytics property and a Firebase project.", "id": "GoogleAnalyticsAdminV1alphaFirebaseLink", "properties": { "createTime": { @@ -7458,7 +7458,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaGoogleAdsLink": { - "description": "A link between a GA4 property and a Google Ads account.", + "description": "A link between a Google Analytics property and a Google Ads account.", "id": "GoogleAnalyticsAdminV1alphaGoogleAdsLink", "properties": { "adsPersonalizationEnabled": { @@ -8293,7 +8293,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaProperty": { - "description": "A resource message representing a Google Analytics GA4 property.", + "description": "A resource message representing a Google Analytics property.", "id": "GoogleAnalyticsAdminV1alphaProperty", "properties": { "account": { @@ -8407,9 +8407,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" }, @@ -8442,7 +8442,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaPropertySummary": { - "description": "A virtual resource representing metadata for a GA4 property.", + "description": "A virtual resource representing metadata for a Google Analytics property.", "id": "GoogleAnalyticsAdminV1alphaPropertySummary", "properties": { "displayName": { @@ -8467,9 +8467,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" } @@ -8697,7 +8697,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaSearchAds360Link": { - "description": "A link between a GA4 property and a Search Ads 360 entity.", + "description": "A link between a Google Analytics property and a Search Ads 360 entity.", "id": "GoogleAnalyticsAdminV1alphaSearchAds360Link", "properties": { "adsPersonalizationEnabled": { @@ -8714,11 +8714,11 @@ "type": "string" }, "campaignDataSharingEnabled": { - "description": "Immutable. Enables the import of campaign data from Search Ads 360 into the GA4 property. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of campaign data from Search Ads 360 into the Google Analytics property. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "costDataSharingEnabled": { - "description": "Immutable. Enables the import of cost data from Search Ads 360 to the GA4 property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of cost data from Search Ads 360 to the Google Analytics property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "name": { @@ -8892,7 +8892,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter": { - "description": "A resource message representing a GA4 Subproperty event filter.", + "description": "A resource message representing a Google Analytics subproperty event filter.", "id": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", "properties": { "applyToProperty": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 848745f6173..4ee9c5f8801 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -1144,7 +1144,7 @@ func (s GoogleAnalyticsAdminV1alphaAccount) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1alphaAccountSummary: A virtual resource representing -// an overview of an account and all its child GA4 properties. +// an overview of an account and all its child Google Analytics properties. type GoogleAnalyticsAdminV1alphaAccountSummary struct { // Account: Resource name of account referred to by this account summary // Format: accounts/{account_id} Example: "accounts/1000" @@ -1210,11 +1210,11 @@ type GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse struct { googleapi.ServerResponse `json:"-"` } -// GoogleAnalyticsAdminV1alphaAdSenseLink: A link between a GA4 Property and an -// AdSense for Content ad client. +// GoogleAnalyticsAdminV1alphaAdSenseLink: A link between a Google Analytics +// property and an AdSense for Content ad client. type GoogleAnalyticsAdminV1alphaAdSenseLink struct { - // AdClientCode: Immutable. The AdSense ad client code that the GA4 property is - // linked to. Example format: "ca-pub-1234567890" + // AdClientCode: Immutable. The AdSense ad client code that the Google + // Analytics property is linked to. Example format: "ca-pub-1234567890" AdClientCode string `json:"adClientCode,omitempty"` // Name: Output only. The resource name for this AdSense Link resource. Format: // properties/{propertyId}/adSenseLinks/{linkId} Example: @@ -1378,7 +1378,7 @@ func (s GoogleAnalyticsAdminV1alphaAttributionSettings) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaAudience: A resource message representing a GA4 +// GoogleAnalyticsAdminV1alphaAudience: A resource message representing an // Audience. type GoogleAnalyticsAdminV1alphaAudience struct { // AdsPersonalizationEnabled: Output only. It is automatically set by GA to @@ -2085,8 +2085,8 @@ func (s GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBigQueryLink: A link between a GA4 Property and -// BigQuery project. +// GoogleAnalyticsAdminV1alphaBigQueryLink: A link between a Google Analytics +// property and BigQuery project. type GoogleAnalyticsAdminV1alphaBigQueryLink struct { // CreateTime: Output only. Time when the link was created. CreateTime string `json:"createTime,omitempty"` @@ -3318,7 +3318,7 @@ func (s GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest) MarshalJSON() } // GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink: A link between a -// GA4 property and a Display & Video 360 advertiser. +// Google Analytics property and a Display & Video 360 advertiser. type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { // AdsPersonalizationEnabled: Enables personalized advertising features with // this integration. If this field is not set on create/update, it will be @@ -3330,15 +3330,15 @@ type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { // AdvertiserId: Immutable. The Display & Video 360 Advertiser's advertiser ID. AdvertiserId string `json:"advertiserId,omitempty"` // CampaignDataSharingEnabled: Immutable. Enables the import of campaign data - // from Display & Video 360 into the GA4 property. After link creation, this - // can only be updated from the Display & Video 360 product. If this field is - // not set on create, it will be defaulted to true. + // from Display & Video 360 into the Google Analytics property. After link + // creation, this can only be updated from the Display & Video 360 product. If + // this field is not set on create, it will be defaulted to true. CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` // CostDataSharingEnabled: Immutable. Enables the import of cost data from - // Display & Video 360 into the GA4 property. This can only be enabled if - // campaign_data_sharing_enabled is enabled. After link creation, this can only - // be updated from the Display & Video 360 product. If this field is not set on - // create, it will be defaulted to true. + // Display & Video 360 into the Google Analytics property. This can only be + // enabled if `campaign_data_sharing_enabled` is true. After link creation, + // this can only be updated from the Display & Video 360 product. If this field + // is not set on create, it will be defaulted to true. CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` // Name: Output only. The resource name for this DisplayVideo360AdvertiserLink // resource. Format: @@ -3367,10 +3367,10 @@ func (s GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) MarshalJSON() } // GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal: A proposal -// for a link between a GA4 property and a Display & Video 360 advertiser. A -// proposal is converted to a DisplayVideo360AdvertiserLink once approved. -// Google Analytics admins approve inbound proposals while Display & Video 360 -// admins approve outbound proposals. +// for a link between a Google Analytics property and a Display & Video 360 +// advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once +// approved. Google Analytics admins approve inbound proposals while Display & +// Video 360 admins approve outbound proposals. type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal struct { // AdsPersonalizationEnabled: Immutable. Enables personalized advertising // features with this integration. If this field is not set on create, it will @@ -3592,8 +3592,8 @@ func (s GoogleAnalyticsAdminV1alphaEventEditRule) MarshalJSON() ([]byte, error) // GoogleAnalyticsAdminV1alphaEventMapping: Event setting conditions to match // an event. type GoogleAnalyticsAdminV1alphaEventMapping struct { - // EventName: Required. Name of the GA4 event. It must always be set. The max - // allowed display name length is 40 UTF-16 code units. + // EventName: Required. Name of the Google Analytics event. It must always be + // set. The max allowed display name length is 40 UTF-16 code units. EventName string `json:"eventName,omitempty"` // MaxEventCount: The maximum number of times the event occurred. If not set, // maximum event count won't be checked. @@ -3646,7 +3646,7 @@ func (s *GoogleAnalyticsAdminV1alphaEventMapping) UnmarshalJSON(data []byte) err } // GoogleAnalyticsAdminV1alphaExpandedDataSet: A resource message representing -// a GA4 ExpandedDataSet. +// an `ExpandedDataSet`. type GoogleAnalyticsAdminV1alphaExpandedDataSet struct { // DataCollectionStartTime: Output only. Time when expanded data set began (or // will begin) collecing data. @@ -3922,8 +3922,8 @@ func (s GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a GA4 property and a -// Firebase project. +// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a Google Analytics +// property and a Firebase project. type GoogleAnalyticsAdminV1alphaFirebaseLink struct { // CreateTime: Output only. Time when this FirebaseLink was originally created. CreateTime string `json:"createTime,omitempty"` @@ -3988,8 +3988,8 @@ func (s GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a GA4 property and -// a Google Ads account. +// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a Google Analytics +// property and a Google Ads account. type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct { // AdsPersonalizationEnabled: Enable personalized advertising features with // this integration. Automatically publish my Google Analytics audience lists @@ -5278,7 +5278,7 @@ func (s GoogleAnalyticsAdminV1alphaPostbackWindow) MarshalJSON() ([]byte, error) } // GoogleAnalyticsAdminV1alphaProperty: A resource message representing a -// Google Analytics GA4 property. +// Google Analytics property. type GoogleAnalyticsAdminV1alphaProperty struct { // Account: Immutable. The resource name of the parent account Format: // accounts/{account_id} Example: "accounts/123" @@ -5344,9 +5344,9 @@ type GoogleAnalyticsAdminV1alphaProperty struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ServiceLevel: Output only. The Google Analytics service level that applies // to this property. @@ -5386,7 +5386,7 @@ func (s GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource representing -// metadata for a GA4 property. +// metadata for a Google Analytics property. type GoogleAnalyticsAdminV1alphaPropertySummary struct { // DisplayName: Display name for the property referred to in this property // summary. @@ -5403,9 +5403,9 @@ type GoogleAnalyticsAdminV1alphaPropertySummary struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -5771,8 +5771,8 @@ func (s GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaSearchAds360Link: A link between a GA4 property -// and a Search Ads 360 entity. +// GoogleAnalyticsAdminV1alphaSearchAds360Link: A link between a Google +// Analytics property and a Search Ads 360 entity. type GoogleAnalyticsAdminV1alphaSearchAds360Link struct { // AdsPersonalizationEnabled: Enables personalized advertising features with // this integration. If this field is not set on create, it will be defaulted @@ -5785,12 +5785,12 @@ type GoogleAnalyticsAdminV1alphaSearchAds360Link struct { // Search Ads 360 Advertiser. that has been linked. AdvertiserId string `json:"advertiserId,omitempty"` // CampaignDataSharingEnabled: Immutable. Enables the import of campaign data - // from Search Ads 360 into the GA4 property. After link creation, this can - // only be updated from the Search Ads 360 product. If this field is not set on - // create, it will be defaulted to true. + // from Search Ads 360 into the Google Analytics property. After link creation, + // this can only be updated from the Search Ads 360 product. If this field is + // not set on create, it will be defaulted to true. CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` // CostDataSharingEnabled: Immutable. Enables the import of cost data from - // Search Ads 360 to the GA4 property. This can only be enabled if + // Search Ads 360 to the Google Analytics property. This can only be enabled if // campaign_data_sharing_enabled is enabled. After link creation, this can only // be updated from the Search Ads 360 product. If this field is not set on // create, it will be defaulted to true. @@ -5978,7 +5978,7 @@ type GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse struc } // GoogleAnalyticsAdminV1alphaSubpropertyEventFilter: A resource message -// representing a GA4 Subproperty event filter. +// representing a Google Analytics subproperty event filter. type GoogleAnalyticsAdminV1alphaSubpropertyEventFilter struct { // ApplyToProperty: Immutable. Resource name of the Subproperty that uses this // filter. @@ -6675,7 +6675,7 @@ type AccountsListCall struct { } // List: Returns all accounts accessible by the caller. Note that these -// accounts might not currently have GA4 properties. Soft-deleted (ie: +// accounts might not currently have GA properties. Soft-deleted (ie: // "trashed") accounts are excluded by default. Returns an empty list if no // relevant accounts are found. func (r *AccountsService) List() *AccountsListCall { @@ -7040,7 +7040,7 @@ type AccountsRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -7051,8 +7051,9 @@ type AccountsRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *AccountsService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *AccountsRunAccessReportCall { c := &AccountsRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -8379,7 +8380,7 @@ type PropertiesCreateCall struct { header_ http.Header } -// Create: Creates an "GA4" property with the specified location and +// Create: Creates a Google Analytics property with the specified location and // attributes. func (r *PropertiesService) Create(googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesCreateCall { c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -8674,7 +8675,7 @@ type PropertiesDeleteCall struct { // not restored before the expiration time, the Property and all child // resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently // purged. https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found, or is not a GA4 Property. +// if the target is not found. // // - name: The name of the Property to soft-delete. Format: // properties/{property_id} Example: "properties/1000". @@ -9076,7 +9077,7 @@ type PropertiesGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" Property. +// Get: Lookup for a single GA Property. // // - name: The name of the property to lookup. Format: properties/{property_id} // Example: "properties/1000". @@ -9513,10 +9514,10 @@ type PropertiesListCall struct { header_ http.Header } -// List: Returns child Properties under the specified parent Account. Only -// "GA4" properties will be returned. Properties will be excluded if the caller -// does not have access. Soft-deleted (ie: "trashed") properties are excluded -// by default. Returns an empty list if no relevant properties are found. +// List: Returns child Properties under the specified parent Account. +// Properties will be excluded if the caller does not have access. Soft-deleted +// (ie: "trashed") properties are excluded by default. Returns an empty list if +// no relevant properties are found. func (r *PropertiesService) List() *PropertiesListCall { c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -9994,7 +9995,7 @@ type PropertiesRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -10005,8 +10006,9 @@ type PropertiesRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *PropertiesRunAccessReportCall { c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -18579,7 +18581,7 @@ type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" MeasurementProtocolSecret. +// Get: Lookup for a single MeasurementProtocolSecret. // // - name: The name of the measurement protocol secret to lookup. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{ diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index bb07cc7763d..8a79cdc734a 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -220,7 +220,7 @@ ] }, "list": { - "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", "flatPath": "v1beta/accounts", "httpMethod": "GET", "id": "analyticsadmin.accounts.list", @@ -305,7 +305,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1beta/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -314,7 +314,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -394,7 +394,7 @@ ] }, "create": { - "description": "Creates an \"GA4\" property with the specified location and attributes.", + "description": "Creates a Google Analytics property with the specified location and attributes.", "flatPath": "v1beta/properties", "httpMethod": "POST", "id": "analyticsadmin.properties.create", @@ -412,7 +412,7 @@ ] }, "delete": { - "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", + "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", "flatPath": "v1beta/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -437,7 +437,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" Property.", + "description": "Lookup for a single GA Property.", "flatPath": "v1beta/properties/{propertiesId}", "httpMethod": "GET", "id": "analyticsadmin.properties.get", @@ -489,7 +489,7 @@ ] }, "list": { - "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "description": "Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", "flatPath": "v1beta/properties", "httpMethod": "GET", "id": "analyticsadmin.properties.list", @@ -561,7 +561,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1beta/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -570,7 +570,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -1309,7 +1309,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "description": "Lookup for a single MeasurementProtocolSecret.", "flatPath": "v1beta/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", @@ -1788,7 +1788,7 @@ } } }, - "revision": "20240722", + "revision": "20240823", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { @@ -2202,7 +2202,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaAccountSummary": { - "description": "A virtual resource representing an overview of an account and all its child GA4 properties.", + "description": "A virtual resource representing an overview of an account and all its child Google Analytics properties.", "id": "GoogleAnalyticsAdminV1betaAccountSummary", "properties": { "account": { @@ -2748,7 +2748,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaFirebaseLink": { - "description": "A link between a GA4 property and a Firebase project.", + "description": "A link between a Google Analytics property and a Firebase project.", "id": "GoogleAnalyticsAdminV1betaFirebaseLink", "properties": { "createTime": { @@ -2770,7 +2770,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaGoogleAdsLink": { - "description": "A link between a GA4 property and a Google Ads account.", + "description": "A link between a Google Analytics property and a Google Ads account.", "id": "GoogleAnalyticsAdminV1betaGoogleAdsLink", "properties": { "adsPersonalizationEnabled": { @@ -3114,7 +3114,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaProperty": { - "description": "A resource message representing a Google Analytics GA4 property.", + "description": "A resource message representing a Google Analytics property.", "id": "GoogleAnalyticsAdminV1betaProperty", "properties": { "account": { @@ -3228,9 +3228,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" }, @@ -3263,7 +3263,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaPropertySummary": { - "description": "A virtual resource representing metadata for a GA4 property.", + "description": "A virtual resource representing metadata for a Google Analytics property.", "id": "GoogleAnalyticsAdminV1betaPropertySummary", "properties": { "displayName": { @@ -3288,9 +3288,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" } diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 8b99baada7c..337ab6befe3 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -906,7 +906,7 @@ func (s GoogleAnalyticsAdminV1betaAccount) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1betaAccountSummary: A virtual resource representing an -// overview of an account and all its child GA4 properties. +// overview of an account and all its child Google Analytics properties. type GoogleAnalyticsAdminV1betaAccountSummary struct { // Account: Resource name of account referred to by this account summary // Format: accounts/{account_id} Example: "accounts/1000" @@ -1559,8 +1559,8 @@ func (s GoogleAnalyticsAdminV1betaDataStreamWebStreamData) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1betaFirebaseLink: A link between a GA4 property and a -// Firebase project. +// GoogleAnalyticsAdminV1betaFirebaseLink: A link between a Google Analytics +// property and a Firebase project. type GoogleAnalyticsAdminV1betaFirebaseLink struct { // CreateTime: Output only. Time when this FirebaseLink was originally created. CreateTime string `json:"createTime,omitempty"` @@ -1593,8 +1593,8 @@ func (s GoogleAnalyticsAdminV1betaFirebaseLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1betaGoogleAdsLink: A link between a GA4 property and a -// Google Ads account. +// GoogleAnalyticsAdminV1betaGoogleAdsLink: A link between a Google Analytics +// property and a Google Ads account. type GoogleAnalyticsAdminV1betaGoogleAdsLink struct { // AdsPersonalizationEnabled: Enable personalized advertising features with // this integration. Automatically publish my Google Analytics audience lists @@ -2135,7 +2135,7 @@ func (s *GoogleAnalyticsAdminV1betaNumericValue) UnmarshalJSON(data []byte) erro } // GoogleAnalyticsAdminV1betaProperty: A resource message representing a Google -// Analytics GA4 property. +// Analytics property. type GoogleAnalyticsAdminV1betaProperty struct { // Account: Immutable. The resource name of the parent account Format: // accounts/{account_id} Example: "accounts/123" @@ -2201,9 +2201,9 @@ type GoogleAnalyticsAdminV1betaProperty struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ServiceLevel: Output only. The Google Analytics service level that applies // to this property. @@ -2243,7 +2243,7 @@ func (s GoogleAnalyticsAdminV1betaProperty) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1betaPropertySummary: A virtual resource representing -// metadata for a GA4 property. +// metadata for a Google Analytics property. type GoogleAnalyticsAdminV1betaPropertySummary struct { // DisplayName: Display name for the property referred to in this property // summary. @@ -2260,9 +2260,9 @@ type GoogleAnalyticsAdminV1betaPropertySummary struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -3052,7 +3052,7 @@ type AccountsListCall struct { } // List: Returns all accounts accessible by the caller. Note that these -// accounts might not currently have GA4 properties. Soft-deleted (ie: +// accounts might not currently have GA properties. Soft-deleted (ie: // "trashed") accounts are excluded by default. Returns an empty list if no // relevant accounts are found. func (r *AccountsService) List() *AccountsListCall { @@ -3417,7 +3417,7 @@ type AccountsRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -3428,8 +3428,9 @@ type AccountsRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *AccountsService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *AccountsRunAccessReportCall { c := &AccountsRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -3758,7 +3759,7 @@ type PropertiesCreateCall struct { header_ http.Header } -// Create: Creates an "GA4" property with the specified location and +// Create: Creates a Google Analytics property with the specified location and // attributes. func (r *PropertiesService) Create(googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty) *PropertiesCreateCall { c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3860,7 +3861,7 @@ type PropertiesDeleteCall struct { // not restored before the expiration time, the Property and all child // resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently // purged. https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found, or is not a GA4 Property. +// if the target is not found. // // - name: The name of the Property to soft-delete. Format: // properties/{property_id} Example: "properties/1000". @@ -3958,7 +3959,7 @@ type PropertiesGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" Property. +// Get: Lookup for a single GA Property. // // - name: The name of the property to lookup. Format: properties/{property_id} // Example: "properties/1000". @@ -4177,10 +4178,10 @@ type PropertiesListCall struct { header_ http.Header } -// List: Returns child Properties under the specified parent Account. Only -// "GA4" properties will be returned. Properties will be excluded if the caller -// does not have access. Soft-deleted (ie: "trashed") properties are excluded -// by default. Returns an empty list if no relevant properties are found. +// List: Returns child Properties under the specified parent Account. +// Properties will be excluded if the caller does not have access. Soft-deleted +// (ie: "trashed") properties are excluded by default. Returns an empty list if +// no relevant properties are found. func (r *PropertiesService) List() *PropertiesListCall { c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -4465,7 +4466,7 @@ type PropertiesRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -4476,8 +4477,9 @@ type PropertiesRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *PropertiesRunAccessReportCall { c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -7179,7 +7181,7 @@ type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" MeasurementProtocolSecret. +// Get: Lookup for a single MeasurementProtocolSecret. // // - name: The name of the measurement protocol secret to lookup. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{ diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 95d790e218c..95ba3a0fd97 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -111,7 +111,7 @@ "properties": { "methods": { "batchRunPivotReports": { - "description": "Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property.", + "description": "Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", "flatPath": "v1beta/properties/{propertiesId}:batchRunPivotReports", "httpMethod": "POST", "id": "analyticsdata.properties.batchRunPivotReports", @@ -120,7 +120,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -140,7 +140,7 @@ ] }, "batchRunReports": { - "description": "Returns multiple reports in a batch. All reports must be for the same GA4 Property.", + "description": "Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", "flatPath": "v1beta/properties/{propertiesId}:batchRunReports", "httpMethod": "POST", "id": "analyticsdata.properties.batchRunReports", @@ -149,7 +149,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -178,7 +178,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -198,7 +198,7 @@ ] }, "getMetadata": { - "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", "flatPath": "v1beta/properties/{propertiesId}/metadata", "httpMethod": "GET", "id": "analyticsdata.properties.getMetadata", @@ -207,7 +207,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", + "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", "location": "path", "pattern": "^properties/[^/]+/metadata$", "required": true, @@ -233,7 +233,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -262,7 +262,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -291,7 +291,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -440,7 +440,7 @@ } } }, - "revision": "20240731", + "revision": "20240825", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -1769,7 +1769,7 @@ "type": "array" }, "keepEmptyRows": { - "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", "type": "boolean" }, "metricFilter": { @@ -1791,11 +1791,11 @@ "type": "array" }, "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "type": "string" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -1843,7 +1843,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's quota state including this request." + "description": "This Google Analytics property's quota state including this request." }, "rows": { "description": "Rows of dimension value combinations and metric values in the report.", @@ -1922,7 +1922,7 @@ "type": "array" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -1966,7 +1966,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's Realtime quota state including this request." + "description": "This Google Analytics property's Realtime quota state including this request." }, "rowCount": { "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response and the `limit` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows.", @@ -2028,7 +2028,7 @@ "type": "array" }, "keepEmptyRows": { - "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", "type": "boolean" }, "limit": { @@ -2081,11 +2081,11 @@ "type": "array" }, "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "type": "string" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -2133,7 +2133,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's quota state including this request." + "description": "This Google Analytics property's quota state including this request." }, "rowCount": { "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 367681a8494..b2f303419f8 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -2095,7 +2095,7 @@ type RunPivotReportRequest struct { // KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0 // will not be returned. If true, these rows will be returned if they are not // separately removed by a filter. Regardless of this `keep_empty_rows` - // setting, only data recorded by the Google Analytics (GA4) property can be + // setting, only data recorded by the Google Analytics property can be // displayed in a report. For example if a property never logs a `purchase` // event, then a query for the `eventName` dimension and `eventCount` metric // will not have a row eventName: "purchase" and eventCount: 0. @@ -2113,15 +2113,15 @@ type RunPivotReportRequest struct { // subset of dimension names defined in Dimensions. No two pivots can share a // dimension. A dimension is only visible if it appears in a pivot. Pivots []*Pivot `json:"pivots,omitempty"` - // Property: A Google Analytics GA4 property identifier whose events are - // tracked. Specified in the URL path and not the body. To learn more, see - // where to find your Property ID + // Property: A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see where to find + // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234 Property string `json:"property,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's quota. Quota is returned in PropertyQuota + // Google Analytics property's quota. Quota is returned in PropertyQuota // (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "CohortSpec") to @@ -2173,7 +2173,8 @@ type RunPivotReportResponse struct { // "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{ // "value": "scroll" }] }] }] PivotHeaders []*PivotHeader `json:"pivotHeaders,omitempty"` - // PropertyQuota: This Analytics Property's quota state including this request. + // PropertyQuota: This Google Analytics property's quota state including this + // request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // Rows: Rows of dimension value combinations and metric values in the report. Rows []*Row `json:"rows,omitempty"` @@ -2239,8 +2240,8 @@ type RunRealtimeReportRequest struct { // OrderBys: Specifies how rows are ordered in the response. OrderBys []*OrderBy `json:"orderBys,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's Realtime quota. Quota is returned in PropertyQuota - // (#PropertyQuota). + // Google Analytics property's Realtime quota. Quota is returned in + // PropertyQuota (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "DimensionFilter") to // unconditionally include in API requests. By default, fields with empty or @@ -2278,8 +2279,8 @@ type RunRealtimeReportResponse struct { MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"` // Minimums: If requested, the minimum values of metrics. Minimums []*Row `json:"minimums,omitempty"` - // PropertyQuota: This Analytics Property's Realtime quota state including this - // request. + // PropertyQuota: This Google Analytics property's Realtime quota state + // including this request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // RowCount: The total number of rows in the query result. `rowCount` is // independent of the number of rows returned in the response and the `limit` @@ -2341,7 +2342,7 @@ type RunReportRequest struct { // KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0 // will not be returned. If true, these rows will be returned if they are not // separately removed by a filter. Regardless of this `keep_empty_rows` - // setting, only data recorded by the Google Analytics (GA4) property can be + // setting, only data recorded by the Google Analytics property can be // displayed in a report. For example if a property never logs a `purchase` // event, then a query for the `eventName` dimension and `eventCount` metric // will not have a row eventName: "purchase" and eventCount: 0. @@ -2386,15 +2387,15 @@ type RunReportRequest struct { // both comparisons and multiple date ranges will have order bys applied on the // comparisons. OrderBys []*OrderBy `json:"orderBys,omitempty"` - // Property: A Google Analytics GA4 property identifier whose events are - // tracked. Specified in the URL path and not the body. To learn more, see - // where to find your Property ID + // Property: A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see where to find + // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234 Property string `json:"property,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's quota. Quota is returned in PropertyQuota + // Google Analytics property's quota. Quota is returned in PropertyQuota // (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "CohortSpec") to @@ -2434,7 +2435,8 @@ type RunReportResponse struct { MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"` // Minimums: If requested, the minimum values of metrics. Minimums []*Row `json:"minimums,omitempty"` - // PropertyQuota: This Analytics Property's quota state including this request. + // PropertyQuota: This Google Analytics property's quota state including this + // request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // RowCount: The total number of rows in the query result. `rowCount` is // independent of the number of rows returned in the response, the `limit` @@ -2684,11 +2686,11 @@ type PropertiesBatchRunPivotReportsCall struct { } // BatchRunPivotReports: Returns multiple pivot reports in a batch. All reports -// must be for the same GA4 Property. +// must be for the same Google Analytics property. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // This property must be specified for the batch. The property within // RunPivotReportRequest may either be unspecified or consistent with this @@ -2793,11 +2795,11 @@ type PropertiesBatchRunReportsCall struct { } // BatchRunReports: Returns multiple reports in a batch. All reports must be -// for the same GA4 Property. +// for the same Google Analytics property. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // This property must be specified for the batch. The property within // RunReportRequest may either be unspecified or consistent with this @@ -2910,8 +2912,8 @@ type PropertiesCheckCompatibilityCall struct { // Realtime and Core reports have different compatibility rules. This method // checks compatibility for Core reports. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. To learn more, see where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// To learn more, see where to find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // `property` should be the same value as in your `runReport` request. // Example: properties/1234. @@ -3016,17 +3018,16 @@ type PropertiesGetMetadataCall struct { // GetMetadata: Returns metadata for dimensions and metrics available in // reporting methods. Used to explore the dimensions and metrics. In this -// method, a Google Analytics GA4 Property Identifier is specified in the -// request, and the metadata response includes Custom dimensions and metrics as -// well as Universal metadata. For example if a custom metric with parameter -// name `levels_unlocked` is registered to a property, the Metadata response -// will contain `customEvent:levels_unlocked`. Universal metadata are -// dimensions and metrics applicable to any property such as `country` and -// `totalUsers`. +// method, a Google Analytics property identifier is specified in the request, +// and the metadata response includes Custom dimensions and metrics as well as +// Universal metadata. For example if a custom metric with parameter name +// `levels_unlocked` is registered to a property, the Metadata response will +// contain `customEvent:levels_unlocked`. Universal metadata are dimensions and +// metrics applicable to any property such as `country` and `totalUsers`. // // - name: The resource name of the metadata to retrieve. This name field is // specified in the URL path and not URL parameters. Property is a numeric -// Google Analytics GA4 Property identifier. To learn more, see where to find +// Google Analytics property identifier. To learn more, see where to find // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Example: properties/1234/metadata Set the Property ID to 0 for dimensions @@ -3142,9 +3143,9 @@ type PropertiesRunPivotReportCall struct { // included in a pivot. Multiple pivots can be specified to further dissect // your data. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234. @@ -3256,9 +3257,9 @@ type PropertiesRunRealtimeReportCall struct { // Realtime Report // (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Example: properties/1234. func (r *PropertiesService) RunRealtimeReport(propertyid string, runrealtimereportrequest *RunRealtimeReportRequest) *PropertiesRunRealtimeReportCall { @@ -3370,9 +3371,9 @@ type PropertiesRunReportCall struct { // understanding responses, see Creating a Report // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics). // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234. diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index e70205d487e..d1798217eb0 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -678,6 +678,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` Examples of using a filter: To filter the results of your request to repositories with the name \"my-repo\" in project my-project in the us-central region, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/*repo\"` * `name=\"projects/my-project/locations/us-central1/repositories/*repo*\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of repositories to return. Maximum page size is 1,000.", "format": "int32", @@ -1477,6 +1487,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `annotations` Examples of using a filter: To filter the results of your request to packages with the name \"my-package\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/*package\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*\"` To filter the results of your request to packages with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request\": * \"annotations.external_link:external_link_value\" To filter the results just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to packages with the annotation key-value pair [`external.link`:`https://example.com/my-package`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-package`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of packages to return. Maximum page size is 1,000.", "format": "int32", @@ -1815,6 +1835,11 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `annotations` Examples of using a filter: To filter the results of your request to versions with the name \"my-version\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*\"` To filter the results of your request to versions with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request: * \"annotations.external_link:external_link_value\" To filter just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to versions with the annotation key-value pair [`external.link`:`https://example.com/my-version`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-version`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", + "location": "query", + "type": "string" + }, "orderBy": { "description": "Optional. The field to order the results by.", "location": "query", @@ -2013,7 +2038,7 @@ } } }, - "revision": "20240809", + "revision": "20240826", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 9ec8ffd9bfd..b5badd0865f 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -4493,6 +4493,30 @@ func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLoca return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` Examples of using a filter: To filter +// the results of your request to repositories with the name "my-repo" in +// project my-project in the us-central region, append the following filter +// expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo` You +// can also use wildcards to match any number of characters before or after the +// value: * +// `name="projects/my-project/locations/us-central1/repositories/my-*" * +// `name="projects/my-project/locations/us-central1/repositories/*repo" * +// `name="projects/my-project/locations/us-central1/repositories/*repo*" +func (c *ProjectsLocationsRepositoriesListCall) Filter(filter string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // repositories to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { @@ -7509,6 +7533,46 @@ func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *Proj return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` * `annotations` Examples of using a +// filter: To filter the results of your request to packages with the name +// "my-package" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package" You can also use wildcards to match any number of characters +// before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/*package" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/*pack*" To filter the results of your request to packages with the +// annotation key-value pair [`external_link`:`external_link_value`], append +// the following filter expression to your request": * +// "annotations.external_link:external_link_value" To filter the results just +// for a specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to packages with the annotation key-value pair +// [`external.link`:`https://example.com/my-package`], append the following +// filter expression to your request: * +// "annotations.`external.link`:`https://example.com/my-package" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" +func (c *ProjectsLocationsRepositoriesPackagesListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesPackagesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // packages to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall { @@ -8687,6 +8751,40 @@ func (r *ProjectsLocationsRepositoriesPackagesVersionsService) List(parent strin return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` * `annotations` Examples of using a +// filter: To filter the results of your request to versions with the name +// "my-version" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/my-version" You can also use wildcards to match any +// number of characters before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/*version" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/my*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/*version*" To filter the results of your request to +// versions with the annotation key-value pair +// [`external_link`:`external_link_value`], append the following filter +// expression to your request: * +// "annotations.external_link:external_link_value" To filter just for a +// specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to versions with the annotation key-value pair +// [`external.link`:`https://example.com/my-version`], append the following +// filter expression to your request: * +// "annotations.`external.link`:`https://example.com/my-version" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" +func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + // OrderBy sets the optional parameter "orderBy": The field to order the // results by. func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesVersionsListCall { diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 90aa199ab9b..94b5ae2be4c 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -618,6 +618,11 @@ "parent" ], "parameters": { + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of repositories to return. Maximum page size is 1,000.", "format": "int32", @@ -973,6 +978,11 @@ "parent" ], "parameters": { + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of packages to return. Maximum page size is 1,000.", "format": "int32", @@ -1414,7 +1424,7 @@ } } }, - "revision": "20240809", + "revision": "20240826", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 5505020b7ad..947bfcdd411 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -2668,6 +2668,13 @@ func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLoca return c } +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // repositories to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { @@ -4025,6 +4032,13 @@ func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *Proj return c } +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesPackagesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // packages to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall { diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 3899bfaf421..2cfbd488fe8 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240821", + "revision": "20240823", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -697,7 +697,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -720,7 +722,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1180,7 +1184,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1203,7 +1209,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1301,7 +1309,7 @@ "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, "partnerServicesBillingAccount": { - "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN/CNTXT partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", "type": "string" }, "provisionedResourcesParent": { diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index b793b109984..2b17129e525 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -349,6 +349,10 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -884,6 +888,10 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` @@ -948,7 +956,7 @@ type GoogleCloudAssuredworkloadsV1Workload struct { PartnerPermissions *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` // PartnerServicesBillingAccount: Optional. Billing account necessary for // purchasing services from Sovereign Partners. This field is required for - // creating SIA/PSN partner workloads. The caller should have + // creating SIA/PSN/CNTXT partner workloads. The caller should have // 'billing.resourceAssociations.create' IAM permission on this // billing-account. The format of this string is // billingAccounts/AAAAAA-BBBBBB-CCCCCC diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index e0ec6cad621..ad17eaf8996 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -588,7 +588,7 @@ } } }, - "revision": "20240821", + "revision": "20240823", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -694,7 +694,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -717,7 +719,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1175,7 +1179,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1198,7 +1204,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1316,7 +1324,7 @@ "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, "partnerServicesBillingAccount": { - "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN/CNTXT partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", "type": "string" }, "provisionedResourcesParent": { diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index 091764783ee..5cbb605f0a6 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -349,6 +349,10 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -868,6 +872,10 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` @@ -945,7 +953,7 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { PartnerPermissions *GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` // PartnerServicesBillingAccount: Optional. Billing account necessary for // purchasing services from Sovereign Partners. This field is required for - // creating SIA/PSN partner workloads. The caller should have + // creating SIA/PSN/CNTXT partner workloads. The caller should have // 'billing.resourceAssociations.create' IAM permission on this // billing-account. The format of this string is // billingAccounts/AAAAAA-BBBBBB-CCCCCC diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 1f05e38da24..2cef2427047 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1148,7 +1148,7 @@ } } }, - "revision": "20240816", + "revision": "20240823", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2142,13 +2142,17 @@ "METHOD_TYPE_UNSPECIFIED", "CREATE", "UPDATE", - "DELETE" + "DELETE", + "REMOVE_GRANT", + "GOVERN_TAGS" ], "enumDescriptions": [ "Unspecified. Will results in user error.", "Constraint applied when creating the resource.", "Constraint applied when updating the resource.", - "Constraint applied when deleting the resource." + "Constraint applied when deleting the resource.", + "Constraint applied when removing an IAM grant.", + "Constraint applied when enforcing forced tagging." ], "type": "string" }, @@ -4203,7 +4207,7 @@ "type": "array" }, "enrichments": { - "description": "Enrichments of the asset.", + "description": "Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: scope: \"projects/my-project\" query: \"name: my-project\" assetTypes: \"cloudresourcemanager.googleapis.com/Project\" readMask: { paths: \"asset_type\" paths: \"name\" paths: \"enrichments.resource_owners\" }", "items": { "$ref": "AssetEnrichment" }, diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 280f27a2818..317bf5005ea 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -1834,6 +1834,8 @@ type GoogleCloudAssetV1CustomConstraint struct { // "CREATE" - Constraint applied when creating the resource. // "UPDATE" - Constraint applied when updating the resource. // "DELETE" - Constraint applied when deleting the resource. + // "REMOVE_GRANT" - Constraint applied when removing an IAM grant. + // "GOVERN_TAGS" - Constraint applied when enforcing forced tagging. MethodTypes []string `json:"methodTypes,omitempty"` // Name: Name of the constraint. This is unique within the organization. Format // of the name should be * @@ -5059,7 +5061,15 @@ type ResourceSearchResult struct { // `effectiveTagValues="123456789/env/prod" - // `effectiveTagValueIds="tagValues/456" EffectiveTags []*EffectiveTagDetails `json:"effectiveTags,omitempty"` - // Enrichments: Enrichments of the asset. + // Enrichments: Enrichments of the asset. Currently supported enrichment types + // with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks + // in order to get the enrichment: * enrichments.resource_owners The + // corresponding required permissions: * + // cloudasset.assets.searchEnrichmentResourceOwners Example query to get + // resource owner enrichment: scope: "projects/my-project" query: "name: + // my-project" assetTypes: "cloudresourcemanager.googleapis.com/Project" + // readMask: { paths: "asset_type" paths: "name" paths: + // "enrichments.resource_owners" } Enrichments []*AssetEnrichment `json:"enrichments,omitempty"` // Folders: The folder(s) that this resource belongs to, in the form of // folders/{FOLDER_NUMBER}. This field is available when the resource belongs diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 106597d43c1..df958414a7d 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -1100,211 +1100,6 @@ } } }, - "buyongoogleprograms": { - "methods": { - "activate": { - "description": "Reactivates the BoG program in your Merchant Center account. Moves the program to the active state when allowed, for example, when paused. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/activate", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.activate", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/activate", - "request": { - "$ref": "ActivateBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves a status of the BoG program for your Merchant Center account.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}", - "httpMethod": "GET", - "id": "content.buyongoogleprograms.get", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The Program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}", - "response": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "onboard": { - "description": "Onboards the BoG program in your Merchant Center account. By using this method, you agree to the [Terms of Service](https://merchants.google.com/mc/termsofservice/transactions/US/latest). Calling this method is only possible if the authenticated account is the same as the merchant id in the request. Calling this method multiple times will only accept Terms of Service if the latest version is not currently signed.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.onboard", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", - "request": { - "$ref": "OnboardBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates the status of the BoG program for your Merchant Center account.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}", - "httpMethod": "PATCH", - "id": "content.buyongoogleprograms.patch", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update. If the update mask is not provided, then all the fields set in buyOnGoogleProgramStatus will be updated. Clearing fields is only possible if update mask is provided.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}", - "request": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "response": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "pause": { - "description": "Pauses the BoG program in your Merchant Center account. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/pause", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.pause", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/pause", - "request": { - "$ref": "PauseBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "requestreview": { - "description": "Requests review and then activates the BoG program in your Merchant Center account for the first time. Moves the program to the REVIEW_PENDING state. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/requestreview", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.requestreview", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/requestreview", - "request": { - "$ref": "RequestReviewBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "collections": { "methods": { "create": { @@ -2874,1340 +2669,1170 @@ } } }, - "orderinvoices": { + "ordertrackingsignals": { "methods": { - "createchargeinvoice": { - "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", - "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "create": { + "description": "Creates new order tracking signal.", + "flatPath": "{merchantId}/ordertrackingsignals", "httpMethod": "POST", - "id": "content.orderinvoices.createchargeinvoice", + "id": "content.ordertrackingsignals.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "The ID of the merchant for which the order signal is created.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "path": "{merchantId}/ordertrackingsignals", "request": { - "$ref": "OrderinvoicesCreateChargeInvoiceRequest" + "$ref": "OrderTrackingSignal" }, "response": { - "$ref": "OrderinvoicesCreateChargeInvoiceResponse" + "$ref": "OrderTrackingSignal" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "createrefundinvoice": { - "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.", - "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + } + } + }, + "pos": { + "methods": { + "custombatch": { + "description": "Batches multiple POS-related calls in a single request.", + "flatPath": "pos/batch", "httpMethod": "POST", - "id": "content.orderinvoices.createrefundinvoice", + "id": "content.pos.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "pos/batch", + "request": { + "$ref": "PosCustomBatchRequest" + }, + "response": { + "$ref": "PosCustomBatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "delete": { + "description": "Deletes a store for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "httpMethod": "DELETE", + "id": "content.pos.delete", "parameterOrder": [ "merchantId", - "orderId" + "targetMerchantId", + "storeCode" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "storeCode": { + "description": "A store code that is unique per merchant.", + "location": "path", + "required": true, + "type": "string" + }, + "targetMerchantId": { + "description": "The ID of the target merchant.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", - "request": { - "$ref": "OrderinvoicesCreateRefundInvoiceRequest" - }, - "response": { - "$ref": "OrderinvoicesCreateRefundInvoiceResponse" - }, + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "orderreports": { - "methods": { - "listdisbursements": { - "description": "Retrieves a report for disbursements from your Merchant Center account.", - "flatPath": "{merchantId}/orderreports/disbursements", + }, + "get": { + "description": "Retrieves information about the given store.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "GET", - "id": "content.orderreports.listdisbursements", + "id": "content.pos.get", "parameterOrder": [ - "merchantId" + "merchantId", + "targetMerchantId", + "storeCode" ], "parameters": { - "disbursementEndDate": { - "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.", - "location": "query", + "merchantId": { + "description": "The ID of the POS or inventory data provider.", + "format": "uint64", + "location": "path", + "required": true, "type": "string" }, - "disbursementStartDate": { - "description": "The first date which disbursements occurred. In ISO 8601 format.", - "location": "query", + "storeCode": { + "description": "A store code that is unique per merchant.", + "location": "path", + "required": true, "type": "string" }, - "maxResults": { - "description": "The maximum number of disbursements to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/orderreports/disbursements", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "response": { - "$ref": "OrderreportsListDisbursementsResponse" + "$ref": "PosStore" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "listtransactions": { - "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", - "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", - "httpMethod": "GET", - "id": "content.orderreports.listtransactions", + "insert": { + "description": "Creates a store for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", + "httpMethod": "POST", + "id": "content.pos.insert", "parameterOrder": [ "merchantId", - "disbursementId" + "targetMerchantId" ], "parameters": { - "disbursementId": { - "description": "The Google-provided ID of the disbursement (found in Wallet).", + "merchantId": { + "description": "The ID of the POS or inventory data provider.", + "format": "uint64", "location": "path", "required": true, "type": "string" }, - "maxResults": { - "description": "The maximum number of disbursements to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "transactionEndDate": { - "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.", - "location": "query", - "type": "string" - }, - "transactionStartDate": { - "description": "The first date in which transaction occurred. In ISO 8601 format.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "path": "{merchantId}/pos/{targetMerchantId}/store", + "request": { + "$ref": "PosStore" + }, "response": { - "$ref": "OrderreportsListTransactionsResponse" + "$ref": "PosStore" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "orderreturns": { - "methods": { - "acknowledge": { - "description": "Acks an order return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}/acknowledge", + }, + "inventory": { + "description": "Submit inventory for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", "httpMethod": "POST", - "id": "content.orderreturns.acknowledge", + "id": "content.pos.inventory", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "The ID of the return.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}/acknowledge", - "request": { - "$ref": "OrderreturnsAcknowledgeRequest" - }, - "response": { - "$ref": "OrderreturnsAcknowledgeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "createorderreturn": { - "description": "Create return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/createOrderReturn", - "httpMethod": "POST", - "id": "content.orderreturns.createorderreturn", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderreturns/createOrderReturn", + "path": "{merchantId}/pos/{targetMerchantId}/inventory", "request": { - "$ref": "OrderreturnsCreateOrderReturnRequest" + "$ref": "PosInventoryRequest" }, "response": { - "$ref": "OrderreturnsCreateOrderReturnResponse" + "$ref": "PosInventoryResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves an order return from your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}", + "list": { + "description": "Lists the stores of the target merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "GET", - "id": "content.orderreturns.get", + "id": "content.pos.list", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "Merchant order return ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}", - "response": { - "$ref": "MerchantOrderReturn" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists order returns in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns", - "httpMethod": "GET", - "id": "content.orderreturns.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "acknowledged": { - "description": "Obtains order returns that match the acknowledgement status. When set to true, obtains order returns that have been acknowledged. When false, obtains order returns that have not been acknowledged. When not provided, obtains order returns regardless of their acknowledgement status. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged order returns are returned. ", - "location": "query", - "type": "boolean" - }, - "createdEndDate": { - "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "createdStartDate": { - "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "googleOrderIds": { - "description": "Obtains order returns with the specified order ids. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.", - "location": "query", - "repeated": true, - "type": "string" - }, - "maxResults": { - "description": "The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderBy": { - "description": "Return the results in the specified order.", - "enum": [ - "RETURN_CREATION_TIME_DESC", - "RETURN_CREATION_TIME_ASC" - ], - "enumDescriptions": [ - "Return results in descending order.", - "Return results in ascending order." - ], - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "shipmentStates": { - "description": "Obtains order returns that match any shipment state provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment states.", - "enum": [ - "NEW", - "SHIPPED", - "COMPLETED", - "UNDELIVERABLE", - "PENDING" - ], - "enumDescriptions": [ - "Return shipments with `new` state only.", - "Return shipments with `shipped` state only.", - "Return shipments with `completed` state only.", - "Return shipments with `undeliverable` state only.", - "Return shipments with `pending` state only." - ], - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentStatus": { - "description": "Obtains order returns that match any shipment status provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment statuses.", - "enum": [ - "NEW", - "IN_PROGRESS", - "PROCESSED" - ], - "enumDescriptions": [ - "Return shipments with `new` status only.", - "Return shipments with `inProgress` status only.", - "Return shipments with `processed` status only." - ], - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentTrackingNumbers": { - "description": "Obtains order returns with the specified tracking numbers. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.", - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentTypes": { - "description": "Obtains order returns that match any shipment type provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment types.", - "enum": [ - "BY_MAIL", - "RETURNLESS", - "CONTACT_CUSTOMER_SUPPORT" - ], - "enumDescriptions": [ - "Return shipments with type `byMail` only.", - "Return shipments with type `returnless` only.", - "Return shipments with type `contactCustomerSupport` only." - ], - "location": "query", - "repeated": true, - "type": "string" } }, - "path": "{merchantId}/orderreturns", + "path": "{merchantId}/pos/{targetMerchantId}/store", "response": { - "$ref": "OrderreturnsListResponse" + "$ref": "PosListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "process": { - "description": "Processes return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}/process", + "sale": { + "description": "Submit a sale event for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", "httpMethod": "POST", - "id": "content.orderreturns.process", + "id": "content.pos.sale", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "The ID of the return.", + "targetMerchantId": { + "description": "The ID of the target merchant.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderreturns/{returnId}/process", + "path": "{merchantId}/pos/{targetMerchantId}/sale", "request": { - "$ref": "OrderreturnsProcessRequest" + "$ref": "PosSaleRequest" }, "response": { - "$ref": "OrderreturnsProcessResponse" + "$ref": "PosSaleResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] } - }, - "resources": { - "labels": { - "methods": { - "create": { - "description": "Links a return shipping label to a return id. You can only create one return label per return id. Since the label is sent to the buyer, the linked return label cannot be updated or deleted. If you try to create multiple return shipping labels for a single return id, every create request except the first will fail.", - "flatPath": "{merchantId}/orderreturns/{returnId}/labels", - "httpMethod": "POST", - "id": "content.orderreturns.labels.create", - "parameterOrder": [ - "merchantId", - "returnId" - ], - "parameters": { - "merchantId": { - "description": "Required. The merchant the Return Shipping Label belongs to.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnId": { - "description": "Required. Provide the Google-generated merchant order return ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}/labels", - "request": { - "$ref": "ReturnShippingLabel" - }, - "response": { - "$ref": "ReturnShippingLabel" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } } }, - "orders": { + "productdeliverytime": { "methods": { - "acknowledge": { - "description": "Marks an order as acknowledged.", - "flatPath": "{merchantId}/orders/{orderId}/acknowledge", + "create": { + "description": "Creates or updates the delivery time of a product.", + "flatPath": "{merchantId}/productdeliverytime", "httpMethod": "POST", - "id": "content.orders.acknowledge", + "id": "content.productdeliverytime.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/acknowledge", + "path": "{merchantId}/productdeliverytime", "request": { - "$ref": "OrdersAcknowledgeRequest" + "$ref": "ProductDeliveryTime" }, "response": { - "$ref": "OrdersAcknowledgeResponse" + "$ref": "ProductDeliveryTime" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "advancetestorder": { - "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", - "flatPath": "{merchantId}/testorders/{orderId}/advance", - "httpMethod": "POST", - "id": "content.orders.advancetestorder", + "delete": { + "description": "Deletes the delivery time of a product.", + "flatPath": "{merchantId}/productdeliverytime/{productId}", + "httpMethod": "DELETE", + "id": "content.productdeliverytime.delete", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the test order to modify.", + "productId": { + "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testorders/{orderId}/advance", - "response": { - "$ref": "OrdersAdvanceTestOrderResponse" - }, + "path": "{merchantId}/productdeliverytime/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "cancel": { - "description": "Cancels all line items in an order, making a full refund.", - "flatPath": "{merchantId}/orders/{orderId}/cancel", - "httpMethod": "POST", - "id": "content.orders.cancel", + "get": { + "description": "Gets `productDeliveryTime` by `productId`.", + "flatPath": "{merchantId}/productdeliverytime/{productId}", + "httpMethod": "GET", + "id": "content.productdeliverytime.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order to cancel.", + "productId": { + "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/cancel", - "request": { - "$ref": "OrdersCancelRequest" - }, + "path": "{merchantId}/productdeliverytime/{productId}", "response": { - "$ref": "OrdersCancelResponse" + "$ref": "ProductDeliveryTime" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "cancellineitem": { - "description": "Cancels a line item, making a full refund.", - "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", + } + } + }, + "products": { + "methods": { + "custombatch": { + "description": "Retrieves, inserts, and deletes multiple products in a single request.", + "flatPath": "products/batch", "httpMethod": "POST", - "id": "content.orders.cancellineitem", + "id": "content.products.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "products/batch", + "request": { + "$ref": "ProductsCustomBatchRequest" + }, + "response": { + "$ref": "ProductsCustomBatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "delete": { + "description": "Deletes a product from your Merchant Center account.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "DELETE", + "id": "content.products.delete", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { + "feedId": { + "description": "The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted.", + "format": "uint64", + "location": "query", + "type": "string" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/cancelLineItem", - "request": { - "$ref": "OrdersCancelLineItemRequest" - }, - "response": { - "$ref": "OrdersCancelLineItemResponse" - }, + "path": "{merchantId}/products/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "canceltestorderbycustomer": { - "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", - "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", - "httpMethod": "POST", - "id": "content.orders.canceltestorderbycustomer", + "get": { + "description": "Retrieves a product from your Merchant Center account.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "GET", + "id": "content.products.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the test order to cancel.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", - "request": { - "$ref": "OrdersCancelTestOrderByCustomerRequest" - }, + "path": "{merchantId}/products/{productId}", "response": { - "$ref": "OrdersCancelTestOrderByCustomerResponse" + "$ref": "Product" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "captureOrder": { - "description": "Capture funds from the customer for the current order total. This method should be called after the merchant verifies that they are able and ready to start shipping the order. This method blocks until a response is received from the payment processsor. If this method succeeds, the merchant is guaranteed to receive funds for the order after shipment. If the request fails, it can be retried or the order may be cancelled. This method cannot be called after the entire order is already shipped. A rejected error code is returned when the payment service provider has declined the charge. This indicates a problem between the PSP and either the merchant's or customer's account. Sometimes this error will be resolved by the customer. We recommend retrying these errors once per day or cancelling the order with reason `failedToCaptureFunds` if the items cannot be held.", - "flatPath": "{merchantId}/orders/{orderId}/captureOrder", + "insert": { + "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", + "flatPath": "{merchantId}/products", "httpMethod": "POST", - "id": "content.orders.captureOrder", + "id": "content.products.insert", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { - "merchantId": { - "description": "Required. The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "int64", - "location": "path", - "required": true, + "feedId": { + "description": "The Content API Supplemental Feed ID. If present then product insertion applies to the data in a supplemental feed.", + "format": "uint64", + "location": "query", "type": "string" }, - "orderId": { - "description": "Required. The ID of the Order.", + "merchantId": { + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/captureOrder", + "path": "{merchantId}/products", "request": { - "$ref": "CaptureOrderRequest" + "$ref": "Product" }, "response": { - "$ref": "CaptureOrderResponse" + "$ref": "Product" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "createtestorder": { - "description": "Sandbox only. Creates a test order.", - "flatPath": "{merchantId}/testorders", - "httpMethod": "POST", - "id": "content.orders.createtestorder", + "list": { + "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", + "flatPath": "{merchantId}/products", + "httpMethod": "GET", + "id": "content.products.list", "parameterOrder": [ "merchantId" ], "parameters": { + "maxResults": { + "description": "The maximum number of products to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" + }, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/testorders", - "request": { - "$ref": "OrdersCreateTestOrderRequest" - }, + "path": "{merchantId}/products", "response": { - "$ref": "OrdersCreateTestOrderResponse" + "$ref": "ProductsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "createtestreturn": { - "description": "Sandbox only. Creates a test return.", - "flatPath": "{merchantId}/orders/{orderId}/testreturn", - "httpMethod": "POST", - "id": "content.orders.createtestreturn", + "update": { + "description": "Updates an existing product in your Merchant Center account. Only updates attributes provided in the request.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "PATCH", + "id": "content.products.update", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product for which to update.", "location": "path", "required": true, "type": "string" + }, + "updateMask": { + "description": "The comma-separated list of product attributes to be updated. Example: `\"title,salePrice\"`. Attributes specified in the update mask without a value specified in the body will be deleted from the product. *You must specify the update mask to delete attributes.* Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/testreturn", + "path": "{merchantId}/products/{productId}", + "request": { + "$ref": "Product" + }, + "response": { + "$ref": "Product" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "productstatuses": { + "methods": { + "custombatch": { + "description": "Gets the statuses of multiple products in a single request.", + "flatPath": "productstatuses/batch", + "httpMethod": "POST", + "id": "content.productstatuses.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "productstatuses/batch", "request": { - "$ref": "OrdersCreateTestReturnRequest" + "$ref": "ProductstatusesCustomBatchRequest" }, "response": { - "$ref": "OrdersCreateTestReturnResponse" + "$ref": "ProductstatusesCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Retrieves an order from your Merchant Center account.", - "flatPath": "{merchantId}/orders/{orderId}", + "description": "Gets the status of a product from your Merchant Center account.", + "flatPath": "{merchantId}/productstatuses/{productId}", "httpMethod": "GET", - "id": "content.orders.get", + "id": "content.productstatuses.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "location": "query", + "repeated": true, + "type": "string" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}", + "path": "{merchantId}/productstatuses/{productId}", "response": { - "$ref": "Order" + "$ref": "ProductStatus" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "getbymerchantorderid": { - "description": "Retrieves an order using merchant order ID.", - "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", + "list": { + "description": "Lists the statuses of the products in your Merchant Center account.", + "flatPath": "{merchantId}/productstatuses", "httpMethod": "GET", - "id": "content.orders.getbymerchantorderid", + "id": "content.productstatuses.list", "parameterOrder": [ - "merchantId", - "merchantOrderId" + "merchantId" ], "parameters": { + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "location": "query", + "repeated": true, + "type": "string" + }, + "maxResults": { + "description": "The maximum number of product statuses to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "merchantOrderId": { - "description": "The merchant order ID to be looked for.", - "location": "path", - "required": true, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", + "path": "{merchantId}/productstatuses", "response": { - "$ref": "OrdersGetByMerchantOrderIdResponse" + "$ref": "ProductstatusesListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "gettestordertemplate": { - "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", - "flatPath": "{merchantId}/testordertemplates/{templateName}", - "httpMethod": "GET", - "id": "content.orders.gettestordertemplate", + } + } + }, + "promotions": { + "methods": { + "create": { + "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", + "flatPath": "{merchantId}/promotions", + "httpMethod": "POST", + "id": "content.promotions.create", "parameterOrder": [ - "merchantId", - "templateName" + "merchantId" ], "parameters": { - "country": { - "description": "The country of the template to retrieve. Defaults to \"`US`\".", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "templateName": { - "description": "The name of the template to retrieve.", - "enum": [ - "TEMPLATE1", - "TEMPLATE2", - "TEMPLATE1A", - "TEMPLATE1B", - "TEMPLATE3", - "TEMPLATE4" - ], - "enumDescriptions": [ - "Get `template1`.", - "Get `template2`.", - "Get `template1A`.", - "Get `template1B`.", - "Get `template3`.", - "Get `template4`." - ], + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testordertemplates/{templateName}", + "path": "{merchantId}/promotions", + "request": { + "$ref": "Promotion" + }, "response": { - "$ref": "OrdersGetTestOrderTemplateResponse" + "$ref": "Promotion" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "instorerefundlineitem": { - "description": "Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (for example, cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding through Google then through an in-store return.", - "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", - "httpMethod": "POST", - "id": "content.orders.instorerefundlineitem", + "get": { + "description": "Retrieves a promotion from your Merchant Center account.", + "flatPath": "{merchantId}/promotions/{id}", + "httpMethod": "GET", + "id": "content.promotions.get", "parameterOrder": [ "merchantId", - "orderId" + "id" ], "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "id": { + "description": "Required. REST ID of the promotion to retrieve.", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "merchantId": { + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", - "request": { - "$ref": "OrdersInStoreRefundLineItemRequest" - }, + "path": "{merchantId}/promotions/{id}", "response": { - "$ref": "OrdersInStoreRefundLineItemResponse" + "$ref": "Promotion" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "Lists the orders in your Merchant Center account.", - "flatPath": "{merchantId}/orders", + "description": "List all promotions from your Merchant Center account.", + "flatPath": "{merchantId}/promotions", "httpMethod": "GET", - "id": "content.orders.list", + "id": "content.promotions.list", "parameterOrder": [ "merchantId" ], "parameters": { - "acknowledged": { - "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned. ", + "countryCode": { + "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on promotions target country.", "location": "query", - "type": "boolean" + "type": "string" }, - "maxResults": { - "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.", - "format": "uint32", + "languageCode": { + "description": "The two-letter ISO 639-1 language code associated with the promotions, used as a filter.", "location": "query", - "type": "integer" + "type": "string" }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderBy": { - "description": "Order results by placement date in descending or ascending order. Acceptable values are: - placedDateAsc - placedDateDesc ", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "placedDateEnd": { - "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "placedDateStart": { - "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", + "pageSize": { + "description": "The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 labels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", "location": "query", - "type": "string" + "type": "integer" }, - "statuses": { - "description": "Obtains orders that match any of the specified statuses. Note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`.", - "enum": [ - "ACTIVE", - "COMPLETED", - "CANCELED", - "IN_PROGRESS", - "PENDING_SHIPMENT", - "PARTIALLY_SHIPPED", - "SHIPPED", - "PARTIALLY_DELIVERED", - "DELIVERED", - "PARTIALLY_RETURNED", - "RETURNED" - ], - "enumDescriptions": [ - "Return orders with status `active`. The `active` status includes `pendingShipment` and `partiallyShipped` orders.", - "Return orders with status `completed`. The `completed` status includes `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled` orders.", - "Return orders with status `canceled`.", - "Return orders with status `inProgress`.", - "Return orders with status `pendingShipment`.", - "Return orders with status `partiallyShipped`.", - "Return orders with status `shipped`.", - "Return orders with status `partiallyDelivered`.", - "Return orders with status `delivered`.", - "Return orders with status `partiallyReturned`.", - "Return orders with status `returned`." - ], + "pageToken": { + "description": "A page token, received from a previous `ListPromotion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotion` must match the call that provided the page token.", "location": "query", - "repeated": true, "type": "string" } }, - "path": "{merchantId}/orders", + "path": "{merchantId}/promotions", "response": { - "$ref": "OrdersListResponse" + "$ref": "ListPromotionResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "refunditem": { - "description": "Issues a partial or total refund for items and shipment.", - "flatPath": "{merchantId}/orders/{orderId}/refunditem", - "httpMethod": "POST", - "id": "content.orders.refunditem", + } + } + }, + "pubsubnotificationsettings": { + "methods": { + "get": { + "description": "Retrieves a Merchant Center account's pubsub notification settings.", + "flatPath": "{merchantId}/pubsubnotificationsettings", + "httpMethod": "GET", + "id": "content.pubsubnotificationsettings.get", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account for which to get pubsub notification settings.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderId": { - "description": "The ID of the order to refund.", - "location": "path", - "required": true, - "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/refunditem", - "request": { - "$ref": "OrdersRefundItemRequest" - }, + "path": "{merchantId}/pubsubnotificationsettings", "response": { - "$ref": "OrdersRefundItemResponse" + "$ref": "PubsubNotificationSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "refundorder": { - "description": "Issues a partial or total refund for an order.", - "flatPath": "{merchantId}/orders/{orderId}/refundorder", - "httpMethod": "POST", - "id": "content.orders.refundorder", + "update": { + "description": "Register a Merchant Center account for pubsub notifications. Note that cloud topic name shouldn't be provided as part of the request.", + "flatPath": "{merchantId}/pubsubnotificationsettings", + "httpMethod": "PUT", + "id": "content.pubsubnotificationsettings.update", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderId": { - "description": "The ID of the order to refund.", - "location": "path", - "required": true, - "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/refundorder", + "path": "{merchantId}/pubsubnotificationsettings", "request": { - "$ref": "OrdersRefundOrderRequest" + "$ref": "PubsubNotificationSettings" }, "response": { - "$ref": "OrdersRefundOrderResponse" + "$ref": "PubsubNotificationSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "rejectreturnlineitem": { - "description": "Rejects return on an line item.", - "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", - "httpMethod": "POST", - "id": "content.orders.rejectreturnlineitem", + } + } + }, + "quotas": { + "methods": { + "list": { + "description": "Lists the daily call quota and usage per method for your Merchant Center account.", + "flatPath": "{merchantId}/quotas", + "httpMethod": "GET", + "id": "content.quotas.list", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The ID of the account that has quota. This account must be an admin.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", - "location": "path", - "required": true, + "pageSize": { + "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", - "request": { - "$ref": "OrdersRejectReturnLineItemRequest" - }, + "path": "{merchantId}/quotas", "response": { - "$ref": "OrdersRejectReturnLineItemResponse" + "$ref": "ListMethodQuotasResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "returnrefundlineitem": { - "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders. The Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.", - "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", - "httpMethod": "POST", - "id": "content.orders.returnrefundlineitem", + } + } + }, + "recommendations": { + "methods": { + "generate": { + "description": "Generates recommendations for a merchant.", + "flatPath": "{merchantId}/recommendations/generate", + "httpMethod": "GET", + "id": "content.recommendations.generate", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, + "allowedTag": { + "description": "Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND", + "location": "query", + "repeated": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with \"localized\". This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi", + "location": "query", "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "merchantId": { + "description": "Required. The ID of the account to fetch recommendations for.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", - "request": { - "$ref": "OrdersReturnRefundLineItemRequest" - }, + "path": "{merchantId}/recommendations/generate", "response": { - "$ref": "OrdersReturnRefundLineItemResponse" + "$ref": "GenerateRecommendationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "setlineitemmetadata": { - "description": "Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided through other methods. Submitted key-value pairs can be retrieved as part of the orders resource.", - "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", + "reportInteraction": { + "description": "Reports an interaction on a recommendation for a merchant.", + "flatPath": "{merchantId}/recommendations/reportInteraction", "httpMethod": "POST", - "id": "content.orders.setlineitemmetadata", + "id": "content.recommendations.reportInteraction", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "Required. The ID of the account that wants to report an interaction.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", + "path": "{merchantId}/recommendations/reportInteraction", + "request": { + "$ref": "ReportInteractionRequest" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "regionalinventory": { + "methods": { + "custombatch": { + "description": "Updates regional inventory for multiple products or regions in a single request.", + "flatPath": "regionalinventory/batch", + "httpMethod": "POST", + "id": "content.regionalinventory.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "regionalinventory/batch", "request": { - "$ref": "OrdersSetLineItemMetadataRequest" + "$ref": "RegionalinventoryCustomBatchRequest" }, "response": { - "$ref": "OrdersSetLineItemMetadataResponse" + "$ref": "RegionalinventoryCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "shiplineitems": { - "description": "Marks line item(s) as shipped.", - "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", + "insert": { + "description": "Updates the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.", + "flatPath": "{merchantId}/products/{productId}/regionalinventory", "httpMethod": "POST", - "id": "content.orders.shiplineitems", + "id": "content.regionalinventory.insert", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product for which to update the regional inventory.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/shipLineItems", + "path": "{merchantId}/products/{productId}/regionalinventory", "request": { - "$ref": "OrdersShipLineItemsRequest" + "$ref": "RegionalInventory" }, "response": { - "$ref": "OrdersShipLineItemsResponse" + "$ref": "RegionalInventory" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "updatelineitemshippingdetails": { - "description": "Updates ship by and delivery by dates for a line item.", - "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + } + } + }, + "regions": { + "methods": { + "create": { + "description": "Creates a region definition in your Merchant Center account.", + "flatPath": "{merchantId}/regions", "httpMethod": "POST", - "id": "content.orders.updatelineitemshippingdetails", + "id": "content.regions.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to create region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", - "location": "path", - "required": true, + "regionId": { + "description": "Required. The id of the region to create.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "path": "{merchantId}/regions", "request": { - "$ref": "OrdersUpdateLineItemShippingDetailsRequest" + "$ref": "Region" }, "response": { - "$ref": "OrdersUpdateLineItemShippingDetailsResponse" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "updatemerchantorderid": { - "description": "Updates the merchant order ID for a given order.", - "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", - "httpMethod": "POST", - "id": "content.orders.updatemerchantorderid", + "delete": { + "description": "Deletes a region definition from your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "DELETE", + "id": "content.regions.delete", "parameterOrder": [ "merchantId", - "orderId" + "regionId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to delete region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "regionId": { + "description": "Required. The id of the region to delete.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", - "request": { - "$ref": "OrdersUpdateMerchantOrderIdRequest" - }, - "response": { - "$ref": "OrdersUpdateMerchantOrderIdResponse" - }, + "path": "{merchantId}/regions/{regionId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "updateshipment": { - "description": "Updates a shipment's status, carrier, and/or tracking ID.", - "flatPath": "{merchantId}/orders/{orderId}/updateShipment", - "httpMethod": "POST", - "id": "content.orders.updateshipment", + "get": { + "description": "Retrieves a region defined in your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "GET", + "id": "content.regions.get", "parameterOrder": [ "merchantId", - "orderId" + "regionId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to retrieve region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "regionId": { + "description": "Required. The id of the region to retrieve.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateShipment", - "request": { - "$ref": "OrdersUpdateShipmentRequest" - }, + "path": "{merchantId}/regions/{regionId}", "response": { - "$ref": "OrdersUpdateShipmentResponse" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "ordertrackingsignals": { - "methods": { - "create": { - "description": "Creates new order tracking signal.", - "flatPath": "{merchantId}/ordertrackingsignals", - "httpMethod": "POST", - "id": "content.ordertrackingsignals.create", + }, + "list": { + "description": "Lists the regions in your Merchant Center account.", + "flatPath": "{merchantId}/regions", + "httpMethod": "GET", + "id": "content.regions.list", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the merchant for which the order signal is created.", + "description": "Required. The id of the merchant for which to list region definitions.", "format": "int64", "location": "path", "required": true, "type": "string" + }, + "pageSize": { + "description": "The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListRegions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegions` must match the call that provided the page token.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/ordertrackingsignals", + "path": "{merchantId}/regions", + "response": { + "$ref": "ListRegionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "patch": { + "description": "Updates a region definition in your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "PATCH", + "id": "content.regions.patch", + "parameterOrder": [ + "merchantId", + "regionId" + ], + "parameters": { + "merchantId": { + "description": "Required. The id of the merchant for which to update region definition.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "regionId": { + "description": "Required. The id of the region to update.", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The comma-separated field mask indicating the fields to update. Example: `\"displayName,postalCodeArea.regionCode\"`.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "{merchantId}/regions/{regionId}", "request": { - "$ref": "OrderTrackingSignal" + "$ref": "Region" }, "response": { - "$ref": "OrderTrackingSignal" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4215,239 +3840,319 @@ } } }, - "pos": { + "reports": { + "methods": { + "search": { + "description": "Retrieves merchant performance metrics matching the search query and optionally segmented by selected dimensions.", + "flatPath": "{merchantId}/reports/search", + "httpMethod": "POST", + "id": "content.reports.search", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/reports/search", + "request": { + "$ref": "SearchRequest" + }, + "response": { + "$ref": "SearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "returnaddress": { "methods": { "custombatch": { - "description": "Batches multiple POS-related calls in a single request.", - "flatPath": "pos/batch", + "description": "Batches multiple return address related calls in a single request.", + "flatPath": "returnaddress/batch", "httpMethod": "POST", - "id": "content.pos.custombatch", + "id": "content.returnaddress.custombatch", "parameterOrder": [], "parameters": {}, - "path": "pos/batch", + "path": "returnaddress/batch", "request": { - "$ref": "PosCustomBatchRequest" + "$ref": "ReturnaddressCustomBatchRequest" }, "response": { - "$ref": "PosCustomBatchResponse" + "$ref": "ReturnaddressCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "delete": { - "description": "Deletes a store for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "description": "Deletes a return address for the given Merchant Center account.", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "DELETE", - "id": "content.pos.delete", + "id": "content.returnaddress.delete", "parameterOrder": [ "merchantId", - "targetMerchantId", - "storeCode" + "returnAddressId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account from which to delete the given return address.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "storeCode": { - "description": "A store code that is unique per merchant.", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnAddressId": { + "description": "Return address ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Retrieves information about the given store.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "description": "Gets a return address of the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "GET", - "id": "content.pos.get", + "id": "content.returnaddress.get", "parameterOrder": [ "merchantId", - "targetMerchantId", - "storeCode" + "returnAddressId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to get a return address for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "storeCode": { - "description": "A store code that is unique per merchant.", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnAddressId": { + "description": "Return address ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "response": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "insert": { - "description": "Creates a store for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store", + "description": "Inserts a return address for the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress", "httpMethod": "POST", - "id": "content.pos.insert", + "id": "content.returnaddress.insert", "parameterOrder": [ - "merchantId", - "targetMerchantId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", + "description": "The Merchant Center account to insert a return address for.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/returnaddress", "request": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "response": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "inventory": { - "description": "Submit inventory for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", - "httpMethod": "POST", - "id": "content.pos.inventory", + "list": { + "description": "Lists the return addresses of the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress", + "httpMethod": "GET", + "id": "content.returnaddress.list", "parameterOrder": [ - "merchantId", - "targetMerchantId" + "merchantId" ], "parameters": { + "country": { + "description": "List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "The maximum number of addresses in the response, used for paging.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to list return addresses for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", - "location": "path", - "required": true, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/inventory", + "path": "{merchantId}/returnaddress", + "response": { + "$ref": "ReturnaddressListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "returnpolicy": { + "methods": { + "custombatch": { + "description": "Batches multiple return policy related calls in a single request.", + "flatPath": "returnpolicy/batch", + "httpMethod": "POST", + "id": "content.returnpolicy.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "returnpolicy/batch", "request": { - "$ref": "PosInventoryRequest" + "$ref": "ReturnpolicyCustomBatchRequest" }, "response": { - "$ref": "PosInventoryResponse" + "$ref": "ReturnpolicyCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "list": { - "description": "Lists the stores of the target merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store", - "httpMethod": "GET", - "id": "content.pos.list", + "delete": { + "description": "Deletes a return policy for the given Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", + "httpMethod": "DELETE", + "id": "content.returnpolicy.delete", "parameterOrder": [ "merchantId", - "targetMerchantId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account from which to delete the given return policy.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnPolicyId": { + "description": "Return policy ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store", - "response": { - "$ref": "PosListResponse" - }, + "path": "{merchantId}/returnpolicy/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "sale": { - "description": "Submit a sale event for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", - "httpMethod": "POST", - "id": "content.pos.sale", + "get": { + "description": "Gets a return policy of the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", + "httpMethod": "GET", + "id": "content.returnpolicy.get", "parameterOrder": [ "merchantId", - "targetMerchantId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to get a return policy for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", + "returnPolicyId": { + "description": "Return policy ID generated by Google.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/returnpolicy/{returnPolicyId}", + "response": { + "$ref": "ReturnPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "insert": { + "description": "Inserts a return policy for the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy", + "httpMethod": "POST", + "id": "content.returnpolicy.insert", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "The Merchant Center account to insert a return policy for.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/sale", + "path": "{merchantId}/returnpolicy", "request": { - "$ref": "PosSaleRequest" + "$ref": "ReturnPolicy" }, "response": { - "$ref": "PosSaleResponse" + "$ref": "ReturnPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "list": { + "description": "Lists the return policies of the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy", + "httpMethod": "GET", + "id": "content.returnpolicy.list", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "The Merchant Center account to list return policies for.", + "format": "uint64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/returnpolicy", + "response": { + "$ref": "ReturnpolicyListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4455,237 +4160,210 @@ } } }, - "productdeliverytime": { + "returnpolicyonline": { "methods": { "create": { - "description": "Creates or updates the delivery time of a product.", - "flatPath": "{merchantId}/productdeliverytime", + "description": "Creates a new return policy.", + "flatPath": "{merchantId}/returnpolicyonline", "httpMethod": "POST", - "id": "content.productdeliverytime.create", + "id": "content.returnpolicyonline.create", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime", + "path": "{merchantId}/returnpolicyonline", "request": { - "$ref": "ProductDeliveryTime" + "$ref": "ReturnPolicyOnline" }, "response": { - "$ref": "ProductDeliveryTime" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "delete": { - "description": "Deletes the delivery time of a product.", - "flatPath": "{merchantId}/productdeliverytime/{productId}", + "description": "Deletes an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "DELETE", - "id": "content.productdeliverytime.delete", + "id": "content.returnpolicyonline.delete", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", + "returnPolicyId": { + "description": "Required. The id of the return policy to delete.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime/{productId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Gets `productDeliveryTime` by `productId`.", - "flatPath": "{merchantId}/productdeliverytime/{productId}", + "description": "Gets an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "GET", - "id": "content.productdeliverytime.get", + "id": "content.returnpolicyonline.get", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", + "returnPolicyId": { + "description": "Required. The id of the return policy to retrieve.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime/{productId}", - "response": { - "$ref": "ProductDeliveryTime" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "products": { - "methods": { - "custombatch": { - "description": "Retrieves, inserts, and deletes multiple products in a single request.", - "flatPath": "products/batch", - "httpMethod": "POST", - "id": "content.products.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "products/batch", - "request": { - "$ref": "ProductsCustomBatchRequest" - }, + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "response": { - "$ref": "ProductsCustomBatchResponse" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "delete": { - "description": "Deletes a product from your Merchant Center account.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "DELETE", - "id": "content.products.delete", + "list": { + "description": "Lists all existing return policies.", + "flatPath": "{merchantId}/returnpolicyonline", + "httpMethod": "GET", + "id": "content.returnpolicyonline.list", "parameterOrder": [ - "merchantId", - "productId" + "merchantId" ], "parameters": { - "feedId": { - "description": "The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted.", - "format": "uint64", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "productId": { - "description": "The REST ID of the product.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", + "path": "{merchantId}/returnpolicyonline", + "response": { + "$ref": "ListReturnPolicyOnlineResponse" + }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves a product from your Merchant Center account.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "GET", - "id": "content.products.get", + "patch": { + "description": "Updates an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", + "httpMethod": "PATCH", + "id": "content.returnpolicyonline.patch", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product.", + "returnPolicyId": { + "description": "Required. The id of the return policy to update.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", + "request": { + "$ref": "ReturnPolicyOnline" + }, "response": { - "$ref": "Product" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "insert": { - "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", - "flatPath": "{merchantId}/products", - "httpMethod": "POST", - "id": "content.products.insert", + } + } + }, + "settlementreports": { + "methods": { + "get": { + "description": "Retrieves a settlement report from your Merchant Center account.", + "flatPath": "{merchantId}/settlementreports/{settlementId}", + "httpMethod": "GET", + "id": "content.settlementreports.get", "parameterOrder": [ - "merchantId" + "merchantId", + "settlementId" ], "parameters": { - "feedId": { - "description": "The Content API Supplemental Feed ID. If present then product insertion applies to the data in a supplemental feed.", + "merchantId": { + "description": "The Merchant Center account of the settlement report.", "format": "uint64", - "location": "query", + "location": "path", + "required": true, "type": "string" }, - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", + "settlementId": { + "description": "The Google-provided ID of the settlement.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products", - "request": { - "$ref": "Product" - }, + "path": "{merchantId}/settlementreports/{settlementId}", "response": { - "$ref": "Product" + "$ref": "SettlementReport" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", - "flatPath": "{merchantId}/products", + "description": "Retrieves a list of settlement reports from your Merchant Center account.", + "flatPath": "{merchantId}/settlementreports", "httpMethod": "GET", - "id": "content.products.list", + "id": "content.settlementreports.list", "parameterOrder": [ "merchantId" ], "parameters": { "maxResults": { - "description": "The maximum number of products to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "description": "The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.", "format": "uint32", "location": "query", "type": "integer" }, "merchantId": { - "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", + "description": "The Merchant Center account to list settlements for.", "format": "uint64", "location": "path", "required": true, @@ -4695,52 +4373,74 @@ "description": "The token returned by the previous request.", "location": "query", "type": "string" + }, + "transferEndDate": { + "description": "Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.", + "location": "query", + "type": "string" + }, + "transferStartDate": { + "description": "Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/products", + "path": "{merchantId}/settlementreports", "response": { - "$ref": "ProductsListResponse" + "$ref": "SettlementreportsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "update": { - "description": "Updates an existing product in your Merchant Center account. Only updates attributes provided in the request.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "PATCH", - "id": "content.products.update", + } + } + }, + "settlementtransactions": { + "methods": { + "list": { + "description": "Retrieves a list of transactions for the settlement.", + "flatPath": "{merchantId}/settlementreports/{settlementId}/transactions", + "httpMethod": "GET", + "id": "content.settlementtransactions.list", "parameterOrder": [ "merchantId", - "productId" + "settlementId" ], "parameters": { + "maxResults": { + "description": "The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "The Merchant Center account to list transactions for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product for which to update.", + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", + "type": "string" + }, + "settlementId": { + "description": "The Google-provided ID of the settlement.", "location": "path", "required": true, "type": "string" }, - "updateMask": { - "description": "The comma-separated list of product attributes to be updated. Example: `\"title,salePrice\"`. Attributes specified in the update mask without a value specified in the body will be deleted from the product. *You must specify the update mask to delete attributes.* Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged.", - "format": "google-fieldmask", + "transactionIds": { + "description": "The list of transactions to return. If not set, all transactions will be returned.", "location": "query", + "repeated": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", - "request": { - "$ref": "Product" - }, + "path": "{merchantId}/settlementreports/{settlementId}/transactions", "response": { - "$ref": "Product" + "$ref": "SettlementtransactionsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4748,308 +4448,201 @@ } } }, - "productstatuses": { + "shippingsettings": { "methods": { "custombatch": { - "description": "Gets the statuses of multiple products in a single request.", - "flatPath": "productstatuses/batch", + "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", + "flatPath": "shippingsettings/batch", "httpMethod": "POST", - "id": "content.productstatuses.custombatch", + "id": "content.shippingsettings.custombatch", "parameterOrder": [], "parameters": {}, - "path": "productstatuses/batch", + "path": "shippingsettings/batch", "request": { - "$ref": "ProductstatusesCustomBatchRequest" + "$ref": "ShippingsettingsCustomBatchRequest" }, "response": { - "$ref": "ProductstatusesCustomBatchResponse" + "$ref": "ShippingsettingsCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Gets the status of a product from your Merchant Center account.", - "flatPath": "{merchantId}/productstatuses/{productId}", + "description": "Retrieves the shipping settings of the account.", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "GET", - "id": "content.productstatuses.get", + "id": "content.shippingsettings.get", "parameterOrder": [ "merchantId", - "productId" + "accountId" ], "parameters": { - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "location": "query", - "repeated": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "accountId": { + "description": "The ID of the account for which to get/update shipping settings.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product.", + "merchantId": { + "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productstatuses/{productId}", + "path": "{merchantId}/shippingsettings/{accountId}", "response": { - "$ref": "ProductStatus" + "$ref": "ShippingSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "list": { - "description": "Lists the statuses of the products in your Merchant Center account.", - "flatPath": "{merchantId}/productstatuses", + "getsupportedcarriers": { + "description": "Retrieves supported carriers and carrier services for an account.", + "flatPath": "{merchantId}/supportedCarriers", "httpMethod": "GET", - "id": "content.productstatuses.list", + "id": "content.shippingsettings.getsupportedcarriers", "parameterOrder": [ "merchantId" ], "parameters": { - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "location": "query", - "repeated": true, - "type": "string" - }, - "maxResults": { - "description": "The maximum number of product statuses to return in the response, used for paging. The default value is 25. The maximum value is 250.", - "format": "uint32", - "location": "query", - "type": "integer" - }, "merchantId": { - "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", + "description": "The ID of the account for which to retrieve the supported carriers.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/productstatuses", + "path": "{merchantId}/supportedCarriers", "response": { - "$ref": "ProductstatusesListResponse" + "$ref": "ShippingsettingsGetSupportedCarriersResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "promotions": { - "methods": { - "create": { - "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", - "flatPath": "{merchantId}/promotions", - "httpMethod": "POST", - "id": "content.promotions.create", + }, + "getsupportedholidays": { + "description": "Retrieves supported holidays for an account.", + "flatPath": "{merchantId}/supportedHolidays", + "httpMethod": "GET", + "id": "content.shippingsettings.getsupportedholidays", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the account for which to retrieve the supported holidays.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/promotions", - "request": { - "$ref": "Promotion" - }, + "path": "{merchantId}/supportedHolidays", "response": { - "$ref": "Promotion" + "$ref": "ShippingsettingsGetSupportedHolidaysResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves a promotion from your Merchant Center account.", - "flatPath": "{merchantId}/promotions/{id}", + "getsupportedpickupservices": { + "description": "Retrieves supported pickup services for an account.", + "flatPath": "{merchantId}/supportedPickupServices", "httpMethod": "GET", - "id": "content.promotions.get", + "id": "content.shippingsettings.getsupportedpickupservices", "parameterOrder": [ - "merchantId", - "id" + "merchantId" ], "parameters": { - "id": { - "description": "Required. REST ID of the promotion to retrieve.", - "location": "path", - "required": true, - "type": "string" - }, "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the account for which to retrieve the supported pickup services.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/promotions/{id}", + "path": "{merchantId}/supportedPickupServices", "response": { - "$ref": "Promotion" + "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "List all promotions from your Merchant Center account.", - "flatPath": "{merchantId}/promotions", + "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", + "flatPath": "{merchantId}/shippingsettings", "httpMethod": "GET", - "id": "content.promotions.list", + "id": "content.shippingsettings.list", "parameterOrder": [ "merchantId" ], "parameters": { - "countryCode": { - "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on promotions target country.", - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "The two-letter ISO 639-1 language code associated with the promotions, used as a filter.", + "maxResults": { + "description": "The maximum number of shipping settings to return in the response, used for paging.", + "format": "uint32", "location": "query", - "type": "string" + "type": "integer" }, "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the managing account. This must be a multi-client account.", + "format": "uint64", "location": "path", "required": true, "type": "string" }, - "pageSize": { - "description": "The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 labels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, "pageToken": { - "description": "A page token, received from a previous `ListPromotion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotion` must match the call that provided the page token.", + "description": "The token returned by the previous request.", "location": "query", "type": "string" } }, - "path": "{merchantId}/promotions", + "path": "{merchantId}/shippingsettings", "response": { - "$ref": "ListPromotionResponse" + "$ref": "ShippingsettingsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "pubsubnotificationsettings": { - "methods": { - "get": { - "description": "Retrieves a Merchant Center account's pubsub notification settings.", - "flatPath": "{merchantId}/pubsubnotificationsettings", - "httpMethod": "GET", - "id": "content.pubsubnotificationsettings.get", + }, + "update": { + "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", + "flatPath": "{merchantId}/shippingsettings/{accountId}", + "httpMethod": "PUT", + "id": "content.shippingsettings.update", "parameterOrder": [ - "merchantId" + "merchantId", + "accountId" ], "parameters": { + "accountId": { + "description": "The ID of the account for which to get/update shipping settings.", + "format": "uint64", + "location": "path", + "required": true, + "type": "string" + }, "merchantId": { - "description": "The ID of the account for which to get pubsub notification settings.", + "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pubsubnotificationsettings", - "response": { - "$ref": "PubsubNotificationSettings" + "path": "{merchantId}/shippingsettings/{accountId}", + "request": { + "$ref": "ShippingSettings" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "update": { - "description": "Register a Merchant Center account for pubsub notifications. Note that cloud topic name shouldn't be provided as part of the request.", - "flatPath": "{merchantId}/pubsubnotificationsettings", - "httpMethod": "PUT", - "id": "content.pubsubnotificationsettings.update", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/pubsubnotificationsettings", - "request": { - "$ref": "PubsubNotificationSettings" - }, - "response": { - "$ref": "PubsubNotificationSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "quotas": { - "methods": { - "list": { - "description": "Lists the daily call quota and usage per method for your Merchant Center account.", - "flatPath": "{merchantId}/quotas", - "httpMethod": "GET", - "id": "content.quotas.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account that has quota. This account must be an admin.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/quotas", "response": { - "$ref": "ListMethodQuotasResponse" + "$ref": "ShippingSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -5057,5735 +4650,2387 @@ } } }, - "recommendations": { + "shoppingadsprogram": { "methods": { - "generate": { - "description": "Generates recommendations for a merchant.", - "flatPath": "{merchantId}/recommendations/generate", + "get": { + "description": "Retrieves the status and review eligibility for the Shopping Ads program. Returns errors and warnings if they require action to resolve, will become disapprovals, or impact impressions. Use `accountstatuses` to view all issues for an account.", + "flatPath": "{merchantId}/shoppingadsprogram", "httpMethod": "GET", - "id": "content.recommendations.generate", + "id": "content.shoppingadsprogram.get", "parameterOrder": [ "merchantId" ], "parameters": { - "allowedTag": { - "description": "Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND", - "location": "query", - "repeated": true, - "type": "string" - }, - "languageCode": { - "description": "Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with \"localized\". This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "Required. The ID of the account to fetch recommendations for.", + "description": "Required. The ID of the account.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/recommendations/generate", + "path": "{merchantId}/shoppingadsprogram", "response": { - "$ref": "GenerateRecommendationsResponse" + "$ref": "ShoppingAdsProgramStatus" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "reportInteraction": { - "description": "Reports an interaction on a recommendation for a merchant.", - "flatPath": "{merchantId}/recommendations/reportInteraction", + "requestreview": { + "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", + "flatPath": "{merchantId}/shoppingadsprogram/requestreview", "httpMethod": "POST", - "id": "content.recommendations.reportInteraction", + "id": "content.shoppingadsprogram.requestreview", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "Required. The ID of the account that wants to report an interaction.", + "description": "Required. The ID of the account.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/recommendations/reportInteraction", + "path": "{merchantId}/shoppingadsprogram/requestreview", "request": { - "$ref": "ReportInteractionRequest" + "$ref": "RequestReviewShoppingAdsRequest" }, "scopes": [ "https://www.googleapis.com/auth/content" ] } } - }, - "regionalinventory": { - "methods": { - "custombatch": { - "description": "Updates regional inventory for multiple products or regions in a single request.", - "flatPath": "regionalinventory/batch", - "httpMethod": "POST", - "id": "content.regionalinventory.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "regionalinventory/batch", - "request": { - "$ref": "RegionalinventoryCustomBatchRequest" + } + }, + "revision": "20240825", + "rootUrl": "https://shoppingcontent.googleapis.com/", + "schemas": { + "Account": { + "description": "Account data. After the creation of a new account it may take a few minutes before it's fully operational. The methods delete, insert, and update require the admin role.", + "id": "Account", + "properties": { + "accountManagement": { + "description": "Output only. How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", + "readOnly": true, + "type": "string" + }, + "adsLinks": { + "description": "Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list.", + "items": { + "$ref": "AccountAdsLink" }, - "response": { - "$ref": "RegionalinventoryCustomBatchResponse" + "type": "array" + }, + "adultContent": { + "description": "Indicates whether the merchant sells adult content.", + "type": "boolean" + }, + "automaticImprovements": { + "$ref": "AccountAutomaticImprovements", + "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately." + }, + "automaticLabelIds": { + "description": "Automatically created label IDs that are assigned to the account by CSS Center.", + "items": { + "format": "uint64", + "type": "string" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] + "type": "array" }, - "insert": { - "description": "Updates the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.", - "flatPath": "{merchantId}/products/{productId}/regionalinventory", - "httpMethod": "POST", - "id": "content.regionalinventory.insert", - "parameterOrder": [ - "merchantId", - "productId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "productId": { - "description": "The REST ID of the product for which to update the regional inventory.", - "location": "path", - "required": true, - "type": "string" - } + "businessIdentity": { + "$ref": "AccountBusinessIdentity", + "description": "The business identity attributes can be used to self-declare attributes that let customers know more about your business." + }, + "businessInformation": { + "$ref": "AccountBusinessInformation", + "description": "The business information of the account." + }, + "conversionSettings": { + "$ref": "AccountConversionSettings", + "description": "Settings for conversion tracking." + }, + "cssId": { + "description": "ID of CSS the account belongs to.", + "format": "uint64", + "type": "string" + }, + "googleMyBusinessLink": { + "$ref": "AccountGoogleMyBusinessLink", + "description": "The Business Profile which is linked or in the process of being linked with the Merchant Center account." + }, + "id": { + "description": "Required. 64-bit Merchant Center account ID.", + "format": "uint64", + "type": "string" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#account`\".", + "type": "string" + }, + "labelIds": { + "description": "Manually created label IDs that are assigned to the account by CSS.", + "items": { + "format": "uint64", + "type": "string" }, - "path": "{merchantId}/products/{productId}/regionalinventory", - "request": { - "$ref": "RegionalInventory" + "type": "array" + }, + "name": { + "description": "Required. Display name for the account.", + "type": "string" + }, + "sellerId": { + "description": "Client-specific, locally-unique, internal ID for the child account.", + "type": "string" + }, + "users": { + "description": "Users with access to the account. Every account (except for subaccounts) must have at least one admin user.", + "items": { + "$ref": "AccountUser" }, - "response": { - "$ref": "RegionalInventory" + "type": "array" + }, + "websiteUrl": { + "description": "The merchant's website.", + "type": "string" + }, + "youtubeChannelLinks": { + "description": "Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.", + "items": { + "$ref": "AccountYouTubeChannelLink" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] + "type": "array" } - } + }, + "type": "object" }, - "regions": { - "methods": { - "create": { - "description": "Creates a region definition in your Merchant Center account.", - "flatPath": "{merchantId}/regions", - "httpMethod": "POST", - "id": "content.regions.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to create region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to create.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions", - "request": { - "$ref": "Region" - }, - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a region definition from your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "DELETE", - "id": "content.regions.delete", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to delete region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves a region defined in your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "GET", - "id": "content.regions.get", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to retrieve.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the regions in your Merchant Center account.", - "flatPath": "{merchantId}/regions", - "httpMethod": "GET", - "id": "content.regions.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to list region definitions.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListRegions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegions` must match the call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions", - "response": { - "$ref": "ListRegionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates a region definition in your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "PATCH", - "id": "content.regions.patch", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to update region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to update.", - "location": "path", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The comma-separated field mask indicating the fields to update. Example: `\"displayName,postalCodeArea.regionCode\"`.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "request": { - "$ref": "Region" - }, - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "reports": { - "methods": { - "search": { - "description": "Retrieves merchant performance metrics matching the search query and optionally segmented by selected dimensions.", - "flatPath": "{merchantId}/reports/search", - "httpMethod": "POST", - "id": "content.reports.search", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/reports/search", - "request": { - "$ref": "SearchRequest" - }, - "response": { - "$ref": "SearchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnaddress": { - "methods": { - "custombatch": { - "description": "Batches multiple return address related calls in a single request.", - "flatPath": "returnaddress/batch", - "httpMethod": "POST", - "id": "content.returnaddress.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnaddress/batch", - "request": { - "$ref": "ReturnaddressCustomBatchRequest" - }, - "response": { - "$ref": "ReturnaddressCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return address for the given Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "DELETE", - "id": "content.returnaddress.delete", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return address.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return address of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "GET", - "id": "content.returnaddress.get", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return address for the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "POST", - "id": "content.returnaddress.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "request": { - "$ref": "ReturnAddress" - }, - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return addresses of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "GET", - "id": "content.returnaddress.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "country": { - "description": "List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "The maximum number of addresses in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list return addresses for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "response": { - "$ref": "ReturnaddressListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnpolicy": { - "methods": { - "custombatch": { - "description": "Batches multiple return policy related calls in a single request.", - "flatPath": "returnpolicy/batch", - "httpMethod": "POST", - "id": "content.returnpolicy.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnpolicy/batch", - "request": { - "$ref": "ReturnpolicyCustomBatchRequest" - }, - "response": { - "$ref": "ReturnpolicyCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return policy for the given Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "DELETE", - "id": "content.returnpolicy.delete", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return policy.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return policy of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "GET", - "id": "content.returnpolicy.get", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return policy for the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "POST", - "id": "content.returnpolicy.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "request": { - "$ref": "ReturnPolicy" - }, - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return policies of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "GET", - "id": "content.returnpolicy.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to list return policies for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "response": { - "$ref": "ReturnpolicyListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnpolicyonline": { - "methods": { - "create": { - "description": "Creates a new return policy.", - "flatPath": "{merchantId}/returnpolicyonline", - "httpMethod": "POST", - "id": "content.returnpolicyonline.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline", - "request": { - "$ref": "ReturnPolicyOnline" - }, - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "DELETE", - "id": "content.returnpolicyonline.delete", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "GET", - "id": "content.returnpolicyonline.get", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to retrieve.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists all existing return policies.", - "flatPath": "{merchantId}/returnpolicyonline", - "httpMethod": "GET", - "id": "content.returnpolicyonline.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline", - "response": { - "$ref": "ListReturnPolicyOnlineResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "PATCH", - "id": "content.returnpolicyonline.patch", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to update.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "request": { - "$ref": "ReturnPolicyOnline" - }, - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "settlementreports": { - "methods": { - "get": { - "description": "Retrieves a settlement report from your Merchant Center account.", - "flatPath": "{merchantId}/settlementreports/{settlementId}", - "httpMethod": "GET", - "id": "content.settlementreports.get", - "parameterOrder": [ - "merchantId", - "settlementId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account of the settlement report.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "settlementId": { - "description": "The Google-provided ID of the settlement.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/settlementreports/{settlementId}", - "response": { - "$ref": "SettlementReport" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Retrieves a list of settlement reports from your Merchant Center account.", - "flatPath": "{merchantId}/settlementreports", - "httpMethod": "GET", - "id": "content.settlementreports.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list settlements for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "transferEndDate": { - "description": "Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "transferStartDate": { - "description": "Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/settlementreports", - "response": { - "$ref": "SettlementreportsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "settlementtransactions": { - "methods": { - "list": { - "description": "Retrieves a list of transactions for the settlement.", - "flatPath": "{merchantId}/settlementreports/{settlementId}/transactions", - "httpMethod": "GET", - "id": "content.settlementtransactions.list", - "parameterOrder": [ - "merchantId", - "settlementId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list transactions for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "settlementId": { - "description": "The Google-provided ID of the settlement.", - "location": "path", - "required": true, - "type": "string" - }, - "transactionIds": { - "description": "The list of transactions to return. If not set, all transactions will be returned.", - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "{merchantId}/settlementreports/{settlementId}/transactions", - "response": { - "$ref": "SettlementtransactionsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "shippingsettings": { - "methods": { - "custombatch": { - "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", - "flatPath": "shippingsettings/batch", - "httpMethod": "POST", - "id": "content.shippingsettings.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "shippingsettings/batch", - "request": { - "$ref": "ShippingsettingsCustomBatchRequest" - }, - "response": { - "$ref": "ShippingsettingsCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves the shipping settings of the account.", - "flatPath": "{merchantId}/shippingsettings/{accountId}", - "httpMethod": "GET", - "id": "content.shippingsettings.get", - "parameterOrder": [ - "merchantId", - "accountId" - ], - "parameters": { - "accountId": { - "description": "The ID of the account for which to get/update shipping settings.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings/{accountId}", - "response": { - "$ref": "ShippingSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedcarriers": { - "description": "Retrieves supported carriers and carrier services for an account.", - "flatPath": "{merchantId}/supportedCarriers", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedcarriers", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported carriers.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedCarriers", - "response": { - "$ref": "ShippingsettingsGetSupportedCarriersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedholidays": { - "description": "Retrieves supported holidays for an account.", - "flatPath": "{merchantId}/supportedHolidays", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedholidays", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported holidays.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedHolidays", - "response": { - "$ref": "ShippingsettingsGetSupportedHolidaysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedpickupservices": { - "description": "Retrieves supported pickup services for an account.", - "flatPath": "{merchantId}/supportedPickupServices", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedpickupservices", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported pickup services.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedPickupServices", - "response": { - "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", - "flatPath": "{merchantId}/shippingsettings", - "httpMethod": "GET", - "id": "content.shippingsettings.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of shipping settings to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the managing account. This must be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings", - "response": { - "$ref": "ShippingsettingsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "update": { - "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "{merchantId}/shippingsettings/{accountId}", - "httpMethod": "PUT", - "id": "content.shippingsettings.update", - "parameterOrder": [ - "merchantId", - "accountId" - ], - "parameters": { - "accountId": { - "description": "The ID of the account for which to get/update shipping settings.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings/{accountId}", - "request": { - "$ref": "ShippingSettings" - }, - "response": { - "$ref": "ShippingSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "shoppingadsprogram": { - "methods": { - "get": { - "description": "Retrieves the status and review eligibility for the Shopping Ads program. Returns errors and warnings if they require action to resolve, will become disapprovals, or impact impressions. Use `accountstatuses` to view all issues for an account.", - "flatPath": "{merchantId}/shoppingadsprogram", - "httpMethod": "GET", - "id": "content.shoppingadsprogram.get", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shoppingadsprogram", - "response": { - "$ref": "ShoppingAdsProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "requestreview": { - "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", - "flatPath": "{merchantId}/shoppingadsprogram/requestreview", - "httpMethod": "POST", - "id": "content.shoppingadsprogram.requestreview", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shoppingadsprogram/requestreview", - "request": { - "$ref": "RequestReviewShoppingAdsRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } - }, - "revision": "20240723", - "rootUrl": "https://shoppingcontent.googleapis.com/", - "schemas": { - "Account": { - "description": "Account data. After the creation of a new account it may take a few minutes before it's fully operational. The methods delete, insert, and update require the admin role.", - "id": "Account", - "properties": { - "accountManagement": { - "description": "Output only. How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", - "readOnly": true, - "type": "string" - }, - "adsLinks": { - "description": "Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list.", - "items": { - "$ref": "AccountAdsLink" - }, - "type": "array" - }, - "adultContent": { - "description": "Indicates whether the merchant sells adult content.", - "type": "boolean" - }, - "automaticImprovements": { - "$ref": "AccountAutomaticImprovements", - "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately." - }, - "automaticLabelIds": { - "description": "Automatically created label IDs that are assigned to the account by CSS Center.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "businessIdentity": { - "$ref": "AccountBusinessIdentity", - "description": "The business identity attributes can be used to self-declare attributes that let customers know more about your business." - }, - "businessInformation": { - "$ref": "AccountBusinessInformation", - "description": "The business information of the account." - }, - "conversionSettings": { - "$ref": "AccountConversionSettings", - "description": "Settings for conversion tracking." - }, - "cssId": { - "description": "ID of CSS the account belongs to.", - "format": "uint64", - "type": "string" - }, - "googleMyBusinessLink": { - "$ref": "AccountGoogleMyBusinessLink", - "description": "The Business Profile which is linked or in the process of being linked with the Merchant Center account." - }, - "id": { - "description": "Required. 64-bit Merchant Center account ID.", - "format": "uint64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#account`\".", - "type": "string" - }, - "labelIds": { - "description": "Manually created label IDs that are assigned to the account by CSS.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Required. Display name for the account.", - "type": "string" - }, - "sellerId": { - "description": "Client-specific, locally-unique, internal ID for the child account.", - "type": "string" - }, - "users": { - "description": "Users with access to the account. Every account (except for subaccounts) must have at least one admin user.", - "items": { - "$ref": "AccountUser" - }, - "type": "array" - }, - "websiteUrl": { - "description": "The merchant's website.", - "type": "string" - }, - "youtubeChannelLinks": { - "description": "Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.", - "items": { - "$ref": "AccountYouTubeChannelLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountAddress": { - "id": "AccountAddress", - "properties": { - "country": { - "description": "CLDR country code (for example, \"US\"). All MCA sub-accounts inherit the country of their parent MCA by default, however the country can be updated for individual sub-accounts.", - "type": "string" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "postalCode": { - "description": "Postal code or ZIP (for example, \"94043\").", - "type": "string" - }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "type": "string" - } - }, - "type": "object" - }, - "AccountAdsLink": { - "id": "AccountAdsLink", - "properties": { - "adsId": { - "description": "Customer ID of the Ads account.", - "format": "uint64", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in Google Ads or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending. Acceptable values are: - \"`active`\" - \"`pending`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountAutomaticImprovements": { - "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping.", - "id": "AccountAutomaticImprovements", - "properties": { - "imageImprovements": { - "$ref": "AccountImageImprovements", - "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973) This field is only updated (cleared) if provided." - }, - "itemUpdates": { - "$ref": "AccountItemUpdates", - "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown. This field is only updated (cleared) if provided." - }, - "shippingImprovements": { - "$ref": "AccountShippingImprovements", - "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: - Delivery address of an order - Current handling time and shipping time settings - Estimated weekdays or business days - Parcel tracking data This field is only updated (cleared) if provided." - } - }, - "type": "object" - }, - "AccountBusinessIdentity": { - "description": "The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business.", - "id": "AccountBusinessIdentity", - "properties": { - "blackOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "includeForPromotions": { - "description": "Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.", - "type": "boolean" - }, - "latinoOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "smallBusiness": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to \"US\". It is also not allowed for marketplaces, but it is allowed to marketplace sellers." - }, - "veteranOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "womenOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - } - }, - "type": "object" - }, - "AccountBusinessInformation": { - "id": "AccountBusinessInformation", - "properties": { - "address": { - "$ref": "AccountAddress", - "description": "The address of the business. Use `\\n` to add a second address line." - }, - "customerService": { - "$ref": "AccountCustomerService", - "description": "The customer service information of the business." - }, - "koreanBusinessRegistrationNumber": { - "description": "The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX. This field will only be updated if explicitly set.", - "type": "string" - }, - "phoneNumber": { - "description": "The phone number of the business in [E.164](https://en.wikipedia.org/wiki/E.164) format. This can only be updated if a verified phone number is not already set. To replace a verified phone number use the `Accounts.requestphoneverification` and `Accounts.verifyphonenumber`.", - "type": "string" - }, - "phoneVerificationStatus": { - "description": "Verification status of the phone number of the business. This status is read only and can be updated only by successful phone verification. Acceptable values are: - \"`verified`\" - \"`unverified`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountConversionSettings": { - "description": "Settings for conversion tracking.", - "id": "AccountConversionSettings", - "properties": { - "freeListingsAutoTaggingEnabled": { - "description": "When enabled, free listing URLs have a parameter to enable conversion tracking for products owned by the current merchant account. See [auto-tagging](https://support.google.com/merchants/answer/11127659).", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountCredentials": { - "description": "Credentials allowing Google to call a partner's API on behalf of a merchant.", - "id": "AccountCredentials", - "properties": { - "accessToken": { - "description": "An OAuth access token.", - "type": "string" - }, - "expiresIn": { - "description": "The amount of time, in seconds, after which the access token is no longer valid.", - "format": "int64", - "type": "string" - }, - "purpose": { - "description": "Indicates to Google how Google should use these OAuth tokens.", - "enum": [ - "ACCOUNT_CREDENTIALS_PURPOSE_UNSPECIFIED", - "SHOPIFY_ORDER_MANAGEMENT", - "SHOPIFY_INTEGRATION" - ], - "enumDeprecated": [ - false, - true, - false - ], - "enumDescriptions": [ - "Unknown purpose.", - "The credentials allow Google to manage Shopify orders on behalf of the merchant (deprecated).", - "The credentials allow Google to manage Shopify integration on behalf of the merchant." - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountCustomerService": { - "id": "AccountCustomerService", - "properties": { - "email": { - "description": "Customer service email.", - "type": "string" - }, - "phoneNumber": { - "description": "Customer service phone number.", - "type": "string" - }, - "url": { - "description": "Customer service URL.", - "type": "string" - } - }, - "type": "object" - }, - "AccountGoogleMyBusinessLink": { - "id": "AccountGoogleMyBusinessLink", - "properties": { - "gmbAccountId": { - "description": "The ID of the Business Profile. If this is provided, then `gmbEmail` is ignored. The value of this field should match the `accountId` used by the Business Profile API.", - "type": "string" - }, - "gmbEmail": { - "description": "The Business Profile email address of a specific account within a Business Profile. A sample account within a Business Profile could be a business account with set of locations, managed under the Business Profile.", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the Business Profile. Acceptable values are: - \"`active`\" - \"`pending`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountIdentifier": { - "id": "AccountIdentifier", - "properties": { - "aggregatorId": { - "description": "The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).", - "format": "uint64", - "type": "string" - }, - "merchantId": { - "description": "The merchant account ID, set for individual accounts and subaccounts.", - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "AccountIdentityType": { - "description": "The account identity type used to specify attributes.", - "id": "AccountIdentityType", - "properties": { - "selfIdentified": { - "description": "Optional. Indicates that the business identifies itself with a given identity type. Setting this field does not automatically mean eligibility for promotions.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountImageImprovements": { - "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973)", - "id": "AccountImageImprovements", - "properties": { - "accountImageImprovementsSettings": { - "$ref": "AccountImageImprovementsSettings", - "description": "Determines how the images should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." - }, - "effectiveAllowAutomaticImageImprovements": { - "description": "Output only. The effective value of allow_automatic_image_improvements. If account_image_improvements_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "AccountImageImprovementsSettings": { - "description": "Settings for the Automatic Image Improvements.", - "id": "AccountImageImprovementsSettings", - "properties": { - "allowAutomaticImageImprovements": { - "description": "Enables automatic image improvements.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountIssue": { - "description": "An issue affecting specific merchant.", - "id": "AccountIssue", - "properties": { - "actions": { - "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", - "items": { - "$ref": "Action" - }, - "type": "array" - }, - "impact": { - "$ref": "AccountIssueImpact", - "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." - }, - "prerenderedContent": { - "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", - "type": "string" - }, - "title": { - "description": "Title of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "AccountIssueImpact": { - "description": "Overall impact of the issue.", - "id": "AccountIssueImpact", - "properties": { - "breakdowns": { - "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", - "items": { - "$ref": "Breakdown" - }, - "type": "array" - }, - "message": { - "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Disapproves 90k offers in 25 countries\"", - "type": "string" - }, - "severity": { - "description": "The severity of the issue.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", - "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", - "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountItemUpdates": { - "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown.", - "id": "AccountItemUpdates", - "properties": { - "accountItemUpdatesSettings": { - "$ref": "AccountItemUpdatesSettings", - "description": "Determines which attributes of the items should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." - }, - "effectiveAllowAvailabilityUpdates": { - "description": "Output only. The effective value of allow_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowConditionUpdates": { - "description": "Output only. The effective value of allow_condition_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowPriceUpdates": { - "description": "Output only. The effective value of allow_price_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowStrictAvailabilityUpdates": { - "description": "Output only. The effective value of allow_strict_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "AccountItemUpdatesSettings": { - "description": "Settings for the Automatic Item Updates.", - "id": "AccountItemUpdatesSettings", - "properties": { - "allowAvailabilityUpdates": { - "description": "If availability updates are enabled, any previous availability values get overwritten if Google finds an out-of-stock annotation on the offer's page. If additionally `allow_availability_updates` field is set to true, values get overwritten if Google finds an in-stock annotation on the offer’s page.", - "type": "boolean" - }, - "allowConditionUpdates": { - "description": "If condition updates are enabled, Google always updates item condition with the condition detected from the details of your product.", - "type": "boolean" - }, - "allowPriceUpdates": { - "description": "If price updates are enabled, Google always updates the active price with the crawled information.", - "type": "boolean" - }, - "allowStrictAvailabilityUpdates": { - "description": "If allow_availability_updates is enabled, items are automatically updated in all your Shopping target countries. By default, availability updates will only be applied to items that are 'out of stock' on your website but 'in stock' on Shopping. Set this to true to also update items that are 'in stock' on your website, but 'out of stock' on Google Shopping. In order for this field to have an effect, you must also allow availability updates.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountLabel": { - "description": "Label assigned by CSS domain or CSS group to one of its sub-accounts.", - "id": "AccountLabel", - "properties": { - "accountId": { - "description": "Immutable. The ID of account this label belongs to.", - "format": "int64", - "type": "string" - }, - "description": { - "description": "The description of this label.", - "type": "string" - }, - "labelId": { - "description": "Output only. The ID of the label.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "labelType": { - "description": "Output only. The type of this label.", - "enum": [ - "LABEL_TYPE_UNSPECIFIED", - "MANUAL", - "AUTOMATIC" - ], - "enumDescriptions": [ - "Unknown label type.", - "Indicates that the label was created manually.", - "Indicates that the label was created automatically by CSS Center." - ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "The display name of this label.", - "type": "string" - } - }, - "type": "object" - }, - "AccountReturnCarrier": { - "description": " The return carrier information. This service is designed for merchants enrolled in the Buy on Google program. ", - "id": "AccountReturnCarrier", - "properties": { - "carrierAccountId": { - "description": "Output only. Immutable. The Google-provided unique carrier ID, used to update the resource.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "carrierAccountName": { - "description": "Name of the carrier account.", - "type": "string" - }, - "carrierAccountNumber": { - "description": "Number of the carrier account.", - "type": "string" - }, - "carrierCode": { - "description": "The carrier code enum. Accepts the values FEDEX or UPS.", - "enum": [ - "CARRIER_CODE_UNSPECIFIED", - "FEDEX", - "UPS" - ], - "enumDescriptions": [ - "Carrier not specified", - "FedEx carrier", - "UPS carrier" - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountShippingImprovements": { - "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: * Delivery address of an order * Current handling time and shipping time settings * Estimated weekdays or business days * Parcel tracking data", - "id": "AccountShippingImprovements", - "properties": { - "allowShippingImprovements": { - "description": "Enables automatic shipping improvements.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountStatus": { - "description": "The status of an account, that is, information about its products, which is computed offline and not returned immediately at insertion time.", - "id": "AccountStatus", - "properties": { - "accountId": { - "description": "The ID of the account for which the status is reported.", - "type": "string" - }, - "accountLevelIssues": { - "description": "A list of account level issues.", - "items": { - "$ref": "AccountStatusAccountLevelIssue" - }, - "type": "array" - }, - "accountManagement": { - "description": "How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountStatus`\"", - "type": "string" - }, - "products": { - "description": "List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.", - "items": { - "$ref": "AccountStatusProducts" - }, - "type": "array" - }, - "websiteClaimed": { - "description": "Whether the account's website is claimed or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountStatusAccountLevelIssue": { - "id": "AccountStatusAccountLevelIssue", - "properties": { - "country": { - "description": "Country for which this issue is reported.", - "type": "string" - }, - "destination": { - "description": "The destination the issue applies to. If this field is empty then the issue applies to all available destinations.", - "type": "string" - }, - "detail": { - "description": "Additional details about the issue.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help resolving this issue.", - "type": "string" - }, - "id": { - "description": "Issue identifier.", - "type": "string" - }, - "severity": { - "description": "Severity of the issue. Acceptable values are: - \"`critical`\" - \"`error`\" - \"`suggestion`\" ", - "type": "string" - }, - "title": { - "description": "Short description of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "AccountStatusItemLevelIssue": { - "id": "AccountStatusItemLevelIssue", - "properties": { - "attributeName": { - "description": "The attribute's name, if the issue is caused by a single attribute.", - "type": "string" - }, - "code": { - "description": "The error code of the issue.", - "type": "string" - }, - "description": { - "description": "A short issue description in English.", - "type": "string" - }, - "detail": { - "description": "A detailed issue description in English.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help with resolving this issue.", - "type": "string" - }, - "numItems": { - "description": "Number of items with this issue.", - "format": "int64", - "type": "string" - }, - "resolution": { - "description": "Whether the issue can be resolved by the merchant.", - "type": "string" - }, - "servability": { - "description": "How this issue affects serving of the offer.", - "type": "string" - } - }, - "type": "object" - }, - "AccountStatusProducts": { - "id": "AccountStatusProducts", - "properties": { - "channel": { - "description": "The channel the data applies to. Acceptable values are: - \"`local`\" - \"`online`\" ", - "type": "string" - }, - "country": { - "description": "The country the data applies to.", - "type": "string" - }, - "destination": { - "description": "The destination the data applies to.", - "type": "string" - }, - "itemLevelIssues": { - "description": "List of item-level issues.", - "items": { - "$ref": "AccountStatusItemLevelIssue" - }, - "type": "array" - }, - "statistics": { - "$ref": "AccountStatusStatistics", - "description": "Aggregated product statistics." - } - }, - "type": "object" - }, - "AccountStatusStatistics": { - "id": "AccountStatusStatistics", - "properties": { - "active": { - "description": "Number of active offers.", - "format": "int64", - "type": "string" - }, - "disapproved": { - "description": "Number of disapproved offers.", - "format": "int64", - "type": "string" - }, - "expiring": { - "description": "Number of expiring offers.", - "format": "int64", - "type": "string" - }, - "pending": { - "description": "Number of pending offers.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "AccountTax": { - "description": "The tax settings of a merchant account. All methods require the admin role.", - "id": "AccountTax", - "properties": { - "accountId": { - "description": "Required. The ID of the account to which these account tax settings belong.", - "format": "uint64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountTax`\".", - "type": "string" - }, - "rules": { - "description": "Tax rules. Updating the tax rules will enable \"US\" taxes (not reversible). Defining no rules is equivalent to not charging tax at all.", - "items": { - "$ref": "AccountTaxTaxRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountTaxTaxRule": { - "description": "Tax calculation rule to apply in a state or province (US only).", - "id": "AccountTaxTaxRule", - "properties": { - "country": { - "description": "Country code in which tax is applicable.", - "type": "string" - }, - "locationId": { - "description": "Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).", - "format": "uint64", - "type": "string" - }, - "ratePercent": { - "description": "Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.", - "type": "string" - }, - "shippingTaxed": { - "description": "If true, shipping charges are also taxed.", - "type": "boolean" - }, - "useGlobalRate": { - "description": "Whether the tax rate is taken from a global tax table or specified explicitly.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountUser": { - "id": "AccountUser", - "properties": { - "admin": { - "description": "Whether user is an admin.", - "type": "boolean" - }, - "emailAddress": { - "description": "User's email address.", - "type": "string" - }, - "orderManager": { - "description": "Whether user is an order manager.", - "type": "boolean" - }, - "paymentsAnalyst": { - "description": "Whether user can access payment statements.", - "type": "boolean" - }, - "paymentsManager": { - "description": "Whether user can manage payment settings.", - "type": "boolean" - }, - "reportingManager": { - "description": "Whether user is a reporting manager. This role is equivalent to the Performance and insights role in Merchant Center.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountYouTubeChannelLink": { - "id": "AccountYouTubeChannelLink", - "properties": { - "channelId": { - "description": "Channel ID.", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in YT Creator Studio or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsAuthInfoResponse": { - "id": "AccountsAuthInfoResponse", - "properties": { - "accountIdentifiers": { - "description": "The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. ", - "items": { - "$ref": "AccountIdentifier" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsAuthInfoResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsClaimWebsiteResponse": { - "id": "AccountsClaimWebsiteResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsClaimWebsiteResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequest": { - "id": "AccountsCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccountsCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accounts request.", - "id": "AccountsCustomBatchRequestEntry", - "properties": { - "account": { - "$ref": "Account", - "description": "The account to create or update. Only defined if the method is `insert` or `update`." - }, - "accountId": { - "description": "The ID of the targeted account. Only defined if the method is not `insert`.", - "format": "uint64", - "type": "string" - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "force": { - "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is `delete`.", - "type": "boolean" - }, - "labelIds": { - "description": "Label IDs for the 'updatelabels' request.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "linkRequest": { - "$ref": "AccountsCustomBatchRequestEntryLinkRequest", - "description": "Details about the `link` request." - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`claimWebsite`\" - \"`delete`\" - \"`get`\" - \"`insert`\" - \"`link`\" - \"`update`\" ", - "type": "string" - }, - "overwrite": { - "description": "Only applicable if the method is `claimwebsite`. Indicates whether or not to take the claim from another account in case there is a conflict.", - "type": "boolean" - }, - "view": { - "description": "Controls which fields are visible. Only applicable if the method is 'get'.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequestEntryLinkRequest": { - "id": "AccountsCustomBatchRequestEntryLinkRequest", - "properties": { - "action": { - "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", - "type": "string" - }, - "linkType": { - "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" - \"`localProductManager`\" ", - "type": "string" - }, - "linkedAccountId": { - "description": "The ID of the linked account.", - "type": "string" - }, - "services": { - "description": "Provided services. Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" - \"`localProductManagement`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsCustomBatchResponse": { - "id": "AccountsCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccountsCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accounts response.", - "id": "AccountsCustomBatchResponseEntry", - "properties": { - "account": { - "$ref": "Account", - "description": "The retrieved, created, or updated account. Not defined if the method was `delete`, `claimwebsite` or `link`." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponseEntry`\"", - "type": "string" - } - }, - "type": "object" - }, - "AccountsLinkRequest": { - "id": "AccountsLinkRequest", - "properties": { - "action": { - "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", - "type": "string" - }, - "eCommercePlatformLinkInfo": { - "$ref": "ECommercePlatformLinkInfo", - "description": "Additional information required for `eCommercePlatform` link type." - }, - "linkType": { - "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" ", - "type": "string" - }, - "linkedAccountId": { - "description": "The ID of the linked account.", - "type": "string" - }, - "paymentServiceProviderLinkInfo": { - "$ref": "PaymentServiceProviderLinkInfo", - "description": "Additional information required for `paymentServiceProvider` link type." - }, - "services": { - "description": " Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsLinkResponse": { - "id": "AccountsLinkResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsLinkResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsListLinksResponse": { - "id": "AccountsListLinksResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListLinksResponse`\".", - "type": "string" - }, - "links": { - "description": "The list of available links.", - "items": { - "$ref": "LinkedAccount" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of links.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsListResponse": { - "id": "AccountsListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of accounts.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "Account" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsUpdateLabelsRequest": { - "id": "AccountsUpdateLabelsRequest", - "properties": { - "labelIds": { - "description": "The IDs of labels that should be assigned to the account.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsUpdateLabelsResponse": { - "id": "AccountsUpdateLabelsResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsUpdateLabelsResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchRequest": { - "id": "AccountstatusesCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccountstatusesCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accountstatuses request.", - "id": "AccountstatusesCustomBatchRequestEntry", - "properties": { - "accountId": { - "description": "The ID of the (sub-)account whose status to get.", - "format": "uint64", - "type": "string" - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "items": { - "type": "string" - }, - "type": "array" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchResponse": { - "id": "AccountstatusesCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccountstatusesCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accountstatuses response.", - "id": "AccountstatusesCustomBatchResponseEntry", - "properties": { - "accountStatus": { - "$ref": "AccountStatus", - "description": "The requested account status. Defined if and only if the request was successful." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - } - }, - "type": "object" - }, - "AccountstatusesListResponse": { - "id": "AccountstatusesListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of account statuses.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "AccountStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchRequest": { - "id": "AccounttaxCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccounttaxCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accounttax request.", - "id": "AccounttaxCustomBatchRequestEntry", - "properties": { - "accountId": { - "description": "The ID of the account for which to get/update account tax settings.", - "format": "uint64", - "type": "string" - }, - "accountTax": { - "$ref": "AccountTax", - "description": "The account tax settings to update. Only defined if the method is `update`." - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`update`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchResponse": { - "id": "AccounttaxCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccounttaxCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accounttax response.", - "id": "AccounttaxCustomBatchResponseEntry", - "properties": { - "accountTax": { - "$ref": "AccountTax", - "description": "The retrieved or updated account tax settings." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponseEntry`\"", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxListResponse": { - "id": "AccounttaxListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of account tax settings.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "AccountTax" - }, - "type": "array" - } - }, - "type": "object" - }, - "Action": { - "description": "An actionable step that can be executed to solve the issue.", - "id": "Action", - "properties": { - "builtinSimpleAction": { - "$ref": "BuiltInSimpleAction", - "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." - }, - "builtinUserInputAction": { - "$ref": "BuiltInUserInputAction", - "description": "Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant as specified for given action. They can trigger the action only when they provided all required inputs." - }, - "buttonLabel": { - "description": "Label of the action button.", - "type": "string" - }, - "externalAction": { - "$ref": "ExternalAction", - "description": "Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the merchant to the external location where they can perform the action." - }, - "isAvailable": { - "description": "Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons.", - "type": "boolean" - }, - "reasons": { - "description": "List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog.", - "items": { - "$ref": "ActionReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "ActionFlow": { - "description": "Flow that can be selected for an action. When merchant selects a flow, application should open a dialog with more information and input form.", - "id": "ActionFlow", - "properties": { - "dialogButtonLabel": { - "description": "Label for the button to trigger the action from the action dialog. For example: \"Request review\"", - "type": "string" - }, - "dialogCallout": { - "$ref": "Callout", - "description": "Important message to be highlighted in the request dialog. For example: \"You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review.\"" - }, - "dialogMessage": { - "$ref": "TextWithTooltip", - "description": "Message displayed in the request dialog. For example: \"Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review\". There may be an more information to be shown in a tooltip." - }, - "dialogTitle": { - "description": "Title of the request dialog. For example: \"Before you request a review\"", - "type": "string" - }, - "id": { - "description": "Not for display but need to be sent back for the selected action flow.", - "type": "string" - }, - "inputs": { - "description": "A list of input fields.", - "items": { - "$ref": "InputField" - }, - "type": "array" - }, - "label": { - "description": "Text value describing the intent for the action flow. It can be used as an input label if merchant needs to pick one of multiple flows. For example: \"I disagree with the issue\"", - "type": "string" - } - }, - "type": "object" - }, - "ActionInput": { - "description": "Input provided by the merchant.", - "id": "ActionInput", - "properties": { - "actionFlowId": { - "description": "Required. Id of the selected action flow.", - "type": "string" - }, - "inputValues": { - "description": "Required. Values for input fields.", - "items": { - "$ref": "InputValue" - }, - "type": "array" - } - }, - "type": "object" - }, - "ActionReason": { - "description": "A single reason why the action is not available.", - "id": "ActionReason", - "properties": { - "action": { - "$ref": "Action", - "description": "Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once merchant configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action." - }, - "detail": { - "description": "Detailed explanation of the reason. Should be displayed as a hint if present.", - "type": "string" - }, - "message": { - "description": "Messages summarizing the reason, why the action is not available. For example: \"Review requested on Jan 03. Review requests can take a few days to complete.\"", - "type": "string" - } - }, - "type": "object" - }, - "ActivateBuyOnGoogleProgramRequest": { - "description": "Request message for the ActivateProgram method.", - "id": "ActivateBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, - "Address": { - "id": "Address", - "properties": { - "administrativeArea": { - "description": "Required. Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "city": { - "description": "Required. City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "country": { - "description": "Required. [CLDR country code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) (for example, \"US\").", - "type": "string" - }, - "postalCode": { - "description": "Required. Postal code or ZIP (for example, \"94043\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "type": "string" - } - }, - "type": "object" - }, - "AlternateDisputeResolution": { - "description": "The Alternate Dispute Resolution (ADR) that may be available to merchants in some regions. If present, the link should be shown on the same page as the list of issues.", - "id": "AlternateDisputeResolution", - "properties": { - "label": { - "description": "The label for the alternate dispute resolution link.", - "type": "string" - }, - "uri": { - "description": "The URL pointing to a page, where merchant can request alternative dispute resolution with an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501).", - "type": "string" - } - }, - "type": "object" - }, - "Amount": { - "id": "Amount", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "[required] The pre-tax or post-tax price depending on the location of the order." - }, - "taxAmount": { - "$ref": "Price", - "description": "[required] Tax value." - } - }, - "type": "object" - }, - "AttributionSettings": { - "description": "Represents attribution settings for conversion sources receiving pre-attribution data.", - "id": "AttributionSettings", - "properties": { - "attributionLookbackWindowInDays": { - "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.", - "format": "int32", - "type": "integer" - }, - "attributionModel": { - "description": "Required. Attribution model.", - "enum": [ - "ATTRIBUTION_MODEL_UNSPECIFIED", - "CROSS_CHANNEL_LAST_CLICK", - "ADS_PREFERRED_LAST_CLICK", - "CROSS_CHANNEL_DATA_DRIVEN", - "CROSS_CHANNEL_FIRST_CLICK", - "CROSS_CHANNEL_LINEAR", - "CROSS_CHANNEL_POSITION_BASED", - "CROSS_CHANNEL_TIME_DECAY" - ], - "enumDescriptions": [ - "", - "Cross-channel Last Click model.", - "Ads-preferred Last Click model.", - "Cross-channel Data Driven model.", - "Cross-channel First Click model.", - "Cross-channel Linear model.", - "Cross-channel Position Based model.", - "Cross-channel Time Decay model." - ], - "type": "string" - }, - "conversionType": { - "description": "Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard \"purchase\" type will be automatically created if this list is empty at creation time.", - "items": { - "$ref": "AttributionSettingsConversionType" - }, - "type": "array" - } - }, - "type": "object" - }, - "AttributionSettingsConversionType": { - "description": "Message representing a types of conversion events", - "id": "AttributionSettingsConversionType", - "properties": { - "includeInReporting": { - "description": "Output only. Option indicating if the type should be included in Merchant Center reporting.", - "readOnly": true, - "type": "boolean" - }, - "name": { - "description": "Output only. Conversion event name, as it'll be reported by the client.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "BestSellers": { - "description": "Fields related to the [Best sellers reports](https://support.google.com/merchants/answer/9488679).", - "id": "BestSellers", - "properties": { - "categoryId": { - "description": "Google product category ID to calculate the ranking for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). If a `WHERE` condition on `best_sellers.category_id` is not specified in the query, rankings for all top-level categories are returned.", - "format": "int64", - "type": "string" - }, - "countryCode": { - "description": "Country where the ranking is calculated. A `WHERE` condition on `best_sellers.country_code` is required in the query.", - "type": "string" - }, - "previousRank": { - "description": "Popularity rank in the previous week or month.", - "format": "int64", - "type": "string" - }, - "previousRelativeDemand": { - "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country in the previous week or month.", - "enum": [ - "RELATIVE_DEMAND_UNSPECIFIED", - "VERY_LOW", - "LOW", - "MEDIUM", - "HIGH", - "VERY_HIGH" - ], - "enumDescriptions": [ - "Relative demand is unknown.", - "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", - "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", - "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", - "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", - "Demand is 51-100% of the demand of the highest ranked product clusters or brands." - ], - "type": "string" - }, - "rank": { - "description": "Popularity on Shopping ads and free listings, in the selected category and country, based on the estimated number of units sold.", - "format": "int64", - "type": "string" - }, - "relativeDemand": { - "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country.", - "enum": [ - "RELATIVE_DEMAND_UNSPECIFIED", - "VERY_LOW", - "LOW", - "MEDIUM", - "HIGH", - "VERY_HIGH" - ], - "enumDescriptions": [ - "Relative demand is unknown.", - "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", - "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", - "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", - "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", - "Demand is 51-100% of the demand of the highest ranked product clusters or brands." - ], - "type": "string" - }, - "relativeDemandChange": { - "description": "Change in the estimated demand. Whether it rose, sank or remained flat.", - "enum": [ - "RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED", - "SINKER", - "FLAT", - "RISER" - ], - "enumDescriptions": [ - "Relative demand change is unknown.", - "Relative demand is lower than previous time period.", - "Relative demand is equal to previous time period.", - "Relative demand is higher than the previous time period." - ], - "type": "string" - }, - "reportDate": { - "$ref": "Date", - "description": "Report date. The value of this field can only be one of the following: * The first day of the week (Monday) for weekly reports. * The first day of the month for monthly reports. If a `WHERE` condition on `best_sellers.report_date` is not specified in the query, the latest available weekly or monthly report is returned." - }, - "reportGranularity": { - "description": "Granularity of the report. The ranking can be done over a week or a month timeframe. A `WHERE` condition on `best_sellers.report_granularity` is required in the query.", - "enum": [ - "REPORT_GRANULARITY_UNSPECIFIED", - "WEEKLY", - "MONTHLY" - ], - "enumDescriptions": [ - "Report granularity is unknown.", - "Ranking is done over a week timeframe.", - "Ranking is done over a month timeframe." - ], - "type": "string" - } - }, - "type": "object" - }, - "Brand": { - "description": "Brand fields. Values are only set for fields requested explicitly in the request's search query.", - "id": "Brand", - "properties": { - "name": { - "description": "Name of the brand.", - "type": "string" - } - }, - "type": "object" - }, - "Breakdown": { - "description": "A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.", - "id": "Breakdown", - "properties": { - "details": { - "description": "Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * \"Products not showing in ads\" * \"Products not showing organically\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "regions": { - "description": "Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to merchant. If the list is too long, it is recommended to make it expandable.", - "items": { - "$ref": "BreakdownRegion" - }, - "type": "array" - } - }, - "type": "object" - }, - "BreakdownRegion": { - "description": "Region with code and localized name.", - "id": "BreakdownRegion", - "properties": { - "code": { - "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)", - "type": "string" - }, - "name": { - "description": "The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages.", - "type": "string" - } - }, - "type": "object" - }, - "BuiltInSimpleAction": { - "description": "Action that is implemented and performed in (your) third-party application. Represents various functionality that is expected to be available to merchant and will help them with resolving the issue. The application should point the merchant to the place, where they can access the corresponding functionality. If the functionality is not supported, it is recommended to explain the situation to merchant and provide them with instructions how to solve the issue.", - "id": "BuiltInSimpleAction", - "properties": { - "additionalContent": { - "$ref": "BuiltInSimpleActionAdditionalContent", - "description": "Long text from an external source that should be available to the merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`." - }, - "attributeCode": { - "description": "The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112).", - "type": "string" - }, - "type": { - "description": "The type of action that represents a functionality that is expected to be available in third-party application.", - "enum": [ - "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED", - "VERIFY_PHONE", - "CLAIM_WEBSITE", - "ADD_PRODUCTS", - "ADD_CONTACT_INFO", - "LINK_ADS_ACCOUNT", - "ADD_BUSINESS_REGISTRATION_NUMBER", - "EDIT_ITEM_ATTRIBUTE", - "FIX_ACCOUNT_ISSUE", - "SHOW_ADDITIONAL_CONTENT" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Redirect merchant to the part of your application where they can verify their phone.", - "Redirect merchant to the part of your application where they can claim their website.", - "Redirect merchant to the part of your application where they can add products.", - "Open a form where the merchant can edit their contact information.", - "Redirect merchant to the part of your application where they can link ads account.", - "Open a form where the merchant can add their business registration number.", - "Open a form where the merchant can edit an attribute. The attribute that needs to be updated is specified in attribute_code field of the action.", - "Redirect merchant from the product issues to the diagnostic page with their account issues in your application. This action will be returned only for product issues that are caused by an account issue and thus merchant should resolve the problem on the account level.", - "Show additional content to the merchant. This action will be used for example to deliver a justification from national authority." - ], - "type": "string" - } - }, - "type": "object" - }, - "BuiltInSimpleActionAdditionalContent": { - "description": "Long text from external source.", - "id": "BuiltInSimpleActionAdditionalContent", - "properties": { - "paragraphs": { - "description": "Long text organized into paragraphs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "Title of the additional content;", - "type": "string" - } - }, - "type": "object" - }, - "BuiltInUserInputAction": { - "description": "Action that is implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant. They can start the action only when they provided all required inputs. The application will request processing of the action by calling the [triggeraction method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction).", - "id": "BuiltInUserInputAction", - "properties": { - "actionContext": { - "description": "Internal details. Not for display but need to be sent back when triggering the action.", - "type": "string" - }, - "flows": { - "description": "Actions may provide multiple different flows. Merchant selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed.", - "items": { - "$ref": "ActionFlow" - }, - "type": "array" - } - }, - "type": "object" - }, - "BusinessDayConfig": { - "id": "BusinessDayConfig", - "properties": { - "businessDays": { - "description": "Regular business days, such as '\"monday\"'. May not be empty.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BuyOnGoogleProgramStatus": { - "description": "Response message for the GetProgramStatus method.", - "id": "BuyOnGoogleProgramStatus", - "properties": { - "businessModel": { - "description": "The business models in which merchant participates.", - "items": { - "enum": [ - "BUSINESS_MODEL_UNSPECIFIED", - "MANUFACTURER", - "IMPORTER", - "RESELLER", - "OTHER" - ], - "enumDescriptions": [ - "Default value when business model is not set.", - "Merchant is a manufacturer.", - "Merchant is an importer.", - "Merchant is a reseller.", - "Merchant has a different business model." - ], - "type": "string" - }, - "type": "array" - }, - "customerServicePendingEmail": { - "description": "The customer service pending email. After verification this field becomes empty.", - "type": "string" - }, - "customerServicePendingPhoneNumber": { - "description": "The pending phone number specified for BuyOnGoogle program. It might be different than account level phone number. In order to update this field the customer_service_pending_phone_region_code must also be set. After verification this field becomes empty.", - "type": "string" - }, - "customerServicePendingPhoneRegionCode": { - "description": "Two letter country code for the pending phone number, for example `CA` for Canadian numbers. See the [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) officially assigned codes. In order to update this field the customer_service_pending_phone_number must also be set. After verification this field becomes empty.", - "type": "string" - }, - "customerServiceVerifiedEmail": { - "description": "Output only. The customer service verified email.", - "readOnly": true, - "type": "string" - }, - "customerServiceVerifiedPhoneNumber": { - "description": "Output only. The verified phone number specified for BuyOnGoogle program. It might be different than account level phone number.", - "readOnly": true, - "type": "string" - }, - "customerServiceVerifiedPhoneRegionCode": { - "description": "Output only. Two letter country code for the verified phone number, for example `CA` for Canadian numbers. See the [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) officially assigned codes.", - "readOnly": true, - "type": "string" - }, - "onlineSalesChannel": { - "description": "The channels through which the merchant is selling.", - "enum": [ - "ONLINE_SALES_CHANNEL_UNSPECIFIED", - "GOOGLE_EXCLUSIVE", - "GOOGLE_AND_OTHER_WEBSITES" - ], - "enumDescriptions": [ - "Default value when online sales channel is not set.", - "Merchant is selling exclusively on Google.", - "Merchant is selling on Google and other websites." - ], - "type": "string" - }, - "participationStage": { - "description": "Output only. The current participation stage for the program.", - "enum": [ - "PROGRAM_PARTICIPATION_STAGE_UNSPECIFIED", - "NOT_ELIGIBLE", - "ELIGIBLE", - "ONBOARDING", - "ELIGIBLE_FOR_REVIEW", - "PENDING_REVIEW", - "REVIEW_DISAPPROVED", - "ACTIVE", - "PAUSED", - "DEPRECATED" - ], - "enumDescriptions": [ - "Default value when participation stage is not set.", - "Merchant is not eligible for onboarding to a given program in a specific region code.", - "Merchant is eligible for onboarding to a given program in a specific region code.", - "Merchant is onboarding to a given program in a specific region code.", - "Merchant fulfilled all the requirements and is ready to request review in a specific region code.", - "Merchant is waiting for the review to be completed in a specific region code.", - "The review for a merchant has been rejected in a specific region code.", - "Merchant's program participation is active for a specific region code.", - "Participation has been paused.", - "The program cannot be further reactivated or paused. See more about [Buy on Google](https://support.google.com/merchants/answer/7679273)." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Callout": { - "description": "An important message that should be highlighted. Usually displayed as a banner.", - "id": "Callout", - "properties": { - "fullMessage": { - "$ref": "TextWithTooltip", - "description": "A full message that needs to be shown to the merchant." - }, - "styleHint": { - "description": "Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to merchants.", - "enum": [ - "CALLOUT_STYLE_HINT_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "The most important type of information highlighting problems, like an unsuccessful outcome of previously requested actions.", - "Information warning about pending problems, risks or deadlines.", - "Default severity for important information like pending status of previously requested action or cooldown for re-review." - ], - "type": "string" - } - }, - "type": "object" - }, - "CaptureOrderRequest": { - "description": "Request message for the CaptureOrder method.", - "id": "CaptureOrderRequest", - "properties": {}, - "type": "object" - }, - "CaptureOrderResponse": { - "description": "Response message for the CaptureOrder method.", - "id": "CaptureOrderResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Only defined if the request was successful. Acceptable values are: * \"duplicate\" * \"executed\"", - "enum": [ - "EXECUTION_STATUS_UNSPECIFIED", - "EXECUTED", - "DUPLICATE" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "The request was completed successfully.", - "The request was not performed because it already executed once successfully." - ], - "type": "string" - } - }, - "type": "object" - }, - "CarrierRate": { - "id": "CarrierRate", - "properties": { - "carrierName": { - "description": "Carrier service, such as `\"UPS\"` or `\"Fedex\"`. The list of supported carriers can be retrieved through the `getSupportedCarriers` method. Required.", - "type": "string" - }, - "carrierService": { - "description": "Carrier service, such as `\"ground\"` or `\"2 days\"`. The list of supported services for a carrier can be retrieved through the `getSupportedCarriers` method. Required.", - "type": "string" - }, - "flatAdjustment": { - "$ref": "Price", - "description": "Additive shipping rate modifier. Can be negative. For example `{ \"value\": \"1\", \"currency\" : \"USD\" }` adds $1 to the rate, `{ \"value\": \"-3\", \"currency\" : \"USD\" }` removes $3 from the rate. Optional." - }, - "name": { - "description": "Name of the carrier rate. Must be unique per rate group. Required.", - "type": "string" - }, - "originPostalCode": { - "description": "Shipping origin for this carrier rate. Required.", - "type": "string" - }, - "percentageAdjustment": { - "description": "Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%, `\"-3\"` decreases the rate by 3%. Optional.", - "type": "string" - } - }, - "type": "object" - }, - "CarriersCarrier": { - "id": "CarriersCarrier", - "properties": { - "country": { - "description": "The CLDR country code of the carrier (for example, \"US\"). Always present.", - "type": "string" - }, - "eddServices": { - "description": "A list of services supported for EDD (Estimated Delivery Date) calculation. This is the list of valid values for WarehouseBasedDeliveryTime.carrierService.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the carrier (for example, `\"UPS\"`). Always present.", - "type": "string" - }, - "services": { - "description": "A list of supported services (for example, `\"ground\"`) for that carrier. Contains at least one service. This is the list of valid values for CarrierRate.carrierService.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CheckoutSettings": { - "description": "`CheckoutSettings` for a specific merchant ID.", - "id": "CheckoutSettings", - "properties": { - "effectiveEnrollmentState": { - "description": "Output only. The effective value of enrollment state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", - "enum": [ - "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", - "INACTIVE", - "ENROLLED", - "OPT_OUT" - ], - "enumDescriptions": [ - "Default enrollment state when enrollment state is not specified.", - "Merchant has not enrolled into the feature.", - "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", - "Merchant has previously enrolled but opted out of the feature." - ], - "readOnly": true, - "type": "string" - }, - "effectiveReviewState": { - "description": "Output only. The effective value of review state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", - "enum": [ - "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", - "IN_REVIEW", - "APPROVED", - "DISAPPROVED" - ], - "enumDescriptions": [ - "Default review state when review state is not specified.", - "Merchant provided URLs are being reviewed for data quality issues.", - "Merchant account has been approved. Indicates the data quality checks have passed.", - "Merchant account has been disapproved due to data quality issues." - ], - "readOnly": true, - "type": "string" - }, - "effectiveUriSettings": { - "$ref": "UrlSettings", - "description": "The effective value of `url_settings` for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account." - }, - "enrollmentState": { - "description": "Output only. Reflects the merchant enrollment state in `Checkout` feature.", - "enum": [ - "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", - "INACTIVE", - "ENROLLED", - "OPT_OUT" - ], - "enumDescriptions": [ - "Default enrollment state when enrollment state is not specified.", - "Merchant has not enrolled into the feature.", - "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", - "Merchant has previously enrolled but opted out of the feature." - ], - "readOnly": true, - "type": "string" - }, - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "type": "string" - }, - "reviewState": { - "description": "Output only. Reflects the merchant review state in `Checkout` feature. This is set based on the data quality reviews of the URL provided by the merchant. A merchant with enrollment state as `ENROLLED` can be in the following review states: `IN_REVIEW`, `APPROVED` or `DISAPPROVED`. A merchant must be in an enrollment_state of `ENROLLED` before a review can begin for the merchant.", - "enum": [ - "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", - "IN_REVIEW", - "APPROVED", - "DISAPPROVED" - ], - "enumDescriptions": [ - "Default review state when review state is not specified.", - "Merchant provided URLs are being reviewed for data quality issues.", - "Merchant account has been approved. Indicates the data quality checks have passed.", - "Merchant account has been disapproved due to data quality issues." - ], - "readOnly": true, - "type": "string" - }, - "uriSettings": { - "$ref": "UrlSettings", - "description": "URL settings for cart or checkout URL." - } - }, - "type": "object" - }, - "CloudExportAdditionalProperties": { - "description": "Product property for the Cloud Retail API. For example, properties for a TV product could be \"Screen-Resolution\" or \"Screen-Size\".", - "id": "CloudExportAdditionalProperties", - "properties": { - "boolValue": { - "description": "Boolean value of the given property. For example for a TV product, \"True\" or \"False\" if the screen is UHD.", - "type": "boolean" - }, - "floatValue": { - "description": "Float values of the given property. For example for a TV product 1.2345. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", - "items": { - "format": "float", - "type": "number" - }, - "type": "array" - }, - "intValue": { - "description": "Integer values of the given property. For example, 1080 for a screen resolution of a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "maxValue": { - "description": "Maximum float value of the given property. For example for a TV product 100.00.", - "format": "float", - "type": "number" - }, - "minValue": { - "description": "Minimum float value of the given property. For example for a TV product 1.00.", - "format": "float", - "type": "number" - }, - "propertyName": { - "description": "Name of the given property. For example, \"Screen-Resolution\" for a TV product. Maximum string size is 256 characters.", - "type": "string" - }, - "textValue": { - "description": "Text value of the given property. For example, \"8K(UHD)\" could be a text value for a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order. Maximum string size is 256 characters.", - "items": { - "type": "string" - }, - "type": "array" - }, - "unitCode": { - "description": "Unit of the given property. For example, \"Pixels\" for a TV product. Maximum string size is 256 bytes.", - "type": "string" - } - }, - "type": "object" - }, - "Collection": { - "description": "The collection message.", - "id": "Collection", - "properties": { - "customLabel0": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns. [Custom label](https://support.google.com/merchants/answer/9674217)", - "type": "string" - }, - "customLabel1": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel2": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel3": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel4": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "featuredProduct": { - "description": "This identifies one or more products associated with the collection. Used as a lookup to the corresponding product ID in your product feeds. Provide a maximum of 100 featuredProduct (for collections). Provide up to 10 featuredProduct (for Shoppable Images only) with ID and X and Y coordinates. [featured_product attribute](https://support.google.com/merchants/answer/9703736)", - "items": { - "$ref": "CollectionFeaturedProduct" - }, - "type": "array" - }, - "headline": { - "description": "Your collection's name. [headline attribute](https://support.google.com/merchants/answer/9673580)", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Required. The REST ID of the collection. Content API methods that operate on collections take this as their collectionId parameter. The REST ID for a collection is of the form collectionId. [id attribute](https://support.google.com/merchants/answer/9649290)", - "type": "string" - }, - "imageLink": { - "description": "The URL of a collection’s image. [image_link attribute](https://support.google.com/merchants/answer/9703236)", - "items": { - "type": "string" - }, - "type": "array" - }, - "language": { - "description": "The language of a collection and the language of any featured products linked to the collection. [language attribute](https://support.google.com/merchants/answer/9673781)", - "type": "string" - }, - "link": { - "description": "A collection’s landing page. URL directly linking to your collection's page on your website. [link attribute](https://support.google.com/merchants/answer/9673983)", - "type": "string" - }, - "mobileLink": { - "description": "A collection’s mobile-optimized landing page when you have a different URL for mobile and desktop traffic. [mobile_link attribute](https://support.google.com/merchants/answer/9646123)", - "type": "string" - }, - "productCountry": { - "description": "[product_country attribute](https://support.google.com/merchants/answer/9674155)", - "type": "string" - } - }, - "type": "object" - }, - "CollectionFeaturedProduct": { - "description": "The message for FeaturedProduct. [FeaturedProduct](https://support.google.com/merchants/answer/9703736)", - "id": "CollectionFeaturedProduct", - "properties": { - "offerId": { - "description": "The unique identifier for the product item.", - "type": "string" - }, - "x": { - "description": "Required. X-coordinate of the product callout on the Shoppable Image.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Required. Y-coordinate of the product callout on the Shoppable Image.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CollectionStatus": { - "description": "The collectionstatus message.", - "id": "CollectionStatus", - "properties": { - "collectionLevelIssuses": { - "description": "A list of all issues associated with the collection.", - "items": { - "$ref": "CollectionStatusItemLevelIssue" - }, - "type": "array" - }, - "creationDate": { - "description": "Date on which the collection has been created in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", - "type": "string" - }, - "destinationStatuses": { - "description": "The intended destinations for the collection.", - "items": { - "$ref": "CollectionStatusDestinationStatus" - }, - "type": "array" - }, - "id": { - "description": "Required. The ID of the collection for which status is reported.", - "type": "string" - }, - "lastUpdateDate": { - "description": "Date on which the collection has been last updated in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", - "type": "string" - } - }, - "type": "object" - }, - "CollectionStatusDestinationStatus": { - "description": "Destination status message.", - "id": "CollectionStatusDestinationStatus", - "properties": { - "approvedCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is approved.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destination": { - "description": "The name of the destination", - "type": "string" - }, - "disapprovedCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is disapproved.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pendingCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is pending approval.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "The status for the specified destination in the collections target country.", - "type": "string" - } - }, - "type": "object" - }, - "CollectionStatusItemLevelIssue": { - "description": "Issue associated with the collection.", - "id": "CollectionStatusItemLevelIssue", - "properties": { - "applicableCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where issue applies to the offer.", - "items": { - "type": "string" - }, - "type": "array" - }, - "attributeName": { - "description": "The attribute's name, if the issue is caused by a single attribute.", - "type": "string" - }, - "code": { - "description": "The error code of the issue.", - "type": "string" - }, - "description": { - "description": "A short issue description in English.", - "type": "string" - }, - "destination": { - "description": "The destination the issue applies to.", - "type": "string" - }, - "detail": { - "description": "A detailed issue description in English.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help with resolving this issue.", - "type": "string" - }, - "resolution": { - "description": "Whether the issue can be resolved by the merchant.", - "type": "string" - }, - "servability": { - "description": "How this issue affects the serving of the collection.", - "type": "string" - } - }, - "type": "object" - }, - "CompetitiveVisibility": { - "description": "Fields related to [competitive visibility reports] (https://support.google.com/merchants/answer/11366442).", - "id": "CompetitiveVisibility", - "properties": { - "adsOrganicRatio": { - "description": "[Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#zippy=%2Cadsfree-ratio) shows how often a merchant receives impressions from Shopping ads compared to organic traffic. The number is rounded and bucketed. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "categoryBenchmarkVisibilityTrend": { - "description": "Change in visibility based on impressions with respect to the start of the selected time range (or first day with non-zero impressions) for a combined set of merchants with highest visibility approximating the market. Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "categoryId": { - "description": "Google product category ID to calculate the report for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.category_id` is required in the query.", - "format": "int64", - "type": "string" - }, - "countryCode": { - "description": "The country where impression appeared. Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.country_code` is required in the query.", - "type": "string" - }, - "date": { - "$ref": "Date", - "description": "Date of this row. Available only in `CompetitiveVisibilityBenchmarkView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityMarketBenchmarkView`." - }, - "domain": { - "description": "Domain of your competitor or your domain, if 'is_your_domain' is true. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "type": "string" - }, - "higherPositionRate": { - "description": "Higher position rate shows how often a competitor’s offer got placed in a higher position on the page than your offer. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "isYourDomain": { - "description": "True if this row contains data for your domain. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "type": "boolean" - }, - "pageOverlapRate": { - "description": "Page overlap rate describes how frequently competing retailers’ offers are shown together with your offers on the same page. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "rank": { - "description": "Position of the domain in the top merchants ranking for the selected keys (`date`, `category_id`, `country_code`, `listing_type`) based on impressions. 1 is the highest. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "uint64", - "type": "string" - }, - "relativeVisibility": { - "description": "Relative visibility shows how often your competitors’ offers are shown compared to your offers. In other words, this is the number of displayed impressions of a competitor retailer divided by the number of your displayed impressions during a selected time range for a selected product category and country. Available only in `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "trafficSource": { - "description": "Type of impression listing. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.", - "enum": [ - "UNKNOWN", - "ORGANIC", - "ADS", - "ALL" - ], - "enumDescriptions": [ - "Traffic source is unknown.", - "Organic traffic.", - "Traffic from Ads.", - "Organic and Ads traffic." - ], - "type": "string" - }, - "yourDomainVisibilityTrend": { - "description": "Change in visibility based on impressions for your domain with respect to the start of the selected time range (or first day with non-zero impressions). Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ConversionSource": { - "description": "Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.", - "id": "ConversionSource", - "properties": { - "conversionSourceId": { - "description": "Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.", - "readOnly": true, - "type": "string" - }, - "expireTime": { - "description": "Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "googleAnalyticsLink": { - "$ref": "GoogleAnalyticsLink", - "description": "Immutable. Conversion Source of type \"Link to Google Analytics Property\"." - }, - "merchantCenterDestination": { - "$ref": "MerchantCenterDestination", - "description": "Conversion Source of type \"Merchant Center Tag Destination\"." - }, - "state": { - "description": "Output only. Current state of this conversion source. Can't be edited through the API.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PENDING" - ], - "enumDescriptions": [ - "", - "Conversion source is fully functional.", - "Conversion source has been archived in the last 30 days and not currently functional. Can be restored using the undelete method.", - "Conversion source creation has started but not fully finished yet." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Css": { - "description": "Information about CSS domain.", - "id": "Css", - "properties": { - "cssDomainId": { - "description": "Output only. Immutable. The CSS domain ID.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "cssGroupId": { - "description": "Output only. Immutable. The ID of the CSS group this CSS domain is affiliated with. Only populated for CSS group users.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Output only. Immutable. The CSS domain's display name, used when space is constrained.", - "readOnly": true, - "type": "string" - }, - "fullName": { - "description": "Output only. Immutable. The CSS domain's full name.", - "readOnly": true, - "type": "string" - }, - "homepageUri": { - "description": "Output only. Immutable. The CSS domain's homepage.", - "readOnly": true, - "type": "string" - }, - "labelIds": { - "description": "A list of label IDs that are assigned to this CSS domain by its CSS group. Only populated for CSS group users.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CustomAttribute": { - "description": "A message that represents custom attributes. Exactly one of `value` or `groupValues` must be provided. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per merchant, with total size of 102.4kB.", - "id": "CustomAttribute", - "properties": { - "groupValues": { - "description": "Subattributes within this attribute group. Exactly one of value or groupValues must be provided.", - "items": { - "$ref": "CustomAttribute" - }, - "type": "array" - }, - "name": { - "description": "The name of the attribute. Underscores will be replaced by spaces upon insertion.", - "type": "string" - }, - "value": { - "description": "The value of the attribute.", - "type": "string" - } - }, - "type": "object" - }, - "CustomerReturnReason": { - "id": "CustomerReturnReason", - "properties": { - "description": { - "description": "Description of the reason.", - "type": "string" - }, - "reasonCode": { - "description": "Code of the return reason. Acceptable values are: - \"`betterPriceFound`\" - \"`changedMind`\" - \"`damagedOrDefectiveItem`\" - \"`didNotMatchDescription`\" - \"`doesNotFit`\" - \"`expiredItem`\" - \"`incorrectItemReceived`\" - \"`noLongerNeeded`\" - \"`notSpecified`\" - \"`orderedWrongItem`\" - \"`other`\" - \"`qualityNotExpected`\" - \"`receivedTooLate`\" - \"`undeliverable`\" ", - "type": "string" - } - }, - "type": "object" - }, - "CutoffTime": { - "id": "CutoffTime", - "properties": { - "hour": { - "description": "Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.", - "format": "uint32", - "type": "integer" - }, - "minute": { - "description": "Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.", - "format": "uint32", - "type": "integer" - }, - "timezone": { - "description": "Timezone identifier for the cutoff time (for example, \"Europe/Zurich\"). List of identifiers. Required.", - "type": "string" - } - }, - "type": "object" - }, - "Datafeed": { - "description": "Datafeed configuration data.", - "id": "Datafeed", - "properties": { - "attributeLanguage": { - "description": "The two-letter ISO 639-1 language in which the attributes are defined in the data feed.", - "type": "string" - }, - "contentType": { - "description": "Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. Acceptable values are: - \"`local products`\" - \"`product inventory`\" - \"`products`\" ", - "type": "string" - }, - "fetchSchedule": { - "$ref": "DatafeedFetchSchedule", - "description": "Fetch schedule for the feed file." - }, - "fileName": { - "description": "Required. The filename of the feed. All feeds must have a unique file name.", - "type": "string" - }, - "format": { - "$ref": "DatafeedFormat", - "description": "Format of the feed file." - }, - "id": { - "description": "Required for update. The ID of the data feed.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeed`\"", - "type": "string" - }, - "name": { - "description": "Required for insert. A descriptive name of the data feed.", - "type": "string" - }, - "targets": { - "description": "The targets this feed should apply to (country, language, destinations).", - "items": { - "$ref": "DatafeedTarget" - }, - "type": "array" - } - }, - "type": "object" - }, - "DatafeedFetchSchedule": { - "description": "The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.", - "id": "DatafeedFetchSchedule", - "properties": { - "dayOfMonth": { - "description": "The day of the month the feed file should be fetched (1-31).", - "format": "uint32", - "type": "integer" - }, - "fetchUrl": { - "description": "The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.", - "type": "string" - }, - "hour": { - "description": "The hour of the day the feed file should be fetched (0-23).", - "format": "uint32", - "type": "integer" - }, - "minuteOfHour": { - "description": "The minute of the hour the feed file should be fetched (0-59). Read-only.", - "format": "uint32", - "type": "integer" - }, - "password": { - "description": "An optional password for fetch_url.", - "type": "string" - }, - "paused": { - "description": "Whether the scheduled fetch is paused or not.", - "type": "boolean" - }, - "timeZone": { - "description": "Time zone used for schedule. UTC by default. For example, \"America/Los_Angeles\".", - "type": "string" - }, - "username": { - "description": "An optional user name for fetch_url.", - "type": "string" - }, - "weekday": { - "description": "The day of the week the feed file should be fetched. Acceptable values are: - \"`monday`\" - \"`tuesday`\" - \"`wednesday`\" - \"`thursday`\" - \"`friday`\" - \"`saturday`\" - \"`sunday`\" ", - "type": "string" - } - }, - "type": "object" - }, - "DatafeedFormat": { - "id": "DatafeedFormat", - "properties": { - "columnDelimiter": { - "description": "Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`pipe`\" - \"`tab`\" - \"`tilde`\" ", - "type": "string" - }, - "fileEncoding": { - "description": "Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. Acceptable values are: - \"`latin-1`\" - \"`utf-16be`\" - \"`utf-16le`\" - \"`utf-8`\" - \"`windows-1252`\" ", - "type": "string" - }, - "quotingMode": { - "description": "Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`normal character`\" - \"`value quoting`\" ", - "type": "string" - } - }, - "type": "object" - }, - "DatafeedStatus": { - "description": "The status of a datafeed, that is, the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.", - "id": "DatafeedStatus", - "properties": { - "country": { - "description": "The country for which the status is reported, represented as a CLDR territory code.", - "type": "string" - }, - "datafeedId": { - "description": "The ID of the feed for which the status is reported.", - "format": "uint64", - "type": "string" - }, - "errors": { - "description": "The list of errors occurring in the feed.", - "items": { - "$ref": "DatafeedStatusError" - }, - "type": "array" - }, - "feedLabel": { - "description": "The feed label status is reported for.", - "type": "string" - }, - "itemsTotal": { - "description": "The number of items in the feed that were processed.", - "format": "uint64", - "type": "string" - }, - "itemsValid": { - "description": "The number of items in the feed that were valid.", - "format": "uint64", + "AccountAddress": { + "id": "AccountAddress", + "properties": { + "country": { + "description": "CLDR country code (for example, \"US\"). All MCA sub-accounts inherit the country of their parent MCA by default, however the country can be updated for individual sub-accounts.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedStatus`\"", + "locality": { + "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", "type": "string" }, - "language": { - "description": "The two-letter ISO 639-1 language for which the status is reported.", + "postalCode": { + "description": "Postal code or ZIP (for example, \"94043\").", "type": "string" }, - "lastUploadDate": { - "description": "The last date at which the feed was uploaded.", + "region": { + "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", "type": "string" }, - "processingStatus": { - "description": "The processing status of the feed. Acceptable values are: - \"`\"`failure`\": The feed could not be processed or all items had errors.`\" - \"`in progress`\": The feed is being processed. - \"`none`\": The feed has not yet been processed. For example, a feed that has never been uploaded will have this processing status. - \"`success`\": The feed was processed successfully, though some items might have had errors. ", + "streetAddress": { + "description": "Street-level part of the address. Use `\\n` to add a second line.", "type": "string" - }, - "warnings": { - "description": "The list of errors occurring in the feed.", - "items": { - "$ref": "DatafeedStatusError" - }, - "type": "array" } }, "type": "object" }, - "DatafeedStatusError": { - "description": "An error occurring in the feed, like \"invalid price\".", - "id": "DatafeedStatusError", + "AccountAdsLink": { + "id": "AccountAdsLink", "properties": { - "code": { - "description": "The code of the error, for example, \"validation/invalid_value\".", + "adsId": { + "description": "Customer ID of the Ads account.", + "format": "uint64", "type": "string" }, - "count": { - "description": "The number of occurrences of the error in the feed.", - "format": "uint64", + "status": { + "description": "Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in Google Ads or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending. Acceptable values are: - \"`active`\" - \"`pending`\" ", "type": "string" + } + }, + "type": "object" + }, + "AccountAutomaticImprovements": { + "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping.", + "id": "AccountAutomaticImprovements", + "properties": { + "imageImprovements": { + "$ref": "AccountImageImprovements", + "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973) This field is only updated (cleared) if provided." }, - "examples": { - "description": "A list of example occurrences of the error, grouped by product.", - "items": { - "$ref": "DatafeedStatusExample" - }, - "type": "array" + "itemUpdates": { + "$ref": "AccountItemUpdates", + "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown. This field is only updated (cleared) if provided." }, - "message": { - "description": "The error message, for example, \"Invalid price\".", - "type": "string" + "shippingImprovements": { + "$ref": "AccountShippingImprovements", + "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: - Delivery address of an order - Current handling time and shipping time settings - Estimated weekdays or business days - Parcel tracking data This field is only updated (cleared) if provided." } }, "type": "object" }, - "DatafeedStatusExample": { - "description": "An example occurrence for a particular error.", - "id": "DatafeedStatusExample", + "AccountBusinessIdentity": { + "description": "The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business.", + "id": "AccountBusinessIdentity", "properties": { - "itemId": { - "description": "The ID of the example item.", - "type": "string" + "blackOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." }, - "lineNumber": { - "description": "Line number in the data feed where the example is found.", - "format": "uint64", - "type": "string" + "includeForPromotions": { + "description": "Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.", + "type": "boolean" }, - "value": { - "description": "The problematic value.", - "type": "string" + "latinoOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "smallBusiness": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to \"US\". It is also not allowed for marketplaces, but it is allowed to marketplace sellers." + }, + "veteranOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "womenOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." } }, "type": "object" }, - "DatafeedTarget": { - "id": "DatafeedTarget", + "AccountBusinessInformation": { + "id": "AccountBusinessInformation", "properties": { - "country": { - "description": "Deprecated. Use `feedLabel` instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.", - "type": "string" + "address": { + "$ref": "AccountAddress", + "description": "The address of the business. Use `\\n` to add a second address line." }, - "excludedDestinations": { - "description": "The list of [destinations to exclude](//support.google.com/merchants/answer/6324486) for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted.", - "items": { - "type": "string" - }, - "type": "array" + "customerService": { + "$ref": "AccountCustomerService", + "description": "The customer service information of the business." }, - "feedLabel": { - "description": "Feed label for the DatafeedTarget. Either `country` or `feedLabel` is required. If both `feedLabel` and `country` is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).", + "koreanBusinessRegistrationNumber": { + "description": "The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX. This field will only be updated if explicitly set.", "type": "string" }, - "includedDestinations": { - "description": "The list of [destinations to include](//support.google.com/merchants/answer/7501026) for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "language": { - "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targets[].country`.", + "phoneNumber": { + "description": "The phone number of the business in [E.164](https://en.wikipedia.org/wiki/E.164) format. This can only be updated if a verified phone number is not already set. To replace a verified phone number use the `Accounts.requestphoneverification` and `Accounts.verifyphonenumber`.", "type": "string" }, - "targetCountries": { - "description": "The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for \"product inventory\" feeds.", - "items": { - "type": "string" - }, - "type": "array" + "phoneVerificationStatus": { + "description": "Verification status of the phone number of the business. This status is read only and can be updated only by successful phone verification. Acceptable values are: - \"`verified`\" - \"`unverified`\" ", + "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchRequest": { - "id": "DatafeedsCustomBatchRequest", + "AccountConversionSettings": { + "description": "Settings for conversion tracking.", + "id": "AccountConversionSettings", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "DatafeedsCustomBatchRequestEntry" - }, - "type": "array" + "freeListingsAutoTaggingEnabled": { + "description": "When enabled, free listing URLs have a parameter to enable conversion tracking for products owned by the current merchant account. See [auto-tagging](https://support.google.com/merchants/answer/11127659).", + "type": "boolean" } }, "type": "object" }, - "DatafeedsCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch datafeeds request.", - "id": "DatafeedsCustomBatchRequestEntry", + "AccountCredentials": { + "description": "Credentials allowing Google to call a partner's API on behalf of a merchant.", + "id": "AccountCredentials", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" + "accessToken": { + "description": "An OAuth access token.", + "type": "string" }, - "datafeed": { - "$ref": "Datafeed", - "description": "The data feed to insert." + "expiresIn": { + "description": "The amount of time, in seconds, after which the access token is no longer valid.", + "format": "int64", + "type": "string" }, - "datafeedId": { - "description": "The ID of the data feed to get, delete or fetch.", - "format": "uint64", + "purpose": { + "description": "Indicates to Google how Google should use these OAuth tokens.", + "enum": [ + "ACCOUNT_CREDENTIALS_PURPOSE_UNSPECIFIED", + "SHOPIFY_ORDER_MANAGEMENT", + "SHOPIFY_INTEGRATION" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "Unknown purpose.", + "The credentials allow Google to manage Shopify orders on behalf of the merchant (deprecated).", + "The credentials allow Google to manage Shopify integration on behalf of the merchant." + ], + "type": "string" + } + }, + "type": "object" + }, + "AccountCustomerService": { + "id": "AccountCustomerService", + "properties": { + "email": { + "description": "Customer service email.", "type": "string" }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "phoneNumber": { + "description": "Customer service phone number.", "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`delete`\" - \"`fetchNow`\" - \"`get`\" - \"`insert`\" - \"`update`\" ", + "url": { + "description": "Customer service URL.", "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchResponse": { - "id": "DatafeedsCustomBatchResponse", + "AccountGoogleMyBusinessLink": { + "id": "AccountGoogleMyBusinessLink", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "DatafeedsCustomBatchResponseEntry" - }, - "type": "array" + "gmbAccountId": { + "description": "The ID of the Business Profile. If this is provided, then `gmbEmail` is ignored. The value of this field should match the `accountId` used by the Business Profile API.", + "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsCustomBatchResponse`\".", + "gmbEmail": { + "description": "The Business Profile email address of a specific account within a Business Profile. A sample account within a Business Profile could be a business account with set of locations, managed under the Business Profile.", + "type": "string" + }, + "status": { + "description": "Status of the link between this Merchant Center account and the Business Profile. Acceptable values are: - \"`active`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch datafeeds response.", - "id": "DatafeedsCustomBatchResponseEntry", + "AccountIdentifier": { + "id": "AccountIdentifier", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "datafeed": { - "$ref": "Datafeed", - "description": "The requested data feed. Defined if and only if the request was successful." + "aggregatorId": { + "description": "The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).", + "format": "uint64", + "type": "string" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + "merchantId": { + "description": "The merchant account ID, set for individual accounts and subaccounts.", + "format": "uint64", + "type": "string" } }, "type": "object" }, - "DatafeedsFetchNowResponse": { - "id": "DatafeedsFetchNowResponse", + "AccountIdentityType": { + "description": "The account identity type used to specify attributes.", + "id": "AccountIdentityType", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsFetchNowResponse`\".", - "type": "string" + "selfIdentified": { + "description": "Optional. Indicates that the business identifies itself with a given identity type. Setting this field does not automatically mean eligibility for promotions.", + "type": "boolean" } }, "type": "object" }, - "DatafeedsListResponse": { - "id": "DatafeedsListResponse", + "AccountImageImprovements": { + "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973)", + "id": "AccountImageImprovements", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of datafeeds.", - "type": "string" + "accountImageImprovementsSettings": { + "$ref": "AccountImageImprovementsSettings", + "description": "Determines how the images should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." }, - "resources": { - "items": { - "$ref": "Datafeed" - }, - "type": "array" + "effectiveAllowAutomaticImageImprovements": { + "description": "Output only. The effective value of allow_automatic_image_improvements. If account_image_improvements_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" } }, "type": "object" }, - "DatafeedstatusesCustomBatchRequest": { - "id": "DatafeedstatusesCustomBatchRequest", + "AccountImageImprovementsSettings": { + "description": "Settings for the Automatic Image Improvements.", + "id": "AccountImageImprovementsSettings", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "DatafeedstatusesCustomBatchRequestEntry" - }, - "type": "array" + "allowAutomaticImageImprovements": { + "description": "Enables automatic image improvements.", + "type": "boolean" } }, "type": "object" }, - "DatafeedstatusesCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch datafeedstatuses request.", - "id": "DatafeedstatusesCustomBatchRequestEntry", + "AccountIssue": { + "description": "An issue affecting specific merchant.", + "id": "AccountIssue", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "country": { - "description": "Deprecated. Use `feedLabel` instead. The country to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" - }, - "datafeedId": { - "description": "The ID of the data feed to get.", - "format": "uint64", - "type": "string" - }, - "feedLabel": { - "description": "The feed label to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" + "actions": { + "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", + "items": { + "$ref": "Action" + }, + "type": "array" }, - "language": { - "description": "The language to get the datafeed status for. If this parameter is provided then `country` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" + "impact": { + "$ref": "AccountIssueImpact", + "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "prerenderedContent": { + "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", + "title": { + "description": "Title of the issue.", "type": "string" } }, "type": "object" }, - "DatafeedstatusesCustomBatchResponse": { - "id": "DatafeedstatusesCustomBatchResponse", + "AccountIssueImpact": { + "description": "Overall impact of the issue.", + "id": "AccountIssueImpact", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", + "breakdowns": { + "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", "items": { - "$ref": "DatafeedstatusesCustomBatchResponseEntry" + "$ref": "Breakdown" }, "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesCustomBatchResponse`\".", + "message": { + "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Disapproves 90k offers in 25 countries\"", + "type": "string" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", + "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", + "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." + ], "type": "string" } }, "type": "object" }, - "DatafeedstatusesCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch datafeedstatuses response.", - "id": "DatafeedstatusesCustomBatchResponseEntry", + "AccountItemUpdates": { + "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown.", + "id": "AccountItemUpdates", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" + "accountItemUpdatesSettings": { + "$ref": "AccountItemUpdatesSettings", + "description": "Determines which attributes of the items should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." }, - "datafeedStatus": { - "$ref": "DatafeedStatus", - "description": "The requested data feed status. Defined if and only if the request was successful." + "effectiveAllowAvailabilityUpdates": { + "description": "Output only. The effective value of allow_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - } - }, - "type": "object" - }, - "DatafeedstatusesListResponse": { - "id": "DatafeedstatusesListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesListResponse`\".", - "type": "string" + "effectiveAllowConditionUpdates": { + "description": "Output only. The effective value of allow_condition_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of datafeed statuses.", - "type": "string" + "effectiveAllowPriceUpdates": { + "description": "Output only. The effective value of allow_price_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "resources": { - "items": { - "$ref": "DatafeedStatus" - }, - "type": "array" + "effectiveAllowStrictAvailabilityUpdates": { + "description": "Output only. The effective value of allow_strict_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" } }, "type": "object" }, - "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", - "id": "Date", + "AccountItemUpdatesSettings": { + "description": "Settings for the Automatic Item Updates.", + "id": "AccountItemUpdatesSettings", "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", - "format": "int32", - "type": "integer" + "allowAvailabilityUpdates": { + "description": "If availability updates are enabled, any previous availability values get overwritten if Google finds an out-of-stock annotation on the offer's page. If additionally `allow_availability_updates` field is set to true, values get overwritten if Google finds an in-stock annotation on the offer’s page.", + "type": "boolean" }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", - "format": "int32", - "type": "integer" + "allowConditionUpdates": { + "description": "If condition updates are enabled, Google always updates item condition with the condition detected from the details of your product.", + "type": "boolean" }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", - "format": "int32", - "type": "integer" + "allowPriceUpdates": { + "description": "If price updates are enabled, Google always updates the active price with the crawled information.", + "type": "boolean" + }, + "allowStrictAvailabilityUpdates": { + "description": "If allow_availability_updates is enabled, items are automatically updated in all your Shopping target countries. By default, availability updates will only be applied to items that are 'out of stock' on your website but 'in stock' on Shopping. Set this to true to also update items that are 'in stock' on your website, but 'out of stock' on Google Shopping. In order for this field to have an effect, you must also allow availability updates.", + "type": "boolean" } }, "type": "object" }, - "DateTime": { - "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", - "id": "DateTime", + "AccountLabel": { + "description": "Label assigned by CSS domain or CSS group to one of its sub-accounts.", + "id": "AccountLabel", "properties": { - "day": { - "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", - "format": "int32", - "type": "integer" - }, - "hours": { - "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32", - "type": "integer" - }, - "minutes": { - "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", - "format": "int32", - "type": "integer" - }, - "nanos": { - "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32", - "type": "integer" + "accountId": { + "description": "Immutable. The ID of account this label belongs to.", + "format": "int64", + "type": "string" }, - "timeZone": { - "$ref": "TimeZone", - "description": "Time zone." + "description": { + "description": "The description of this label.", + "type": "string" }, - "utcOffset": { - "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", - "format": "google-duration", + "labelId": { + "description": "Output only. The ID of the label.", + "format": "int64", + "readOnly": true, "type": "string" }, - "year": { - "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", - "format": "int32", - "type": "integer" + "labelType": { + "description": "Output only. The type of this label.", + "enum": [ + "LABEL_TYPE_UNSPECIFIED", + "MANUAL", + "AUTOMATIC" + ], + "enumDescriptions": [ + "Unknown label type.", + "Indicates that the label was created manually.", + "Indicates that the label was created automatically by CSS Center." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The display name of this label.", + "type": "string" } }, "type": "object" }, - "DeliveryArea": { - "description": "A delivery area for the product. Only one of `countryCode` or `postalCodeRange` must be set.", - "id": "DeliveryArea", + "AccountReturnCarrier": { + "description": " The return carrier information. This service is designed for merchants enrolled in the Buy on Google program. ", + "id": "AccountReturnCarrier", "properties": { - "countryCode": { - "description": "Required. The country that the product can be delivered to. Submit a [unicode CLDR region](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) such as `US` or `CH`.", + "carrierAccountId": { + "description": "Output only. Immutable. The Google-provided unique carrier ID, used to update the resource.", + "format": "int64", + "readOnly": true, "type": "string" }, - "postalCodeRange": { - "$ref": "DeliveryAreaPostalCodeRange", - "description": "A postal code, postal code range or postal code prefix that defines this area. Limited to US and AUS." + "carrierAccountName": { + "description": "Name of the carrier account.", + "type": "string" }, - "regionCode": { - "description": "A state, territory, or prefecture. This is supported for the United States, Australia, and Japan. Provide a subdivision code from the ISO 3166-2 code tables ([US](https://en.wikipedia.org/wiki/ISO_3166-2:US), [AU](https://en.wikipedia.org/wiki/ISO_3166-2:AU), or [JP](https://en.wikipedia.org/wiki/ISO_3166-2:JP)) without country prefix (for example, `\"NY\"`, `\"NSW\"`, `\"03\"`).", + "carrierAccountNumber": { + "description": "Number of the carrier account.", + "type": "string" + }, + "carrierCode": { + "description": "The carrier code enum. Accepts the values FEDEX or UPS.", + "enum": [ + "CARRIER_CODE_UNSPECIFIED", + "FEDEX", + "UPS" + ], + "enumDescriptions": [ + "Carrier not specified", + "FedEx carrier", + "UPS carrier" + ], "type": "string" } }, "type": "object" }, - "DeliveryAreaPostalCodeRange": { - "description": "A range of postal codes that defines the delivery area. Only set `firstPostalCode` when specifying a single postal code.", - "id": "DeliveryAreaPostalCodeRange", + "AccountShippingImprovements": { + "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: * Delivery address of an order * Current handling time and shipping time settings * Estimated weekdays or business days * Parcel tracking data", + "id": "AccountShippingImprovements", "properties": { - "firstPostalCode": { - "description": "Required. A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: `\"94108\"`, `\"9410*\"`, `\"9*\"`.", - "type": "string" - }, - "lastPostalCode": { - "description": "A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area (for example [070* - 078*] results in the range [07000 - 07899]). It must have the same length as `firstPostalCode`: if `firstPostalCode` is a postal code then `lastPostalCode` must be a postal code too; if firstPostalCode is a pattern then `lastPostalCode` must be a pattern with the same prefix length. Ignored if not set, then the area is defined as being all the postal codes matching `firstPostalCode`.", - "type": "string" + "allowShippingImprovements": { + "description": "Enables automatic shipping improvements.", + "type": "boolean" } }, "type": "object" }, - "DeliveryTime": { - "id": "DeliveryTime", + "AccountStatus": { + "description": "The status of an account, that is, information about its products, which is computed offline and not returned immediately at insertion time.", + "id": "AccountStatus", "properties": { - "cutoffTime": { - "$ref": "CutoffTime", - "description": "Business days cutoff time definition. If not configured, the cutoff time will be defaulted to 8AM PST. If local delivery, use Service.StoreConfig.CutoffConfig." - }, - "handlingBusinessDayConfig": { - "$ref": "BusinessDayConfig", - "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed." + "accountId": { + "description": "The ID of the account for which the status is reported.", + "type": "string" }, - "holidayCutoffs": { - "description": "Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.", + "accountLevelIssues": { + "description": "A list of account level issues.", "items": { - "$ref": "HolidayCutoff" + "$ref": "AccountStatusAccountLevelIssue" }, "type": "array" }, - "maxHandlingTimeInDays": { - "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `minHandlingTimeInDays`.", - "format": "uint32", - "type": "integer" - }, - "maxTransitTimeInDays": { - "description": "Maximum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `minTransitTimeInDays`.", - "format": "uint32", - "type": "integer" - }, - "minHandlingTimeInDays": { - "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.", - "format": "uint32", - "type": "integer" - }, - "minTransitTimeInDays": { - "description": "Minimum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be set, but not both.", - "format": "uint32", - "type": "integer" - }, - "transitBusinessDayConfig": { - "$ref": "BusinessDayConfig", - "description": "The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed." + "accountManagement": { + "description": "How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", + "type": "string" }, - "transitTimeTable": { - "$ref": "TransitTable", - "description": "Transit time table, number of business days spent in transit based on row and column dimensions. Either `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but not both." + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountStatus`\"", + "type": "string" }, - "warehouseBasedDeliveryTimes": { - "description": "Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in DeliveryTime should be set.", + "products": { + "description": "List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.", "items": { - "$ref": "WarehouseBasedDeliveryTime" + "$ref": "AccountStatusProducts" }, "type": "array" + }, + "websiteClaimed": { + "description": "Whether the account's website is claimed or not.", + "type": "boolean" } }, "type": "object" }, - "Distance": { - "description": "Distance represented by an integer and unit.", - "id": "Distance", + "AccountStatusAccountLevelIssue": { + "id": "AccountStatusAccountLevelIssue", "properties": { - "unit": { - "description": "The distance unit. Acceptable values are `None`, `Miles`, and `Kilometers`.", + "country": { + "description": "Country for which this issue is reported.", "type": "string" }, - "value": { - "description": "The distance represented as a number.", - "format": "int64", + "destination": { + "description": "The destination the issue applies to. If this field is empty then the issue applies to all available destinations.", "type": "string" - } - }, - "type": "object" - }, - "ECommercePlatformLinkInfo": { - "description": "Additional information required for E_COMMERCE_PLATFORM link type.", - "id": "ECommercePlatformLinkInfo", - "properties": { - "externalAccountId": { - "description": "The id used by the third party service provider to identify the merchant.", + }, + "detail": { + "description": "Additional details about the issue.", + "type": "string" + }, + "documentation": { + "description": "The URL of a web page to help resolving this issue.", + "type": "string" + }, + "id": { + "description": "Issue identifier.", + "type": "string" + }, + "severity": { + "description": "Severity of the issue. Acceptable values are: - \"`critical`\" - \"`error`\" - \"`suggestion`\" ", + "type": "string" + }, + "title": { + "description": "Short description of the issue.", "type": "string" } }, "type": "object" }, - "Error": { - "description": "An error returned by the API.", - "id": "Error", + "AccountStatusItemLevelIssue": { + "id": "AccountStatusItemLevelIssue", "properties": { - "domain": { - "description": "The domain of the error.", + "attributeName": { + "description": "The attribute's name, if the issue is caused by a single attribute.", "type": "string" }, - "message": { - "description": "A description of the error.", + "code": { + "description": "The error code of the issue.", "type": "string" }, - "reason": { - "description": "The error code.", + "description": { + "description": "A short issue description in English.", + "type": "string" + }, + "detail": { + "description": "A detailed issue description in English.", + "type": "string" + }, + "documentation": { + "description": "The URL of a web page to help with resolving this issue.", + "type": "string" + }, + "numItems": { + "description": "Number of items with this issue.", + "format": "int64", + "type": "string" + }, + "resolution": { + "description": "Whether the issue can be resolved by the merchant.", + "type": "string" + }, + "servability": { + "description": "How this issue affects serving of the offer.", "type": "string" } }, "type": "object" }, - "Errors": { - "description": "A list of errors returned by a failed batch entry.", - "id": "Errors", + "AccountStatusProducts": { + "id": "AccountStatusProducts", "properties": { - "code": { - "description": "The HTTP status of the first error in `errors`.", - "format": "uint32", - "type": "integer" + "channel": { + "description": "The channel the data applies to. Acceptable values are: - \"`local`\" - \"`online`\" ", + "type": "string" }, - "errors": { - "description": "A list of errors.", + "country": { + "description": "The country the data applies to.", + "type": "string" + }, + "destination": { + "description": "The destination the data applies to.", + "type": "string" + }, + "itemLevelIssues": { + "description": "List of item-level issues.", "items": { - "$ref": "Error" + "$ref": "AccountStatusItemLevelIssue" }, "type": "array" }, - "message": { - "description": "The message of the first error in `errors`.", - "type": "string" + "statistics": { + "$ref": "AccountStatusStatistics", + "description": "Aggregated product statistics." } }, "type": "object" }, - "ExternalAction": { - "description": "Action that is implemented and performed outside of the third-party application. It should redirect the merchant to the provided URL of an external system where they can perform the action. For example to request a review in the Merchant Center.", - "id": "ExternalAction", + "AccountStatusStatistics": { + "id": "AccountStatusStatistics", "properties": { - "type": { - "description": "The type of external action.", - "enum": [ - "EXTERNAL_ACTION_TYPE_UNSPECIFIED", - "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER", - "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER", - "LEGAL_APPEAL_IN_HELP_CENTER", - "VERIFY_IDENTITY_IN_MERCHANT_CENTER" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Redirect to Merchant Center where the merchant can request a review for issue related to their product.", - "Redirect to Merchant Center where the merchant can request a review for issue related to their account.", - "Redirect to the form in Help Center where the merchant can request a legal appeal for the issue.", - "Redirect to Merchant Center where the merchant can perform identity verification." - ], + "active": { + "description": "Number of active offers.", + "format": "int64", "type": "string" }, - "uri": { - "description": "URL to external system, for example Merchant Center, where the merchant can perform the action.", + "disapproved": { + "description": "Number of disapproved offers.", + "format": "int64", + "type": "string" + }, + "expiring": { + "description": "Number of expiring offers.", + "format": "int64", + "type": "string" + }, + "pending": { + "description": "Number of pending offers.", + "format": "int64", "type": "string" } }, "type": "object" }, - "FreeListingsProgramStatus": { - "description": "Response message for GetFreeListingsProgramStatus.", - "id": "FreeListingsProgramStatus", + "AccountTax": { + "description": "The tax settings of a merchant account. All methods require the admin role.", + "id": "AccountTax", "properties": { - "globalState": { - "description": "State of the program. `ENABLED` if there are offers for at least one region.", - "enum": [ - "PROGRAM_STATE_UNSPECIFIED", - "NOT_ENABLED", - "NO_OFFERS_UPLOADED", - "ENABLED" - ], - "enumDescriptions": [ - "State is unknown.", - "Program is not enabled for any country.", - "No products have been uploaded for any region. Upload products to Merchant Center.", - "Program is enabled and offers are uploaded for at least one country." - ], + "accountId": { + "description": "Required. The ID of the account to which these account tax settings belong.", + "format": "uint64", "type": "string" }, - "regionStatuses": { - "description": "Status of the program in each region. Regions with the same status and review eligibility are grouped together in `regionCodes`.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountTax`\".", + "type": "string" + }, + "rules": { + "description": "Tax rules. Updating the tax rules will enable \"US\" taxes (not reversible). Defining no rules is equivalent to not charging tax at all.", "items": { - "$ref": "FreeListingsProgramStatusRegionStatus" + "$ref": "AccountTaxTaxRule" }, "type": "array" } }, "type": "object" }, - "FreeListingsProgramStatusRegionStatus": { - "description": "Status of program and region.", - "id": "FreeListingsProgramStatusRegionStatus", + "AccountTaxTaxRule": { + "description": "Tax calculation rule to apply in a state or province (US only).", + "id": "AccountTaxTaxRule", "properties": { - "disapprovalDate": { - "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", - "type": "string" - }, - "eligibilityStatus": { - "description": "Eligibility status of the standard free listing program.", - "enum": [ - "STATE_UNSPECIFIED", - "APPROVED", - "DISAPPROVED", - "WARNING", - "UNDER_REVIEW", - "PENDING_REVIEW", - "ONBOARDING" - ], - "enumDescriptions": [ - "State is not known.", - "If the account has no issues and review is completed successfully.", - "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", - "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", - "Account is under review.", - "Account is waiting for review to start.", - "Program is currently onboarding. Upload valid offers to complete onboarding." - ], - "type": "string" - }, - "onboardingIssues": { - "description": "Issues that must be fixed to be eligible for review.", - "items": { - "type": "string" - }, - "type": "array" - }, - "regionCodes": { - "description": "The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions with the same `eligibilityStatus` and `reviewEligibility`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "reviewEligibilityStatus": { - "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", - "enum": [ - "REVIEW_ELIGIBILITY_UNSPECIFIED", - "ELIGIBLE", - "INELIGIBLE" - ], - "enumDescriptions": [ - "Review eligibility state is unknown.", - "Account is eligible for review for a specified region code.", - "Account is not eligible for review for a specified region code." - ], + "country": { + "description": "Country code in which tax is applicable.", "type": "string" }, - "reviewIneligibilityReason": { - "description": "Review ineligibility reason if account is not eligible for review.", - "enum": [ - "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED", - "ONBOARDING_ISSUES", - "NOT_ENOUGH_OFFERS", - "IN_COOLDOWN_PERIOD", - "ALREADY_UNDER_REVIEW", - "NO_REVIEW_REQUIRED", - "WILL_BE_REVIEWED_AUTOMATICALLY", - "IS_RETIRED", - "ALREADY_REVIEWED" - ], - "enumDescriptions": [ - "Requesting a review from Google is not possible.", - "All onboarding issues needs to be fixed.", - "Not enough offers uploaded for this country.", - "Cooldown period applies. Wait until cooldown period ends.", - "Account is already under review.", - "No issues available to review.", - "Account will be automatically reviewed at the end of the grace period.", - "Account is retired. Should not appear in MC.", - "Account was already reviewd." - ], + "locationId": { + "description": "Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).", + "format": "uint64", "type": "string" }, - "reviewIneligibilityReasonDescription": { - "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", + "ratePercent": { + "description": "Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.", "type": "string" }, - "reviewIneligibilityReasonDetails": { - "$ref": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", - "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." + "shippingTaxed": { + "description": "If true, shipping charges are also taxed.", + "type": "boolean" }, - "reviewIssues": { - "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", - "items": { - "type": "string" - }, - "type": "array" + "useGlobalRate": { + "description": "Whether the tax rate is taken from a global tax table or specified explicitly.", + "type": "boolean" } }, "type": "object" }, - "FreeListingsProgramStatusReviewIneligibilityReasonDetails": { - "description": "Additional details for review ineligibility reasons.", - "id": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "AccountUser": { + "id": "AccountUser", "properties": { - "cooldownTime": { - "description": "This timestamp represents end of cooldown period for review ineligbility reason `IN_COOLDOWN_PERIOD`.", - "format": "google-datetime", + "admin": { + "description": "Whether user is an admin.", + "type": "boolean" + }, + "emailAddress": { + "description": "User's email address.", "type": "string" + }, + "orderManager": { + "description": "Whether user is an order manager.", + "type": "boolean" + }, + "paymentsAnalyst": { + "description": "Whether user can access payment statements.", + "type": "boolean" + }, + "paymentsManager": { + "description": "Whether user can manage payment settings.", + "type": "boolean" + }, + "reportingManager": { + "description": "Whether user is a reporting manager. This role is equivalent to the Performance and insights role in Merchant Center.", + "type": "boolean" } }, "type": "object" }, - "FreeShippingThreshold": { - "description": "Conditions to be met for a product to have free shipping.", - "id": "FreeShippingThreshold", + "AccountYouTubeChannelLink": { + "id": "AccountYouTubeChannelLink", "properties": { - "country": { - "description": "Required. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the country to which an item will ship.", + "channelId": { + "description": "Channel ID.", "type": "string" }, - "priceThreshold": { - "$ref": "Price", - "description": "Required. The minimum product price for the shipping cost to become free. Represented as a number." + "status": { + "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in YT Creator Studio or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.", + "type": "string" } }, "type": "object" }, - "GenerateRecommendationsResponse": { - "description": "Response containing generated recommendations.", - "id": "GenerateRecommendationsResponse", + "AccountsAuthInfoResponse": { + "id": "AccountsAuthInfoResponse", "properties": { - "recommendations": { - "description": "Recommendations generated for a request.", + "accountIdentifiers": { + "description": "The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. ", "items": { - "$ref": "Recommendation" + "$ref": "AccountIdentifier" }, "type": "array" }, - "responseToken": { - "description": "Output only. Response token is a string created for each `GenerateRecommendationsResponse`. This token doesn't expire, and is globally unique. This token must be used when reporting interactions for recommendations.", - "readOnly": true, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsAuthInfoResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "AccountsClaimWebsiteResponse": { + "id": "AccountsClaimWebsiteResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsClaimWebsiteResponse`\".", "type": "string" } }, "type": "object" }, - "GmbAccounts": { - "id": "GmbAccounts", + "AccountsCustomBatchRequest": { + "id": "AccountsCustomBatchRequest", "properties": { - "accountId": { - "description": "The ID of the Merchant Center account.", - "format": "uint64", - "type": "string" - }, - "gmbAccounts": { - "description": "A list of Business Profiles which are available to the merchant.", + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "GmbAccountsGmbAccount" + "$ref": "AccountsCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "GmbAccountsGmbAccount": { - "id": "GmbAccountsGmbAccount", + "AccountsCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accounts request.", + "id": "AccountsCustomBatchRequestEntry", "properties": { - "email": { - "description": "The email which identifies the Business Profile.", + "account": { + "$ref": "Account", + "description": "The account to create or update. Only defined if the method is `insert` or `update`." + }, + "accountId": { + "description": "The ID of the targeted account. Only defined if the method is not `insert`.", + "format": "uint64", "type": "string" }, - "listingCount": { - "description": "Number of listings under this account.", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "force": { + "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is `delete`.", + "type": "boolean" + }, + "labelIds": { + "description": "Label IDs for the 'updatelabels' request.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" + }, + "linkRequest": { + "$ref": "AccountsCustomBatchRequestEntryLinkRequest", + "description": "Details about the `link` request." + }, + "merchantId": { + "description": "The ID of the managing account.", "format": "uint64", "type": "string" }, - "name": { - "description": "The name of the Business Profile.", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`claimWebsite`\" - \"`delete`\" - \"`get`\" - \"`insert`\" - \"`link`\" - \"`update`\" ", "type": "string" }, - "type": { - "description": "The type of the Business Profile (User or Business).", + "overwrite": { + "description": "Only applicable if the method is `claimwebsite`. Indicates whether or not to take the claim from another account in case there is a conflict.", + "type": "boolean" + }, + "view": { + "description": "Controls which fields are visible. Only applicable if the method is 'get'.", "type": "string" } }, "type": "object" }, - "GoogleAnalyticsLink": { - "description": "\"Google Analytics Link\" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account.", - "id": "GoogleAnalyticsLink", + "AccountsCustomBatchRequestEntryLinkRequest": { + "id": "AccountsCustomBatchRequestEntryLinkRequest", "properties": { - "attributionSettings": { - "$ref": "AttributionSettings", - "description": "Output only. Attribution settings for the linked Google Analytics property.", - "readOnly": true + "action": { + "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", + "type": "string" }, - "propertyId": { - "description": "Required. Immutable. ID of the Google Analytics property the merchant is linked to.", - "format": "int64", + "linkType": { + "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" - \"`localProductManager`\" ", "type": "string" }, - "propertyName": { - "description": "Output only. Name of the Google Analytics property the merchant is linked to.", - "readOnly": true, + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" + }, + "services": { + "description": "Provided services. Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" - \"`localProductManagement`\" ", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "Headers": { - "description": "A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `numItems`, `postalCodeGroupNames`, or `location` must be set.", - "id": "Headers", + "AccountsCustomBatchResponse": { + "id": "AccountsCustomBatchResponse", "properties": { - "locations": { - "description": "A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.", + "entries": { + "description": "The result of the execution of the batch requests.", "items": { - "$ref": "LocationIdSet" + "$ref": "AccountsCustomBatchResponseEntry" }, "type": "array" }, - "numberOfItems": { - "description": "A list of inclusive number of items upper bounds. The last value can be `\"infinity\"`. For example `[\"10\", \"50\", \"infinity\"]` represents the headers \"\u003c= 10 items\", \"\u003c= 50 items\", and \"\u003e 50 items\". Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "type": "string" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "AccountsCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accounts response.", + "id": "AccountsCustomBatchResponseEntry", + "properties": { + "account": { + "$ref": "Account", + "description": "The retrieved, created, or updated account. Not defined if the method was `delete`, `claimwebsite` or `link`." }, - "postalCodeGroupNames": { - "description": "A list of postal group names. The last value can be `\"all other locations\"`. Example: `[\"zone 1\", \"zone 2\", \"all other locations\"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "type": "string" - }, - "type": "array" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "prices": { - "description": "A list of inclusive order price upper bounds. The last price's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"currency\": \"USD\"}, {\"value\": \"500\", \"currency\": \"USD\"}, {\"value\": \"infinity\", \"currency\": \"USD\"}]` represents the headers \"\u003c= $10\", \"\u003c= $500\", and \"\u003e $500\". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "$ref": "Price" - }, - "type": "array" + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "weights": { - "description": "A list of inclusive order weight upper bounds. The last weight's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"unit\": \"kg\"}, {\"value\": \"50\", \"unit\": \"kg\"}, {\"value\": \"infinity\", \"unit\": \"kg\"}]` represents the headers \"\u003c= 10kg\", \"\u003c= 50kg\", and \"\u003e 50kg\". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "$ref": "Weight" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponseEntry`\"", + "type": "string" } }, "type": "object" }, - "HolidayCutoff": { - "id": "HolidayCutoff", + "AccountsLinkRequest": { + "id": "AccountsLinkRequest", "properties": { - "deadlineDate": { - "description": "Date of the order deadline, in ISO 8601 format. For example, \"2016-11-29\" for 29th November 2016. Required.", + "action": { + "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", "type": "string" }, - "deadlineHour": { - "description": "Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.", - "format": "uint32", - "type": "integer" + "eCommercePlatformLinkInfo": { + "$ref": "ECommercePlatformLinkInfo", + "description": "Additional information required for `eCommercePlatform` link type." }, - "deadlineTimezone": { - "description": "Timezone identifier for the deadline hour (for example, \"Europe/Zurich\"). List of identifiers. Required.", + "linkType": { + "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" ", "type": "string" }, - "holidayId": { - "description": "Unique identifier for the holiday. Required.", + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" }, - "visibleFromDate": { - "description": "Date on which the deadline will become visible to consumers in ISO 8601 format. For example, \"2016-10-31\" for 31st October 2016. Required.", + "paymentServiceProviderLinkInfo": { + "$ref": "PaymentServiceProviderLinkInfo", + "description": "Additional information required for `paymentServiceProvider` link type." + }, + "services": { + "description": " Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" ", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AccountsLinkResponse": { + "id": "AccountsLinkResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsLinkResponse`\".", "type": "string" } }, "type": "object" }, - "HolidaysHoliday": { - "id": "HolidaysHoliday", + "AccountsListLinksResponse": { + "id": "AccountsListLinksResponse", "properties": { - "countryCode": { - "description": "The CLDR territory code of the country in which the holiday is available. For example, \"US\", \"DE\", \"GB\". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListLinksResponse`\".", "type": "string" }, - "date": { - "description": "Date of the holiday, in ISO 8601 format. For example, \"2016-12-25\" for Christmas 2016. Always present.", - "type": "string" + "links": { + "description": "The list of available links.", + "items": { + "$ref": "LinkedAccount" + }, + "type": "array" }, - "deliveryGuaranteeDate": { - "description": "Date on which the order has to arrive at the customer's, in ISO 8601 format. For example, \"2016-12-24\" for 24th December 2016. Always present.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of links.", "type": "string" - }, - "deliveryGuaranteeHour": { - "description": "Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present.", - "format": "uint64", + } + }, + "type": "object" + }, + "AccountsListResponse": { + "id": "AccountsListResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListResponse`\".", "type": "string" }, - "id": { - "description": "Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of accounts.", "type": "string" }, - "type": { - "description": "The holiday type. Always present. Acceptable values are: - \"`Christmas`\" - \"`Easter`\" - \"`Father's Day`\" - \"`Halloween`\" - \"`Independence Day (USA)`\" - \"`Mother's Day`\" - \"`Thanksgiving`\" - \"`Valentine's Day`\" ", - "type": "string" + "resources": { + "items": { + "$ref": "Account" + }, + "type": "array" + } + }, + "type": "object" + }, + "AccountsUpdateLabelsRequest": { + "id": "AccountsUpdateLabelsRequest", + "properties": { + "labelIds": { + "description": "The IDs of labels that should be assigned to the account.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "InputField": { - "description": "Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.", - "id": "InputField", + "AccountsUpdateLabelsResponse": { + "id": "AccountsUpdateLabelsResponse", "properties": { - "checkboxInput": { - "$ref": "InputFieldCheckboxInput", - "description": "Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox)." - }, - "choiceInput": { - "$ref": "InputFieldChoiceInput", - "description": "Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio)." - }, - "id": { - "description": "Not for display but need to be sent back for the given input field.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsUpdateLabelsResponse`\".", "type": "string" - }, - "label": { - "$ref": "TextWithTooltip", - "description": "Input field label. There may be more information to be shown in a tooltip." - }, - "required": { - "description": "Whether the field is required. The action button needs to stay disabled till values for all required fields are provided.", - "type": "boolean" - }, - "textInput": { - "$ref": "InputFieldTextInput", - "description": "Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." } }, "type": "object" }, - "InputFieldCheckboxInput": { - "description": "Checkbox input allows merchants to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). If merchant checks the box, the input value for the field is `true`, otherwise it is `false`. This type of input is often used as a confirmation that the merchant completed required steps before they are allowed to start the action. In such a case, the input field is marked as required and the button to trigger the action should stay disabled until the merchant checks the box.", - "id": "InputFieldCheckboxInput", - "properties": {}, - "type": "object" - }, - "InputFieldChoiceInput": { - "description": "Choice input allows merchants to select one of the offered choices. Some choices may be linked to additional input fields that should be displayed under or next to the choice option. The value for the additional input field needs to be provided only when the specific choice is selected by the merchant. For example, additional input field can be hidden or disabled until the merchant selects the specific choice.", - "id": "InputFieldChoiceInput", + "AccountstatusesCustomBatchRequest": { + "id": "AccountstatusesCustomBatchRequest", "properties": { - "options": { - "description": "A list of choices. Only one option can be selected.", + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "InputFieldChoiceInputChoiceInputOption" + "$ref": "AccountstatusesCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "InputFieldChoiceInputChoiceInputOption": { - "description": "A choice that merchant can select.", - "id": "InputFieldChoiceInputChoiceInputOption", + "AccountstatusesCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accountstatuses request.", + "id": "AccountstatusesCustomBatchRequestEntry", "properties": { - "additionalInput": { - "$ref": "InputField", - "description": "Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`." + "accountId": { + "description": "The ID of the (sub-)account whose status to get.", + "format": "uint64", + "type": "string" }, - "id": { - "description": "Not for display but need to be sent back for the selected choice option.", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "items": { + "type": "string" + }, + "type": "array" + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "label": { - "$ref": "TextWithTooltip", - "description": "Short description of the choice option. There may be more information to be shown as a tooltip." + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", + "type": "string" } }, "type": "object" }, - "InputFieldTextInput": { - "description": "Text input allows merchants to provide a text value.", - "id": "InputFieldTextInput", + "AccountstatusesCustomBatchResponse": { + "id": "AccountstatusesCustomBatchResponse", "properties": { - "additionalInfo": { - "$ref": "TextWithTooltip", - "description": "Additional info regarding the field to be displayed to merchant. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip." - }, - "ariaLabel": { - "description": "Text to be used as the [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input.", - "type": "string" - }, - "formatInfo": { - "description": "Information about the required format. If present, it should be shown close to the input field to help merchants to provide a correct value. For example: \"VAT numbers should be in a format similar to SK9999999999\"", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "AccountstatusesCustomBatchResponseEntry" + }, + "type": "array" }, - "type": { - "description": "Type of the text input", - "enum": [ - "TEXT_INPUT_TYPE_UNSPECIFIED", - "GENERIC_SHORT_TEXT", - "GENERIC_LONG_TEXT" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Used when a short text is expected. The field can be rendered as a [text field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text).", - "Used when a longer text is expected. The field should be rendered as a [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." - ], + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "InputValue": { - "description": "Input provided by the merchant for input field.", - "id": "InputValue", + "AccountstatusesCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accountstatuses response.", + "id": "AccountstatusesCustomBatchResponseEntry", "properties": { - "checkboxInputValue": { - "$ref": "InputValueCheckboxInputValue", - "description": "Value for checkbox input field." - }, - "choiceInputValue": { - "$ref": "InputValueChoiceInputValue", - "description": "Value for choice input field." + "accountStatus": { + "$ref": "AccountStatus", + "description": "The requested account status. Defined if and only if the request was successful." }, - "inputFieldId": { - "description": "Required. Id of the corresponding input field.", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "textInputValue": { - "$ref": "InputValueTextInputValue", - "description": "Value for text input field." + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" }, - "InputValueCheckboxInputValue": { - "description": "Value for checkbox input field.", - "id": "InputValueCheckboxInputValue", + "AccountstatusesListResponse": { + "id": "AccountstatusesListResponse", "properties": { - "value": { - "description": "Required. True if the merchant checked the box field. False otherwise.", - "type": "boolean" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesListResponse`\".", + "type": "string" + }, + "nextPageToken": { + "description": "The token for the retrieval of the next page of account statuses.", + "type": "string" + }, + "resources": { + "items": { + "$ref": "AccountStatus" + }, + "type": "array" } }, "type": "object" }, - "InputValueChoiceInputValue": { - "description": "Value for choice input field.", - "id": "InputValueChoiceInputValue", + "AccounttaxCustomBatchRequest": { + "id": "AccounttaxCustomBatchRequest", "properties": { - "choiceInputOptionId": { - "description": "Required. Id of the option that was selected by the merchant.", - "type": "string" + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "AccounttaxCustomBatchRequestEntry" + }, + "type": "array" } }, "type": "object" }, - "InputValueTextInputValue": { - "description": "Value for text input field.", - "id": "InputValueTextInputValue", + "AccounttaxCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accounttax request.", + "id": "AccounttaxCustomBatchRequestEntry", "properties": { - "value": { - "description": "Required. Text provided by the merchant.", + "accountId": { + "description": "The ID of the account for which to get/update account tax settings.", + "format": "uint64", + "type": "string" + }, + "accountTax": { + "$ref": "AccountTax", + "description": "The account tax settings to update. Only defined if the method is `update`." + }, + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", + "type": "string" + }, + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`update`\" ", "type": "string" } }, "type": "object" }, - "InsertCheckoutSettingsRequest": { - "description": "Request message for the `InsertCheckoutSettings` method.", - "id": "InsertCheckoutSettingsRequest", + "AccounttaxCustomBatchResponse": { + "id": "AccounttaxCustomBatchResponse", "properties": { - "uriSettings": { - "$ref": "UrlSettings", - "description": "Required. The `UrlSettings` for the request. The presence of URL settings indicates `Checkout` enrollment." + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "AccounttaxCustomBatchResponseEntry" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponse`\".", + "type": "string" } }, "type": "object" }, - "Installment": { - "description": "Details of a monthly installment payment offering. [Learn more](https://support.google.com/merchants/answer/6324474) about installments.", - "id": "Installment", + "AccounttaxCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accounttax response.", + "id": "AccounttaxCustomBatchResponseEntry", "properties": { - "amount": { - "$ref": "Price", - "description": "The amount the buyer has to pay per month." + "accountTax": { + "$ref": "AccountTax", + "description": "The retrieved or updated account tax settings." }, - "creditType": { - "description": "Optional. Type of installment payments. Supported values are: - \"`finance`\" - \"`lease`\" ", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "downpayment": { - "$ref": "Price", - "description": "Optional. The initial down payment amount the buyer has to pay." + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "months": { - "description": "The number of installments the buyer has to pay.", - "format": "int64", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponseEntry`\"", "type": "string" } }, "type": "object" }, - "InvoiceSummary": { - "id": "InvoiceSummary", + "AccounttaxListResponse": { + "id": "AccounttaxListResponse", "properties": { - "additionalChargeSummaries": { - "description": "Summary of the total amounts of the additional charges.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxListResponse`\".", + "type": "string" + }, + "nextPageToken": { + "description": "The token for the retrieval of the next page of account tax settings.", + "type": "string" + }, + "resources": { "items": { - "$ref": "InvoiceSummaryAdditionalChargeSummary" + "$ref": "AccountTax" }, "type": "array" - }, - "productTotal": { - "$ref": "Amount", - "description": "[required] Total price for the product." } }, "type": "object" }, - "InvoiceSummaryAdditionalChargeSummary": { - "id": "InvoiceSummaryAdditionalChargeSummary", + "Action": { + "description": "An actionable step that can be executed to solve the issue.", + "id": "Action", "properties": { - "totalAmount": { - "$ref": "Amount", - "description": "[required] Total additional charge for this type." + "builtinSimpleAction": { + "$ref": "BuiltInSimpleAction", + "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." }, - "type": { - "description": "[required] Type of the additional charge. Acceptable values are: - \"`shipping`\" ", + "builtinUserInputAction": { + "$ref": "BuiltInUserInputAction", + "description": "Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant as specified for given action. They can trigger the action only when they provided all required inputs." + }, + "buttonLabel": { + "description": "Label of the action button.", "type": "string" - } - }, - "type": "object" - }, - "LabelIds": { - "description": "The IDs of labels that should be assigned to the CSS domain.", - "id": "LabelIds", - "properties": { - "labelIds": { - "description": "The list of label IDs.", + }, + "externalAction": { + "$ref": "ExternalAction", + "description": "Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the merchant to the external location where they can perform the action." + }, + "isAvailable": { + "description": "Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons.", + "type": "boolean" + }, + "reasons": { + "description": "List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog.", "items": { - "format": "int64", - "type": "string" + "$ref": "ActionReason" }, "type": "array" } }, "type": "object" }, - "LiaAboutPageSettings": { - "id": "LiaAboutPageSettings", + "ActionFlow": { + "description": "Flow that can be selected for an action. When merchant selects a flow, application should open a dialog with more information and input form.", + "id": "ActionFlow", "properties": { - "status": { - "description": "The status of the verification process for the About page. Supported values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "dialogButtonLabel": { + "description": "Label for the button to trigger the action from the action dialog. For example: \"Request review\"", "type": "string" }, - "url": { - "description": "The URL for the About page.", + "dialogCallout": { + "$ref": "Callout", + "description": "Important message to be highlighted in the request dialog. For example: \"You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review.\"" + }, + "dialogMessage": { + "$ref": "TextWithTooltip", + "description": "Message displayed in the request dialog. For example: \"Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review\". There may be an more information to be shown in a tooltip." + }, + "dialogTitle": { + "description": "Title of the request dialog. For example: \"Before you request a review\"", + "type": "string" + }, + "id": { + "description": "Not for display but need to be sent back for the selected action flow.", + "type": "string" + }, + "inputs": { + "description": "A list of input fields.", + "items": { + "$ref": "InputField" + }, + "type": "array" + }, + "label": { + "description": "Text value describing the intent for the action flow. It can be used as an input label if merchant needs to pick one of multiple flows. For example: \"I disagree with the issue\"", "type": "string" } }, "type": "object" }, - "LiaCountrySettings": { - "id": "LiaCountrySettings", + "ActionInput": { + "description": "Input provided by the merchant.", + "id": "ActionInput", "properties": { - "about": { - "$ref": "LiaAboutPageSettings", - "description": "The settings for the About page." - }, - "country": { - "description": "Required. CLDR country code (for example, \"US\").", + "actionFlowId": { + "description": "Required. Id of the selected action flow.", "type": "string" }, - "hostedLocalStorefrontActive": { - "description": "The status of the \"Merchant hosted local storefront\" feature.", - "type": "boolean" - }, - "inventory": { - "$ref": "LiaInventorySettings", - "description": "LIA inventory verification settings." - }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The omnichannel experience configured for this country." - }, - "onDisplayToOrder": { - "$ref": "LiaOnDisplayToOrderSettings", - "description": "LIA \"On Display To Order\" settings." - }, - "posDataProvider": { - "$ref": "LiaPosDataProvider", - "description": "The POS data provider linked with this country." - }, - "storePickupActive": { - "description": "The status of the \"Store pickup\" feature.", - "type": "boolean" + "inputValues": { + "description": "Required. Values for input fields.", + "items": { + "$ref": "InputValue" + }, + "type": "array" } }, "type": "object" }, - "LiaInventorySettings": { - "id": "LiaInventorySettings", + "ActionReason": { + "description": "A single reason why the action is not available.", + "id": "ActionReason", "properties": { - "inventoryVerificationContactEmail": { - "description": "The email of the contact for the inventory verification process.", - "type": "string" - }, - "inventoryVerificationContactName": { - "description": "The name of the contact for the inventory verification process.", - "type": "string" + "action": { + "$ref": "Action", + "description": "Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once merchant configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action." }, - "inventoryVerificationContactStatus": { - "description": "The status of the verification contact. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "detail": { + "description": "Detailed explanation of the reason. Should be displayed as a hint if present.", "type": "string" }, - "status": { - "description": "The status of the inventory verification process. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "message": { + "description": "Messages summarizing the reason, why the action is not available. For example: \"Review requested on Jan 03. Review requests can take a few days to complete.\"", "type": "string" } }, "type": "object" }, - "LiaOmnichannelExperience": { - "description": "Omnichannel experience details.", - "id": "LiaOmnichannelExperience", + "Address": { + "id": "Address", "properties": { - "country": { - "description": "The CLDR country code (for example, \"US\").", + "administrativeArea": { + "description": "Required. Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", "type": "string" }, - "lsfType": { - "description": "The Local Store Front (LSF) type for this country. Acceptable values are: - \"`ghlsf`\" (Google-Hosted Local Store Front) - \"`mhlsfBasic`\" (Merchant-Hosted Local Store Front Basic) - \"`mhlsfFull`\" (Merchant-Hosted Local Store Front Full) More details about these types can be found here.", + "city": { + "description": "Required. City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", "type": "string" }, - "pickupTypes": { - "description": "The Pickup types for this country. Acceptable values are: - \"`pickupToday`\" - \"`pickupLater`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LiaOnDisplayToOrderSettings": { - "id": "LiaOnDisplayToOrderSettings", - "properties": { - "shippingCostPolicyUrl": { - "description": "Shipping cost and policy URL.", + "country": { + "description": "Required. [CLDR country code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) (for example, \"US\").", "type": "string" }, - "status": { - "description": "The status of the ?On display to order? feature. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "postalCode": { + "description": "Required. Postal code or ZIP (for example, \"94043\").", + "type": "string" + }, + "streetAddress": { + "description": "Street-level part of the address. Use `\\n` to add a second line.", "type": "string" } }, "type": "object" }, - "LiaPosDataProvider": { - "id": "LiaPosDataProvider", + "AlternateDisputeResolution": { + "description": "The Alternate Dispute Resolution (ADR) that may be available to merchants in some regions. If present, the link should be shown on the same page as the list of issues.", + "id": "AlternateDisputeResolution", "properties": { - "posDataProviderId": { - "description": "The ID of the POS data provider.", - "format": "uint64", + "label": { + "description": "The label for the alternate dispute resolution link.", "type": "string" }, - "posExternalAccountId": { - "description": "The account ID by which this merchant is known to the POS data provider.", + "uri": { + "description": "The URL pointing to a page, where merchant can request alternative dispute resolution with an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501).", "type": "string" } }, "type": "object" }, - "LiaSettings": { - "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.", - "id": "LiaSettings", + "AttributionSettings": { + "description": "Represents attribution settings for conversion sources receiving pre-attribution data.", + "id": "AttributionSettings", "properties": { - "accountId": { - "description": "The ID of the account to which these LIA settings belong. Ignored upon update, always present in get request responses.", - "format": "uint64", + "attributionLookbackWindowInDays": { + "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.", + "format": "int32", + "type": "integer" + }, + "attributionModel": { + "description": "Required. Attribution model.", + "enum": [ + "ATTRIBUTION_MODEL_UNSPECIFIED", + "CROSS_CHANNEL_LAST_CLICK", + "ADS_PREFERRED_LAST_CLICK", + "CROSS_CHANNEL_DATA_DRIVEN", + "CROSS_CHANNEL_FIRST_CLICK", + "CROSS_CHANNEL_LINEAR", + "CROSS_CHANNEL_POSITION_BASED", + "CROSS_CHANNEL_TIME_DECAY" + ], + "enumDescriptions": [ + "", + "Cross-channel Last Click model.", + "Ads-preferred Last Click model.", + "Cross-channel Data Driven model.", + "Cross-channel First Click model.", + "Cross-channel Linear model.", + "Cross-channel Position Based model.", + "Cross-channel Time Decay model." + ], "type": "string" }, - "countrySettings": { - "description": "The LIA settings for each country.", + "conversionType": { + "description": "Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard \"purchase\" type will be automatically created if this list is empty at creation time.", "items": { - "$ref": "LiaCountrySettings" + "$ref": "AttributionSettingsConversionType" }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liaSettings`\"", - "type": "string" + "type": "array" } }, "type": "object" }, - "LiasettingsCustomBatchRequest": { - "id": "LiasettingsCustomBatchRequest", + "AttributionSettingsConversionType": { + "description": "Message representing a types of conversion events", + "id": "AttributionSettingsConversionType", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "LiasettingsCustomBatchRequestEntry" - }, - "type": "array" + "includeInReporting": { + "description": "Output only. Option indicating if the type should be included in Merchant Center reporting.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Output only. Conversion event name, as it'll be reported by the client.", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "LiasettingsCustomBatchRequestEntry": { - "id": "LiasettingsCustomBatchRequestEntry", + "BestSellers": { + "description": "Fields related to the [Best sellers reports](https://support.google.com/merchants/answer/9488679).", + "id": "BestSellers", "properties": { - "accountId": { - "description": "The ID of the account for which to get/update account LIA settings.", - "format": "uint64", + "categoryId": { + "description": "Google product category ID to calculate the ranking for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). If a `WHERE` condition on `best_sellers.category_id` is not specified in the query, rankings for all top-level categories are returned.", + "format": "int64", "type": "string" }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "contactEmail": { - "description": "Inventory validation contact email. Required only for SetInventoryValidationContact.", + "countryCode": { + "description": "Country where the ranking is calculated. A `WHERE` condition on `best_sellers.country_code` is required in the query.", "type": "string" }, - "contactName": { - "description": "Inventory validation contact name. Required only for SetInventoryValidationContact.", + "previousRank": { + "description": "Popularity rank in the previous week or month.", + "format": "int64", "type": "string" }, - "country": { - "description": "The country code. Required only for RequestInventoryVerification.", + "previousRelativeDemand": { + "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country in the previous week or month.", + "enum": [ + "RELATIVE_DEMAND_UNSPECIFIED", + "VERY_LOW", + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ], + "enumDescriptions": [ + "Relative demand is unknown.", + "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", + "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", + "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", + "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", + "Demand is 51-100% of the demand of the highest ranked product clusters or brands." + ], "type": "string" }, - "gmbEmail": { - "description": "The Business Profile. Required only for RequestGmbAccess.", + "rank": { + "description": "Popularity on Shopping ads and free listings, in the selected category and country, based on the estimated number of units sold.", + "format": "int64", "type": "string" }, - "liaSettings": { - "$ref": "LiaSettings", - "description": "The account Lia settings to update. Only defined if the method is `update`." - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "relativeDemand": { + "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country.", + "enum": [ + "RELATIVE_DEMAND_UNSPECIFIED", + "VERY_LOW", + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ], + "enumDescriptions": [ + "Relative demand is unknown.", + "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", + "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", + "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", + "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", + "Demand is 51-100% of the demand of the highest ranked product clusters or brands." + ], "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`getAccessibleGmbAccounts`\" - \"`requestGmbAccess`\" - \"`requestInventoryVerification`\" - \"`setInventoryVerificationContact`\" - \"`update`\" ", + "relativeDemandChange": { + "description": "Change in the estimated demand. Whether it rose, sank or remained flat.", + "enum": [ + "RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED", + "SINKER", + "FLAT", + "RISER" + ], + "enumDescriptions": [ + "Relative demand change is unknown.", + "Relative demand is lower than previous time period.", + "Relative demand is equal to previous time period.", + "Relative demand is higher than the previous time period." + ], "type": "string" }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The omnichannel experience for a country. Required only for SetOmnichannelExperience." + "reportDate": { + "$ref": "Date", + "description": "Report date. The value of this field can only be one of the following: * The first day of the week (Monday) for weekly reports. * The first day of the month for monthly reports. If a `WHERE` condition on `best_sellers.report_date` is not specified in the query, the latest available weekly or monthly report is returned." }, - "posDataProviderId": { - "description": "The ID of POS data provider. Required only for SetPosProvider.", - "format": "uint64", + "reportGranularity": { + "description": "Granularity of the report. The ranking can be done over a week or a month timeframe. A `WHERE` condition on `best_sellers.report_granularity` is required in the query.", + "enum": [ + "REPORT_GRANULARITY_UNSPECIFIED", + "WEEKLY", + "MONTHLY" + ], + "enumDescriptions": [ + "Report granularity is unknown.", + "Ranking is done over a week timeframe.", + "Ranking is done over a month timeframe." + ], "type": "string" - }, - "posExternalAccountId": { - "description": "The account ID by which this merchant is known to the POS provider.", + } + }, + "type": "object" + }, + "Brand": { + "description": "Brand fields. Values are only set for fields requested explicitly in the request's search query.", + "id": "Brand", + "properties": { + "name": { + "description": "Name of the brand.", "type": "string" } }, "type": "object" }, - "LiasettingsCustomBatchResponse": { - "id": "LiasettingsCustomBatchResponse", + "Breakdown": { + "description": "A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.", + "id": "Breakdown", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", + "details": { + "description": "Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * \"Products not showing in ads\" * \"Products not showing organically\"", "items": { - "$ref": "LiasettingsCustomBatchResponseEntry" + "type": "string" }, "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponse`\".", - "type": "string" + "regions": { + "description": "Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to merchant. If the list is too long, it is recommended to make it expandable.", + "items": { + "$ref": "BreakdownRegion" + }, + "type": "array" } }, "type": "object" }, - "LiasettingsCustomBatchResponseEntry": { - "id": "LiasettingsCustomBatchResponseEntry", + "BreakdownRegion": { + "description": "Region with code and localized name.", + "id": "BreakdownRegion", "properties": { - "batchId": { - "description": "The ID of the request entry to which this entry responds.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if, and only if, the request failed." - }, - "gmbAccounts": { - "$ref": "GmbAccounts", - "description": "The list of accessible Business Profiles." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponseEntry`\"", + "code": { + "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)", "type": "string" }, - "liaSettings": { - "$ref": "LiaSettings", - "description": "The retrieved or updated Lia settings." + "name": { + "description": "The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages.", + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleAction": { + "description": "Action that is implemented and performed in (your) third-party application. Represents various functionality that is expected to be available to merchant and will help them with resolving the issue. The application should point the merchant to the place, where they can access the corresponding functionality. If the functionality is not supported, it is recommended to explain the situation to merchant and provide them with instructions how to solve the issue.", + "id": "BuiltInSimpleAction", + "properties": { + "additionalContent": { + "$ref": "BuiltInSimpleActionAdditionalContent", + "description": "Long text from an external source that should be available to the merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`." }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The updated omnichannel experience for a country." + "attributeCode": { + "description": "The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112).", + "type": "string" }, - "posDataProviders": { - "description": "The list of POS data providers.", + "type": { + "description": "The type of action that represents a functionality that is expected to be available in third-party application.", + "enum": [ + "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED", + "VERIFY_PHONE", + "CLAIM_WEBSITE", + "ADD_PRODUCTS", + "ADD_CONTACT_INFO", + "LINK_ADS_ACCOUNT", + "ADD_BUSINESS_REGISTRATION_NUMBER", + "EDIT_ITEM_ATTRIBUTE", + "FIX_ACCOUNT_ISSUE", + "SHOW_ADDITIONAL_CONTENT" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect merchant to the part of your application where they can verify their phone.", + "Redirect merchant to the part of your application where they can claim their website.", + "Redirect merchant to the part of your application where they can add products.", + "Open a form where the merchant can edit their contact information.", + "Redirect merchant to the part of your application where they can link ads account.", + "Open a form where the merchant can add their business registration number.", + "Open a form where the merchant can edit an attribute. The attribute that needs to be updated is specified in attribute_code field of the action.", + "Redirect merchant from the product issues to the diagnostic page with their account issues in your application. This action will be returned only for product issues that are caused by an account issue and thus merchant should resolve the problem on the account level.", + "Show additional content to the merchant. This action will be used for example to deliver a justification from national authority." + ], + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleActionAdditionalContent": { + "description": "Long text from external source.", + "id": "BuiltInSimpleActionAdditionalContent", + "properties": { + "paragraphs": { + "description": "Long text organized into paragraphs.", "items": { - "$ref": "PosDataProviders" + "type": "string" }, "type": "array" + }, + "title": { + "description": "Title of the additional content;", + "type": "string" } }, "type": "object" }, - "LiasettingsGetAccessibleGmbAccountsResponse": { - "id": "LiasettingsGetAccessibleGmbAccountsResponse", + "BuiltInUserInputAction": { + "description": "Action that is implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant. They can start the action only when they provided all required inputs. The application will request processing of the action by calling the [triggeraction method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction).", + "id": "BuiltInUserInputAction", "properties": { - "accountId": { - "description": "The ID of the Merchant Center account.", - "format": "uint64", + "actionContext": { + "description": "Internal details. Not for display but need to be sent back when triggering the action.", "type": "string" }, - "gmbAccounts": { - "description": "A list of Business Profiles which are available to the merchant.", + "flows": { + "description": "Actions may provide multiple different flows. Merchant selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed.", "items": { - "$ref": "GmbAccountsGmbAccount" + "$ref": "ActionFlow" }, "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsGetAccessibleGmbAccountsResponse`\".", - "type": "string" } }, "type": "object" }, - "LiasettingsListPosDataProvidersResponse": { - "id": "LiasettingsListPosDataProvidersResponse", + "BusinessDayConfig": { + "id": "BusinessDayConfig", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListPosDataProvidersResponse`\".", - "type": "string" - }, - "posDataProviders": { - "description": "The list of POS data providers for each eligible country", + "businessDays": { + "description": "Regular business days, such as '\"monday\"'. May not be empty.", "items": { - "$ref": "PosDataProviders" + "type": "string" }, "type": "array" } }, "type": "object" }, - "LiasettingsListResponse": { - "id": "LiasettingsListResponse", + "Callout": { + "description": "An important message that should be highlighted. Usually displayed as a banner.", + "id": "Callout", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListResponse`\".", - "type": "string" + "fullMessage": { + "$ref": "TextWithTooltip", + "description": "A full message that needs to be shown to the merchant." }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of LIA settings.", + "styleHint": { + "description": "Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to merchants.", + "enum": [ + "CALLOUT_STYLE_HINT_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "The most important type of information highlighting problems, like an unsuccessful outcome of previously requested actions.", + "Information warning about pending problems, risks or deadlines.", + "Default severity for important information like pending status of previously requested action or cooldown for re-review." + ], "type": "string" - }, - "resources": { - "items": { - "$ref": "LiaSettings" - }, - "type": "array" } }, "type": "object" }, - "LiasettingsRequestGmbAccessResponse": { - "id": "LiasettingsRequestGmbAccessResponse", + "CarrierRate": { + "id": "CarrierRate", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestGmbAccessResponse`\".", + "carrierName": { + "description": "Carrier service, such as `\"UPS\"` or `\"Fedex\"`. The list of supported carriers can be retrieved through the `getSupportedCarriers` method. Required.", + "type": "string" + }, + "carrierService": { + "description": "Carrier service, such as `\"ground\"` or `\"2 days\"`. The list of supported services for a carrier can be retrieved through the `getSupportedCarriers` method. Required.", + "type": "string" + }, + "flatAdjustment": { + "$ref": "Price", + "description": "Additive shipping rate modifier. Can be negative. For example `{ \"value\": \"1\", \"currency\" : \"USD\" }` adds $1 to the rate, `{ \"value\": \"-3\", \"currency\" : \"USD\" }` removes $3 from the rate. Optional." + }, + "name": { + "description": "Name of the carrier rate. Must be unique per rate group. Required.", + "type": "string" + }, + "originPostalCode": { + "description": "Shipping origin for this carrier rate. Required.", + "type": "string" + }, + "percentageAdjustment": { + "description": "Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%, `\"-3\"` decreases the rate by 3%. Optional.", "type": "string" } }, "type": "object" }, - "LiasettingsRequestInventoryVerificationResponse": { - "id": "LiasettingsRequestInventoryVerificationResponse", + "CarriersCarrier": { + "id": "CarriersCarrier", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestInventoryVerificationResponse`\".", + "country": { + "description": "The CLDR country code of the carrier (for example, \"US\"). Always present.", + "type": "string" + }, + "eddServices": { + "description": "A list of services supported for EDD (Estimated Delivery Date) calculation. This is the list of valid values for WarehouseBasedDeliveryTime.carrierService.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "The name of the carrier (for example, `\"UPS\"`). Always present.", "type": "string" + }, + "services": { + "description": "A list of supported services (for example, `\"ground\"`) for that carrier. Contains at least one service. This is the list of valid values for CarrierRate.carrierService.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "LiasettingsSetInventoryVerificationContactResponse": { - "id": "LiasettingsSetInventoryVerificationContactResponse", + "CheckoutSettings": { + "description": "`CheckoutSettings` for a specific merchant ID.", + "id": "CheckoutSettings", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetInventoryVerificationContactResponse`\".", + "effectiveEnrollmentState": { + "description": "Output only. The effective value of enrollment state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", + "enum": [ + "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", + "INACTIVE", + "ENROLLED", + "OPT_OUT" + ], + "enumDescriptions": [ + "Default enrollment state when enrollment state is not specified.", + "Merchant has not enrolled into the feature.", + "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", + "Merchant has previously enrolled but opted out of the feature." + ], + "readOnly": true, + "type": "string" + }, + "effectiveReviewState": { + "description": "Output only. The effective value of review state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", + "enum": [ + "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", + "IN_REVIEW", + "APPROVED", + "DISAPPROVED" + ], + "enumDescriptions": [ + "Default review state when review state is not specified.", + "Merchant provided URLs are being reviewed for data quality issues.", + "Merchant account has been approved. Indicates the data quality checks have passed.", + "Merchant account has been disapproved due to data quality issues." + ], + "readOnly": true, + "type": "string" + }, + "effectiveUriSettings": { + "$ref": "UrlSettings", + "description": "The effective value of `url_settings` for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account." + }, + "enrollmentState": { + "description": "Output only. Reflects the merchant enrollment state in `Checkout` feature.", + "enum": [ + "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", + "INACTIVE", + "ENROLLED", + "OPT_OUT" + ], + "enumDescriptions": [ + "Default enrollment state when enrollment state is not specified.", + "Merchant has not enrolled into the feature.", + "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", + "Merchant has previously enrolled but opted out of the feature." + ], + "readOnly": true, + "type": "string" + }, + "merchantId": { + "description": "Required. The ID of the account.", + "format": "int64", + "type": "string" + }, + "reviewState": { + "description": "Output only. Reflects the merchant review state in `Checkout` feature. This is set based on the data quality reviews of the URL provided by the merchant. A merchant with enrollment state as `ENROLLED` can be in the following review states: `IN_REVIEW`, `APPROVED` or `DISAPPROVED`. A merchant must be in an enrollment_state of `ENROLLED` before a review can begin for the merchant.", + "enum": [ + "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", + "IN_REVIEW", + "APPROVED", + "DISAPPROVED" + ], + "enumDescriptions": [ + "Default review state when review state is not specified.", + "Merchant provided URLs are being reviewed for data quality issues.", + "Merchant account has been approved. Indicates the data quality checks have passed.", + "Merchant account has been disapproved due to data quality issues." + ], + "readOnly": true, "type": "string" + }, + "uriSettings": { + "$ref": "UrlSettings", + "description": "URL settings for cart or checkout URL." } }, "type": "object" }, - "LiasettingsSetPosDataProviderResponse": { - "id": "LiasettingsSetPosDataProviderResponse", + "CloudExportAdditionalProperties": { + "description": "Product property for the Cloud Retail API. For example, properties for a TV product could be \"Screen-Resolution\" or \"Screen-Size\".", + "id": "CloudExportAdditionalProperties", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetPosDataProviderResponse`\".", + "boolValue": { + "description": "Boolean value of the given property. For example for a TV product, \"True\" or \"False\" if the screen is UHD.", + "type": "boolean" + }, + "floatValue": { + "description": "Float values of the given property. For example for a TV product 1.2345. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "intValue": { + "description": "Integer values of the given property. For example, 1080 for a screen resolution of a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "maxValue": { + "description": "Maximum float value of the given property. For example for a TV product 100.00.", + "format": "float", + "type": "number" + }, + "minValue": { + "description": "Minimum float value of the given property. For example for a TV product 1.00.", + "format": "float", + "type": "number" + }, + "propertyName": { + "description": "Name of the given property. For example, \"Screen-Resolution\" for a TV product. Maximum string size is 256 characters.", + "type": "string" + }, + "textValue": { + "description": "Text value of the given property. For example, \"8K(UHD)\" could be a text value for a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order. Maximum string size is 256 characters.", + "items": { + "type": "string" + }, + "type": "array" + }, + "unitCode": { + "description": "Unit of the given property. For example, \"Pixels\" for a TV product. Maximum string size is 256 bytes.", "type": "string" } }, "type": "object" }, - "LinkService": { - "id": "LinkService", + "Collection": { + "description": "The collection message.", + "id": "Collection", "properties": { - "service": { - "description": "Service provided to or by the linked account. Acceptable values are: - \"`shoppingActionsOrderManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingAdsProductManagement`\" - \"`paymentProcessing`\" ", + "customLabel0": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns. [Custom label](https://support.google.com/merchants/answer/9674217)", "type": "string" }, - "status": { - "description": "Status of the link Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "customLabel1": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", "type": "string" - } - }, - "type": "object" - }, - "LinkedAccount": { - "id": "LinkedAccount", - "properties": { - "linkedAccountId": { - "description": "The ID of the linked account.", + }, + "customLabel2": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", "type": "string" }, - "services": { - "description": "List of provided services.", + "customLabel3": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", + "type": "string" + }, + "customLabel4": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", + "type": "string" + }, + "featuredProduct": { + "description": "This identifies one or more products associated with the collection. Used as a lookup to the corresponding product ID in your product feeds. Provide a maximum of 100 featuredProduct (for collections). Provide up to 10 featuredProduct (for Shoppable Images only) with ID and X and Y coordinates. [featured_product attribute](https://support.google.com/merchants/answer/9703736)", "items": { - "$ref": "LinkService" + "$ref": "CollectionFeaturedProduct" }, "type": "array" - } - }, - "type": "object" - }, - "ListAccountLabelsResponse": { - "description": "Response message for the `ListAccountLabels` method.", - "id": "ListAccountLabelsResponse", - "properties": { - "accountLabels": { - "description": "The labels from the specified account.", + }, + "headline": { + "description": "Your collection's name. [headline attribute](https://support.google.com/merchants/answer/9673580)", "items": { - "$ref": "AccountLabel" + "type": "string" }, "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "id": { + "description": "Required. The REST ID of the collection. Content API methods that operate on collections take this as their collectionId parameter. The REST ID for a collection is of the form collectionId. [id attribute](https://support.google.com/merchants/answer/9649290)", "type": "string" - } - }, - "type": "object" - }, - "ListAccountReturnCarrierResponse": { - "description": "Response for listing account return carriers.", - "id": "ListAccountReturnCarrierResponse", - "properties": { - "accountReturnCarriers": { - "description": "List of all available account return carriers for the merchant.", + }, + "imageLink": { + "description": "The URL of a collection’s image. [image_link attribute](https://support.google.com/merchants/answer/9703236)", "items": { - "$ref": "AccountReturnCarrier" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListCollectionStatusesResponse": { - "description": "Response message for the ListCollectionStatuses method.", - "id": "ListCollectionStatusesResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + }, + "language": { + "description": "The language of a collection and the language of any featured products linked to the collection. [language attribute](https://support.google.com/merchants/answer/9673781)", "type": "string" }, - "resources": { - "description": "The collectionstatuses listed.", - "items": { - "$ref": "CollectionStatus" - }, - "type": "array" + "link": { + "description": "A collection’s landing page. URL directly linking to your collection's page on your website. [link attribute](https://support.google.com/merchants/answer/9673983)", + "type": "string" + }, + "mobileLink": { + "description": "A collection’s mobile-optimized landing page when you have a different URL for mobile and desktop traffic. [mobile_link attribute](https://support.google.com/merchants/answer/9646123)", + "type": "string" + }, + "productCountry": { + "description": "[product_country attribute](https://support.google.com/merchants/answer/9674155)", + "type": "string" } }, "type": "object" }, - "ListCollectionsResponse": { - "description": "Response message for the ListCollections method.", - "id": "ListCollectionsResponse", + "CollectionFeaturedProduct": { + "description": "The message for FeaturedProduct. [FeaturedProduct](https://support.google.com/merchants/answer/9703736)", + "id": "CollectionFeaturedProduct", "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "offerId": { + "description": "The unique identifier for the product item.", "type": "string" }, - "resources": { - "description": "The collections listed.", - "items": { - "$ref": "Collection" - }, - "type": "array" + "x": { + "description": "Required. X-coordinate of the product callout on the Shoppable Image.", + "format": "float", + "type": "number" + }, + "y": { + "description": "Required. Y-coordinate of the product callout on the Shoppable Image.", + "format": "float", + "type": "number" } }, "type": "object" }, - "ListConversionSourcesResponse": { - "description": "Response message for the ListConversionSources method.", - "id": "ListConversionSourcesResponse", + "CollectionStatus": { + "description": "The collectionstatus message.", + "id": "CollectionStatus", "properties": { - "conversionSources": { - "description": "List of conversion sources.", + "collectionLevelIssuses": { + "description": "A list of all issues associated with the collection.", "items": { - "$ref": "ConversionSource" + "$ref": "CollectionStatusItemLevelIssue" }, "type": "array" }, - "nextPageToken": { - "description": "Token to be used to fetch the next results page.", + "creationDate": { + "description": "Date on which the collection has been created in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", "type": "string" - } - }, - "type": "object" - }, - "ListCssesResponse": { - "description": "The response message for the `ListCsses` method", - "id": "ListCssesResponse", - "properties": { - "csses": { - "description": "The CSS domains affiliated with the specified CSS group.", + }, + "destinationStatuses": { + "description": "The intended destinations for the collection.", "items": { - "$ref": "Css" + "$ref": "CollectionStatusDestinationStatus" }, "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "id": { + "description": "Required. The ID of the collection for which status is reported.", "type": "string" - } - }, - "type": "object" - }, - "ListMethodQuotasResponse": { - "description": "Response message for the ListMethodQuotas method.", - "id": "ListMethodQuotasResponse", - "properties": { - "methodQuotas": { - "description": "The current quota usage and limits per each method.", - "items": { - "$ref": "MethodQuota" - }, - "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "lastUpdateDate": { + "description": "Date on which the collection has been last updated in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", "type": "string" } }, "type": "object" }, - "ListPromotionResponse": { - "description": "Response message for Promotions.List method.", - "id": "ListPromotionResponse", + "CollectionStatusDestinationStatus": { + "description": "Destination status message.", + "id": "CollectionStatusDestinationStatus", "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "promotions": { - "description": "List of all available promotions for the merchant.", + "approvedCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is approved.", "items": { - "$ref": "Promotion" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListRegionsResponse": { - "description": "Response message for the `ListRegions` method.", - "id": "ListRegionsResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + }, + "destination": { + "description": "The name of the destination", "type": "string" }, - "regions": { - "description": "The regions from the specified merchant.", + "disapprovedCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is disapproved.", "items": { - "$ref": "Region" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListReturnPolicyOnlineResponse": { - "description": "Response message for the `ListReturnPolicyOnline` method.", - "id": "ListReturnPolicyOnlineResponse", - "properties": { - "returnPolicies": { - "description": "The retrieved return policies.", + }, + "pendingCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is pending approval.", "items": { - "$ref": "ReturnPolicyOnline" + "type": "string" }, "type": "array" + }, + "status": { + "description": "The status for the specified destination in the collections target country.", + "type": "string" } }, "type": "object" }, - "LocalInventory": { - "description": "Local inventory resource. For accepted attribute values, see the local product inventory feed specification.", - "id": "LocalInventory", + "CollectionStatusItemLevelIssue": { + "description": "Issue associated with the collection.", + "id": "CollectionStatusItemLevelIssue", "properties": { - "availability": { - "description": "The availability of the product. For accepted attribute values, see the local product inventory feed specification.", - "type": "string" - }, - "customAttributes": { - "description": "A list of custom (merchant-provided) attributes. Can also be used to submit any attribute of the feed specification in its generic form, for example, `{ \"name\": \"size type\", \"value\": \"regular\" }`.", + "applicableCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where issue applies to the offer.", "items": { - "$ref": "CustomAttribute" + "type": "string" }, "type": "array" }, - "instoreProductLocation": { - "description": "The in-store product location.", + "attributeName": { + "description": "The attribute's name, if the issue is caused by a single attribute.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localInventory`\"", + "code": { + "description": "The error code of the issue.", "type": "string" }, - "pickupMethod": { - "description": "The supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", + "description": { + "description": "A short issue description in English.", "type": "string" }, - "pickupSla": { - "description": "The expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", + "destination": { + "description": "The destination the issue applies to.", "type": "string" }, - "price": { - "$ref": "Price", - "description": "The price of the product." - }, - "quantity": { - "description": "The quantity of the product. Must be nonnegative.", - "format": "uint32", - "type": "integer" + "detail": { + "description": "A detailed issue description in English.", + "type": "string" }, - "salePrice": { - "$ref": "Price", - "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." + "documentation": { + "description": "The URL of a web page to help with resolving this issue.", + "type": "string" }, - "salePriceEffectiveDate": { - "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates may be specified as 'null' if undecided.", + "resolution": { + "description": "Whether the issue can be resolved by the merchant.", "type": "string" }, - "storeCode": { - "description": "Required. The store code of this local inventory resource.", + "servability": { + "description": "How this issue affects the serving of the collection.", "type": "string" } }, "type": "object" }, - "LocalinventoryCustomBatchRequest": { - "id": "LocalinventoryCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "LocalinventoryCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "LocalinventoryCustomBatchRequestEntry": { - "description": "Batch entry encoding a single local inventory update request.", - "id": "LocalinventoryCustomBatchRequestEntry", + "CompetitiveVisibility": { + "description": "Fields related to [competitive visibility reports] (https://support.google.com/merchants/answer/11366442).", + "id": "CompetitiveVisibility", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" + "adsOrganicRatio": { + "description": "[Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#zippy=%2Cadsfree-ratio) shows how often a merchant receives impressions from Shopping ads compared to organic traffic. The number is rounded and bucketed. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" }, - "localInventory": { - "$ref": "LocalInventory", - "description": "Local inventory of the product." + "categoryBenchmarkVisibilityTrend": { + "description": "Change in visibility based on impressions with respect to the start of the selected time range (or first day with non-zero impressions) for a combined set of merchants with highest visibility approximating the market. Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "categoryId": { + "description": "Google product category ID to calculate the report for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.category_id` is required in the query.", + "format": "int64", "type": "string" }, - "method": { - "description": "Method of the batch request entry. Acceptable values are: - \"`insert`\" ", + "countryCode": { + "description": "The country where impression appeared. Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.country_code` is required in the query.", "type": "string" }, - "productId": { - "description": "The ID of the product for which to update local inventory.", + "date": { + "$ref": "Date", + "description": "Date of this row. Available only in `CompetitiveVisibilityBenchmarkView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityMarketBenchmarkView`." + }, + "domain": { + "description": "Domain of your competitor or your domain, if 'is_your_domain' is true. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", "type": "string" - } - }, - "type": "object" - }, - "LocalinventoryCustomBatchResponse": { - "id": "LocalinventoryCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "LocalinventoryCustomBatchResponseEntry" - }, - "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponse`\".", + "higherPositionRate": { + "description": "Higher position rate shows how often a competitor’s offer got placed in a higher position on the page than your offer. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "isYourDomain": { + "description": "True if this row contains data for your domain. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "type": "boolean" + }, + "pageOverlapRate": { + "description": "Page overlap rate describes how frequently competing retailers’ offers are shown together with your offers on the same page. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "rank": { + "description": "Position of the domain in the top merchants ranking for the selected keys (`date`, `category_id`, `country_code`, `listing_type`) based on impressions. 1 is the highest. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "uint64", + "type": "string" + }, + "relativeVisibility": { + "description": "Relative visibility shows how often your competitors’ offers are shown compared to your offers. In other words, this is the number of displayed impressions of a competitor retailer divided by the number of your displayed impressions during a selected time range for a selected product category and country. Available only in `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "trafficSource": { + "description": "Type of impression listing. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.", + "enum": [ + "UNKNOWN", + "ORGANIC", + "ADS", + "ALL" + ], + "enumDescriptions": [ + "Traffic source is unknown.", + "Organic traffic.", + "Traffic from Ads.", + "Organic and Ads traffic." + ], "type": "string" + }, + "yourDomainVisibilityTrend": { + "description": "Change in visibility based on impressions for your domain with respect to the start of the selected time range (or first day with non-zero impressions). Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" } }, "type": "object" }, - "LocalinventoryCustomBatchResponseEntry": { - "description": "Batch entry encoding a single local inventory update response.", - "id": "LocalinventoryCustomBatchResponseEntry", + "ConversionSource": { + "description": "Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.", + "id": "ConversionSource", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" + "conversionSourceId": { + "description": "Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.", + "readOnly": true, + "type": "string" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + "expireTime": { + "description": "Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponseEntry`\"", + "googleAnalyticsLink": { + "$ref": "GoogleAnalyticsLink", + "description": "Immutable. Conversion Source of type \"Link to Google Analytics Property\"." + }, + "merchantCenterDestination": { + "$ref": "MerchantCenterDestination", + "description": "Conversion Source of type \"Merchant Center Tag Destination\"." + }, + "state": { + "description": "Output only. Current state of this conversion source. Can't be edited through the API.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PENDING" + ], + "enumDescriptions": [ + "", + "Conversion source is fully functional.", + "Conversion source has been archived in the last 30 days and not currently functional. Can be restored using the undelete method.", + "Conversion source creation has started but not fully finished yet." + ], + "readOnly": true, "type": "string" } }, "type": "object" }, - "LocationIdSet": { - "id": "LocationIdSet", + "Css": { + "description": "Information about CSS domain.", + "id": "Css", "properties": { - "locationIds": { - "description": "A non-empty list of location IDs. They must all be of the same location type (for example, state).", + "cssDomainId": { + "description": "Output only. Immutable. The CSS domain ID.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "cssGroupId": { + "description": "Output only. Immutable. The ID of the CSS group this CSS domain is affiliated with. Only populated for CSS group users.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. Immutable. The CSS domain's display name, used when space is constrained.", + "readOnly": true, + "type": "string" + }, + "fullName": { + "description": "Output only. Immutable. The CSS domain's full name.", + "readOnly": true, + "type": "string" + }, + "homepageUri": { + "description": "Output only. Immutable. The CSS domain's homepage.", + "readOnly": true, + "type": "string" + }, + "labelIds": { + "description": "A list of label IDs that are assigned to this CSS domain by its CSS group. Only populated for CSS group users.", "items": { + "format": "int64", "type": "string" }, "type": "array" @@ -10793,2603 +7038,2486 @@ }, "type": "object" }, - "LoyaltyProgram": { - "description": "Allows the setting up of loyalty program benefits (for example price or points). https://support.google.com/merchants/answer/12922446", - "id": "LoyaltyProgram", + "CustomAttribute": { + "description": "A message that represents custom attributes. Exactly one of `value` or `groupValues` must be provided. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per merchant, with total size of 102.4kB.", + "id": "CustomAttribute", "properties": { - "cashbackForFutureUse": { - "$ref": "Price", - "description": "Optional. The cashback that can be used for future purchases." - }, - "loyaltyPoints": { - "description": "Optional. The amount of loyalty points earned on a purchase.", - "format": "int64", - "type": "string" - }, - "memberPriceEffectiveDate": { - "description": "Optional. A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Optional. The price for members of the given tier (instant discount price). Must be smaller or equal to the regular price." + "groupValues": { + "description": "Subattributes within this attribute group. Exactly one of value or groupValues must be provided.", + "items": { + "$ref": "CustomAttribute" + }, + "type": "array" }, - "programLabel": { - "description": "Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", + "name": { + "description": "The name of the attribute. Underscores will be replaced by spaces upon insertion.", "type": "string" }, - "tierLabel": { - "description": "Required. The label of the tier within the loyalty program. Must match one of the labels within the program.", + "value": { + "description": "The value of the attribute.", "type": "string" } }, "type": "object" }, - "MerchantCenterDestination": { - "description": "\"Merchant Center Destination\" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created.", - "id": "MerchantCenterDestination", + "CutoffTime": { + "id": "CutoffTime", "properties": { - "attributionSettings": { - "$ref": "AttributionSettings", - "description": "Required. Attribution settings being used for the Merchant Center Destination." - }, - "currencyCode": { - "description": "Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.", - "type": "string" + "hour": { + "description": "Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.", + "format": "uint32", + "type": "integer" }, - "destinationId": { - "description": "Output only. Merchant Center Destination ID.", - "readOnly": true, - "type": "string" + "minute": { + "description": "Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.", + "format": "uint32", + "type": "integer" }, - "displayName": { - "description": "Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.", + "timezone": { + "description": "Timezone identifier for the cutoff time (for example, \"Europe/Zurich\"). List of identifiers. Required.", "type": "string" } }, "type": "object" }, - "MerchantOrderReturn": { - "description": "Order return. Production access (all methods) requires the order manager role. Sandbox access does not.", - "id": "MerchantOrderReturn", + "Datafeed": { + "description": "Datafeed configuration data.", + "id": "Datafeed", "properties": { - "creationDate": { - "description": "The date of creation of the return, in ISO 8601 format.", + "attributeLanguage": { + "description": "The two-letter ISO 639-1 language in which the attributes are defined in the data feed.", "type": "string" }, - "merchantOrderId": { - "description": "Merchant defined order ID.", + "contentType": { + "description": "Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. Acceptable values are: - \"`local products`\" - \"`product inventory`\" - \"`products`\" ", "type": "string" }, - "orderId": { - "description": "Google order ID.", + "fetchSchedule": { + "$ref": "DatafeedFetchSchedule", + "description": "Fetch schedule for the feed file." + }, + "fileName": { + "description": "Required. The filename of the feed. All feeds must have a unique file name.", "type": "string" }, - "orderReturnId": { - "description": "Order return ID generated by Google.", + "format": { + "$ref": "DatafeedFormat", + "description": "Format of the feed file." + }, + "id": { + "description": "Required for update. The ID of the data feed.", + "format": "int64", "type": "string" }, - "returnItems": { - "description": "Items of the return.", - "items": { - "$ref": "MerchantOrderReturnItem" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeed`\"", + "type": "string" }, - "returnPricingInfo": { - "$ref": "ReturnPricingInfo", - "description": "Information about shipping costs." + "name": { + "description": "Required for insert. A descriptive name of the data feed.", + "type": "string" }, - "returnShipments": { - "description": "Shipments of the return.", + "targets": { + "description": "The targets this feed should apply to (country, language, destinations).", "items": { - "$ref": "ReturnShipment" + "$ref": "DatafeedTarget" }, "type": "array" } }, "type": "object" }, - "MerchantOrderReturnItem": { - "id": "MerchantOrderReturnItem", + "DatafeedFetchSchedule": { + "description": "The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.", + "id": "DatafeedFetchSchedule", "properties": { - "customerReturnReason": { - "$ref": "CustomerReturnReason", - "description": "The reason that the customer chooses to return an item." + "dayOfMonth": { + "description": "The day of the month the feed file should be fetched (1-31).", + "format": "uint32", + "type": "integer" }, - "itemId": { - "description": "Product level item ID. If the returned items are of the same product, they will have the same ID.", + "fetchUrl": { + "description": "The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.", "type": "string" }, - "merchantRejectionReason": { - "$ref": "MerchantRejectionReason", - "description": "The reason that the merchant chose to reject an item return." - }, - "merchantReturnReason": { - "$ref": "RefundReason", - "description": "The reason that merchant chooses to accept a return item." - }, - "product": { - "$ref": "OrderLineItemProduct", - "description": "Product data from the time of the order placement." + "hour": { + "description": "The hour of the day the feed file should be fetched (0-23).", + "format": "uint32", + "type": "integer" }, - "refundableAmount": { - "$ref": "MonetaryAmount", - "description": "Maximum amount that can be refunded for this return item." + "minuteOfHour": { + "description": "The minute of the hour the feed file should be fetched (0-59). Read-only.", + "format": "uint32", + "type": "integer" }, - "returnItemId": { - "description": "Unit level ID for the return item. Different units of the same product will have different IDs.", + "password": { + "description": "An optional password for fetch_url.", "type": "string" }, - "returnShipmentIds": { - "description": "IDs of the return shipments that this return item belongs to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "shipmentGroupId": { - "description": "ID of the original shipment group. Provided for shipments with invoice support.", - "type": "string" + "paused": { + "description": "Whether the scheduled fetch is paused or not.", + "type": "boolean" }, - "shipmentUnitId": { - "description": "ID of the shipment unit assigned by the merchant. Provided for shipments with invoice support.", + "timeZone": { + "description": "Time zone used for schedule. UTC by default. For example, \"America/Los_Angeles\".", "type": "string" }, - "state": { - "description": "State of the item. Acceptable values are: - \"`canceled`\" - \"`new`\" - \"`received`\" - \"`refunded`\" - \"`rejected`\" ", - "type": "string" - } - }, - "type": "object" - }, - "MerchantRejectionReason": { - "id": "MerchantRejectionReason", - "properties": { - "description": { - "description": "Description of the reason.", + "username": { + "description": "An optional user name for fetch_url.", "type": "string" }, - "reasonCode": { - "description": "Code of the rejection reason.", + "weekday": { + "description": "The day of the week the feed file should be fetched. Acceptable values are: - \"`monday`\" - \"`tuesday`\" - \"`wednesday`\" - \"`thursday`\" - \"`friday`\" - \"`saturday`\" - \"`sunday`\" ", "type": "string" } }, "type": "object" }, - "MethodQuota": { - "description": "The quota information per method in the Content API.", - "id": "MethodQuota", + "DatafeedFormat": { + "id": "DatafeedFormat", "properties": { - "method": { - "description": "Output only. The method name, for example `products.list`. Method name does not contain version because quota can be shared between different API versions of the same method.", - "readOnly": true, - "type": "string" - }, - "quotaLimit": { - "description": "Output only. The maximum number of calls allowed per day for the method.", - "format": "int64", - "readOnly": true, + "columnDelimiter": { + "description": "Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`pipe`\" - \"`tab`\" - \"`tilde`\" ", "type": "string" }, - "quotaMinuteLimit": { - "description": "Output only. The maximum number of calls allowed per minute for the method.", - "format": "int64", - "readOnly": true, + "fileEncoding": { + "description": "Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. Acceptable values are: - \"`latin-1`\" - \"`utf-16be`\" - \"`utf-16le`\" - \"`utf-8`\" - \"`windows-1252`\" ", "type": "string" }, - "quotaUsage": { - "description": "Output only. The current quota usage, meaning the number of calls already made to the method per day. Usage is reset every day at 12 PM midday UTC.", - "format": "int64", - "readOnly": true, + "quotingMode": { + "description": "Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`normal character`\" - \"`value quoting`\" ", "type": "string" } }, "type": "object" }, - "Metrics": { - "description": "Performance metrics. Values are only set for metrics requested explicitly in the request's search query.", - "id": "Metrics", + "DatafeedStatus": { + "description": "The status of a datafeed, that is, the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.", + "id": "DatafeedStatus", "properties": { - "aos": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "aovMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order value in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "clicks": { - "description": "Number of clicks.", - "format": "int64", - "type": "string" - }, - "conversionRate": { - "description": "Number of conversions divided by the number of clicks, reported on the impression date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", - "format": "double", - "type": "number" - }, - "conversionValueMicros": { - "description": "Value of conversions in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) attributed to the product, reported on the conversion date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", - "format": "int64", - "type": "string" - }, - "conversions": { - "description": "Number of conversions attributed to the product, reported on the conversion date. Depending on the attribution model, a conversion might be distributed across multiple clicks, where each click gets its own credit assigned. This metric is a sum of all such credits. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", - "format": "double", - "type": "number" - }, - "ctr": { - "description": "Click-through rate - the number of clicks merchant's products receive (clicks) divided by the number of times the products are shown (impressions).", - "format": "double", - "type": "number" - }, - "daysToShip": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "impressions": { - "description": "Number of times merchant's products are shown.", - "format": "int64", + "country": { + "description": "The country for which the status is reported, represented as a CLDR territory code.", "type": "string" }, - "itemDaysToShip": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an item being ordered and the item being **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "itemFillRate": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "orderedItemSalesMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros). Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "datafeedId": { + "description": "The ID of the feed for which the status is reported.", + "format": "uint64", "type": "string" }, - "orderedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", - "type": "string" + "errors": { + "description": "The list of errors occurring in the feed.", + "items": { + "$ref": "DatafeedStatusError" + }, + "type": "array" }, - "orders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "int64", + "feedLabel": { + "description": "The feed label status is reported for.", "type": "string" }, - "rejectedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items canceled by the merchant, reported on the order date. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "itemsTotal": { + "description": "The number of items in the feed that were processed.", + "format": "uint64", "type": "string" }, - "returnRate": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "returnedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items sent back for return, reported on the date when the merchant accepted the return. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "itemsValid": { + "description": "The number of items in the feed that were valid.", + "format": "uint64", "type": "string" }, - "returnsMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items sent back for return in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedStatus`\"", "type": "string" }, - "shippedItemSalesMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of shipped items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "language": { + "description": "The two-letter ISO 639-1 language for which the status is reported.", "type": "string" }, - "shippedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of shipped items, reported on the shipment date. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "lastUploadDate": { + "description": "The last date at which the feed was uploaded.", "type": "string" }, - "shippedOrders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "int64", + "processingStatus": { + "description": "The processing status of the feed. Acceptable values are: - \"`\"`failure`\": The feed could not be processed or all items had errors.`\" - \"`in progress`\": The feed is being processed. - \"`none`\": The feed has not yet been processed. For example, a feed that has never been uploaded will have this processing status. - \"`success`\": The feed was processed successfully, though some items might have had errors. ", "type": "string" }, - "unshippedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "unshippedOrders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "MinimumOrderValueTable": { - "id": "MinimumOrderValueTable", - "properties": { - "storeCodeSetWithMovs": { + "warnings": { + "description": "The list of errors occurring in the feed.", "items": { - "$ref": "MinimumOrderValueTableStoreCodeSetWithMov" + "$ref": "DatafeedStatusError" }, "type": "array" } }, "type": "object" }, - "MinimumOrderValueTableStoreCodeSetWithMov": { - "description": "A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency.", - "id": "MinimumOrderValueTableStoreCodeSetWithMov", + "DatafeedStatusError": { + "description": "An error occurring in the feed, like \"invalid price\".", + "id": "DatafeedStatusError", "properties": { - "storeCodes": { - "description": "A list of unique store codes or empty for the catch all.", + "code": { + "description": "The code of the error, for example, \"validation/invalid_value\".", + "type": "string" + }, + "count": { + "description": "The number of occurrences of the error in the feed.", + "format": "uint64", + "type": "string" + }, + "examples": { + "description": "A list of example occurrences of the error, grouped by product.", "items": { - "type": "string" + "$ref": "DatafeedStatusExample" }, "type": "array" }, - "value": { - "$ref": "Price", - "description": "The minimum order value for the given stores." + "message": { + "description": "The error message, for example, \"Invalid price\".", + "type": "string" } }, "type": "object" }, - "MonetaryAmount": { - "id": "MonetaryAmount", + "DatafeedStatusExample": { + "description": "An example occurrence for a particular error.", + "id": "DatafeedStatusExample", "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax price depends on the location of the order. - For countries (for example, \"US\". where price attribute excludes tax, this field corresponds to the pre-tax value. - For coutries (for example, \"France\") where price attribute includes tax, this field corresponds to the post-tax value ." + "itemId": { + "description": "The ID of the example item.", + "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "Tax value, present only for countries where price attribute excludes tax (for example, \"US\". No tax is referenced as 0 value with the corresponding `currency`." - } - }, - "type": "object" - }, - "OnboardBuyOnGoogleProgramRequest": { - "description": "Request message for the OnboardProgram method.", - "id": "OnboardBuyOnGoogleProgramRequest", - "properties": { - "customerServiceEmail": { - "description": "The customer service email.", + "lineNumber": { + "description": "Line number in the data feed where the example is found.", + "format": "uint64", + "type": "string" + }, + "value": { + "description": "The problematic value.", "type": "string" } }, "type": "object" }, - "Order": { - "description": "Order. Production access (all methods) requires the order manager role. Sandbox access does not.", - "id": "Order", + "DatafeedTarget": { + "id": "DatafeedTarget", "properties": { - "acknowledged": { - "description": "Whether the order was acknowledged.", - "type": "boolean" + "country": { + "description": "Deprecated. Use `feedLabel` instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.", + "type": "string" }, - "annotations": { - "description": "List of key-value pairs that are attached to a given order.", + "excludedDestinations": { + "description": "The list of [destinations to exclude](//support.google.com/merchants/answer/6324486) for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted.", "items": { - "$ref": "OrderOrderAnnotation" + "type": "string" }, "type": "array" }, - "billingAddress": { - "$ref": "OrderAddress", - "description": "The billing address." - }, - "customer": { - "$ref": "OrderCustomer", - "description": "The details of the customer who placed the order." - }, - "deliveryDetails": { - "$ref": "OrderDeliveryDetails", - "description": "Delivery details for shipments of type `delivery`." - }, - "id": { - "description": "The REST ID of the order. Globally unique.", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#order`\"", + "feedLabel": { + "description": "Feed label for the DatafeedTarget. Either `country` or `feedLabel` is required. If both `feedLabel` and `country` is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).", "type": "string" }, - "lineItems": { - "description": "Line items that are ordered.", + "includedDestinations": { + "description": "The list of [destinations to include](//support.google.com/merchants/answer/7501026) for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.", "items": { - "$ref": "OrderLineItem" + "type": "string" }, "type": "array" }, - "merchantId": { - "format": "uint64", - "type": "string" - }, - "merchantOrderId": { - "description": "Merchant-provided ID of the order.", - "type": "string" - }, - "netPriceAmount": { - "$ref": "Price", - "description": "The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80." - }, - "netTaxAmount": { - "$ref": "Price", - "description": "The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds." - }, - "paymentStatus": { - "description": "The status of the payment. Acceptable values are: - \"`paymentCaptured`\" - \"`paymentRejected`\" - \"`paymentSecured`\" - \"`pendingAuthorization`\" ", - "type": "string" - }, - "pickupDetails": { - "$ref": "OrderPickupDetails", - "description": "Pickup details for shipments of type `pickup`." - }, - "placedDate": { - "description": "The date when the order was placed, in ISO 8601 format.", + "language": { + "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targets[].country`.", "type": "string" }, - "promotions": { - "description": "Promotions associated with the order. To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here.", - "items": { - "$ref": "OrderPromotion" - }, - "type": "array" - }, - "refunds": { - "description": "Refunds for the order.", + "targetCountries": { + "description": "The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for \"product inventory\" feeds.", "items": { - "$ref": "OrderRefund" + "type": "string" }, "type": "array" - }, - "shipments": { - "description": "Shipments of the order.", + } + }, + "type": "object" + }, + "DatafeedsCustomBatchRequest": { + "id": "DatafeedsCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "OrderShipment" + "$ref": "DatafeedsCustomBatchRequestEntry" }, "type": "array" + } + }, + "type": "object" + }, + "DatafeedsCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch datafeeds request.", + "id": "DatafeedsCustomBatchRequestEntry", + "properties": { + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" }, - "shippingCost": { - "$ref": "Price", - "description": "The total cost of shipping for all items." + "datafeed": { + "$ref": "Datafeed", + "description": "The data feed to insert." }, - "shippingCostTax": { - "$ref": "Price", - "description": "The tax for the total shipping cost." + "datafeedId": { + "description": "The ID of the data feed to get, delete or fetch.", + "format": "uint64", + "type": "string" }, - "status": { - "description": "The status of the order. Acceptable values are: - \"`canceled`\" - \"`delivered`\" - \"`inProgress`\" - \"`partiallyDelivered`\" - \"`partiallyReturned`\" - \"`partiallyShipped`\" - \"`pendingShipment`\" - \"`returned`\" - \"`shipped`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "taxCollector": { - "description": "The party responsible for collecting and remitting taxes. Acceptable values are: - \"`marketplaceFacilitator`\" - \"`merchant`\" ", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`delete`\" - \"`fetchNow`\" - \"`get`\" - \"`insert`\" - \"`update`\" ", "type": "string" } }, "type": "object" }, - "OrderAddress": { - "id": "OrderAddress", + "DatafeedsCustomBatchResponse": { + "id": "DatafeedsCustomBatchResponse", "properties": { - "country": { - "description": "CLDR country code (for example, \"US\").", - "type": "string" - }, - "fullAddress": { - "description": "Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States ", + "entries": { + "description": "The result of the execution of the batch requests.", "items": { - "type": "string" + "$ref": "DatafeedsCustomBatchResponseEntry" }, "type": "array" }, - "isPostOfficeBox": { - "description": "Whether the address is a post office box.", - "type": "boolean" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsCustomBatchResponse`\".", "type": "string" + } + }, + "type": "object" + }, + "DatafeedsCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch datafeeds response.", + "id": "DatafeedsCustomBatchResponseEntry", + "properties": { + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "postalCode": { - "description": "Postal Code or ZIP (for example, \"94043\").", - "type": "string" + "datafeed": { + "$ref": "Datafeed", + "description": "The requested data feed. Defined if and only if the request was successful." }, - "recipientName": { - "description": "Name of the recipient.", + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + } + }, + "type": "object" + }, + "DatafeedsFetchNowResponse": { + "id": "DatafeedsFetchNowResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsFetchNowResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "DatafeedsListResponse": { + "id": "DatafeedsListResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsListResponse`\".", "type": "string" }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", + "nextPageToken": { + "description": "The token for the retrieval of the next page of datafeeds.", "type": "string" }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", + "resources": { "items": { - "type": "string" + "$ref": "Datafeed" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatafeedstatusesCustomBatchRequest": { + "id": "DatafeedstatusesCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "DatafeedstatusesCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "OrderCancellation": { - "id": "OrderCancellation", + "DatafeedstatusesCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch datafeedstatuses request.", + "id": "DatafeedstatusesCustomBatchRequestEntry", "properties": { - "actor": { - "description": "The actor that created the cancellation. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "country": { + "description": "Deprecated. Use `feedLabel` instead. The country to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", + "type": "string" + }, + "datafeedId": { + "description": "The ID of the data feed to get.", + "format": "uint64", "type": "string" }, - "creationDate": { - "description": "Date on which the cancellation has been created, in ISO 8601 format.", + "feedLabel": { + "description": "The feed label to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", "type": "string" }, - "quantity": { - "description": "The quantity that was canceled.", - "format": "uint32", - "type": "integer" + "language": { + "description": "The language to get the datafeed status for. If this parameter is provided then `country` must also be provided. Note that for multi-target datafeeds this parameter is required.", + "type": "string" }, - "reason": { - "description": "The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This won't affect your Shopping ads. Acceptable values are: - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`customerCanceled`\" - \"`customerInitiatedCancel`\" - \"`customerSupportRequested`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceError`\" - \"`returnRefundAbuse`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", "type": "string" } }, "type": "object" }, - "OrderCustomer": { - "id": "OrderCustomer", + "DatafeedstatusesCustomBatchResponse": { + "id": "DatafeedstatusesCustomBatchResponse", "properties": { - "fullName": { - "description": "Full name of the customer.", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "DatafeedstatusesCustomBatchResponseEntry" + }, + "type": "array" }, - "invoiceReceivingEmail": { - "description": "Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesCustomBatchResponse`\".", "type": "string" - }, - "loyaltyInfo": { - "$ref": "OrderCustomerLoyaltyInfo", - "description": "Loyalty program information." - }, - "marketingRightsInfo": { - "$ref": "OrderCustomerMarketingRightsInfo", - "description": "Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order." } }, "type": "object" }, - "OrderCustomerLoyaltyInfo": { - "id": "OrderCustomerLoyaltyInfo", + "DatafeedstatusesCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch datafeedstatuses response.", + "id": "DatafeedstatusesCustomBatchResponseEntry", "properties": { - "loyaltyNumber": { - "description": "The loyalty card/membership number.", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "name": { - "description": "Name of card/membership holder, this field will be populated when", - "type": "string" + "datafeedStatus": { + "$ref": "DatafeedStatus", + "description": "The requested data feed status. Defined if and only if the request was successful." + }, + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" }, - "OrderCustomerMarketingRightsInfo": { - "id": "OrderCustomerMarketingRightsInfo", + "DatafeedstatusesListResponse": { + "id": "DatafeedstatusesListResponse", "properties": { - "explicitMarketingPreference": { - "description": "Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected `granted` in their most recent order, they can be subscribed to marketing emails. Customers who have chosen `denied` must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - \"`denied`\" - \"`granted`\" ", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesListResponse`\".", "type": "string" }, - "lastUpdatedTimestamp": { - "description": "Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of datafeed statuses.", "type": "string" }, - "marketingEmailAddress": { - "description": "Email address that can be used for marketing purposes. The field may be empty even if `explicitMarketingPreference` is 'granted'. This happens when retrieving an old order from the customer who deleted their account.", - "type": "string" + "resources": { + "items": { + "$ref": "DatafeedStatus" + }, + "type": "array" } }, "type": "object" }, - "OrderDeliveryDetails": { - "id": "OrderDeliveryDetails", + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", "properties": { - "address": { - "$ref": "OrderAddress", - "description": "The delivery address" + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" }, - "phoneNumber": { - "description": "The phone number of the person receiving the delivery.", - "type": "string" + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "OrderLineItem": { - "id": "OrderLineItem", + "DateTime": { + "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", + "id": "DateTime", "properties": { - "adjustments": { - "description": "Price and tax adjustments applied on the line item.", - "items": { - "$ref": "OrderLineItemAdjustment" - }, - "type": "array" - }, - "annotations": { - "description": "Annotations that are attached to the line item.", - "items": { - "$ref": "OrderMerchantProvidedAnnotation" - }, - "type": "array" - }, - "cancellations": { - "description": "Cancellations of the line item.", - "items": { - "$ref": "OrderCancellation" - }, - "type": "array" - }, - "id": { - "description": "The ID of the line item.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20." - }, - "product": { - "$ref": "OrderLineItemProduct", - "description": "Product data as seen by customer from the time of the order placement. Note that certain attributes values (for example, title or gtin) might be reformatted and no longer match values submitted through product feed." - }, - "quantityCanceled": { - "description": "Number of items canceled.", - "format": "uint32", - "type": "integer" - }, - "quantityDelivered": { - "description": "Number of items delivered.", - "format": "uint32", - "type": "integer" - }, - "quantityOrdered": { - "description": "Number of items ordered.", - "format": "uint32", + "day": { + "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", + "format": "int32", "type": "integer" }, - "quantityPending": { - "description": "Number of items pending.", - "format": "uint32", + "hours": { + "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", "type": "integer" }, - "quantityReadyForPickup": { - "description": "Number of items ready for pickup.", - "format": "uint32", + "minutes": { + "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", + "format": "int32", "type": "integer" }, - "quantityReturned": { - "description": "Number of items returned.", - "format": "uint32", + "month": { + "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", + "format": "int32", "type": "integer" }, - "quantityShipped": { - "description": "Number of items shipped.", - "format": "uint32", + "nanos": { + "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", + "format": "int32", "type": "integer" }, - "quantityUndeliverable": { - "description": "Number of items undeliverable.", - "format": "uint32", + "seconds": { + "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", "type": "integer" }, - "returnInfo": { - "$ref": "OrderLineItemReturnInfo", - "description": "Details of the return policy for the line item." - }, - "returns": { - "description": "Returns of the line item.", - "items": { - "$ref": "OrderReturn" - }, - "type": "array" + "timeZone": { + "$ref": "TimeZone", + "description": "Time zone." }, - "shippingDetails": { - "$ref": "OrderLineItemShippingDetails", - "description": "Details of the requested shipping for the line item." + "utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "type": "string" }, - "tax": { - "$ref": "Price", - "description": "Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4." + "year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "OrderLineItemAdjustment": { - "id": "OrderLineItemAdjustment", + "DeliveryArea": { + "description": "A delivery area for the product. Only one of `countryCode` or `postalCodeRange` must be set.", + "id": "DeliveryArea", "properties": { - "priceAdjustment": { - "$ref": "Price", - "description": "Adjustment for total price of the line item." + "countryCode": { + "description": "Required. The country that the product can be delivered to. Submit a [unicode CLDR region](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) such as `US` or `CH`.", + "type": "string" }, - "taxAdjustment": { - "$ref": "Price", - "description": "Adjustment for total tax of the line item." + "postalCodeRange": { + "$ref": "DeliveryAreaPostalCodeRange", + "description": "A postal code, postal code range or postal code prefix that defines this area. Limited to US and AUS." }, - "type": { - "description": "Type of this adjustment. Acceptable values are: - \"`promotion`\" ", + "regionCode": { + "description": "A state, territory, or prefecture. This is supported for the United States, Australia, and Japan. Provide a subdivision code from the ISO 3166-2 code tables ([US](https://en.wikipedia.org/wiki/ISO_3166-2:US), [AU](https://en.wikipedia.org/wiki/ISO_3166-2:AU), or [JP](https://en.wikipedia.org/wiki/ISO_3166-2:JP)) without country prefix (for example, `\"NY\"`, `\"NSW\"`, `\"03\"`).", "type": "string" } }, "type": "object" }, - "OrderLineItemProduct": { - "id": "OrderLineItemProduct", + "DeliveryAreaPostalCodeRange": { + "description": "A range of postal codes that defines the delivery area. Only set `firstPostalCode` when specifying a single postal code.", + "id": "DeliveryAreaPostalCodeRange", "properties": { - "brand": { - "description": "Brand of the item.", + "firstPostalCode": { + "description": "Required. A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: `\"94108\"`, `\"9410*\"`, `\"9*\"`.", "type": "string" }, - "condition": { - "description": "Condition or state of the item. Acceptable values are: - \"`new`\" - \"`refurbished`\" - \"`used`\" ", + "lastPostalCode": { + "description": "A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area (for example [070* - 078*] results in the range [07000 - 07899]). It must have the same length as `firstPostalCode`: if `firstPostalCode` is a postal code then `lastPostalCode` must be a postal code too; if firstPostalCode is a pattern then `lastPostalCode` must be a pattern with the same prefix length. Ignored if not set, then the area is defined as being all the postal codes matching `firstPostalCode`.", "type": "string" + } + }, + "type": "object" + }, + "DeliveryTime": { + "id": "DeliveryTime", + "properties": { + "cutoffTime": { + "$ref": "CutoffTime", + "description": "Business days cutoff time definition. If not configured, the cutoff time will be defaulted to 8AM PST. If local delivery, use Service.StoreConfig.CutoffConfig." }, - "contentLanguage": { - "description": "The two-letter ISO 639-1 language code for the item.", - "type": "string" + "handlingBusinessDayConfig": { + "$ref": "BusinessDayConfig", + "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed." }, - "fees": { - "description": "Associated fees at order creation time.", + "holidayCutoffs": { + "description": "Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.", "items": { - "$ref": "OrderLineItemProductFee" + "$ref": "HolidayCutoff" }, "type": "array" }, - "gtin": { - "description": "Global Trade Item Number (GTIN) of the item.", - "type": "string" - }, - "id": { - "description": "The REST ID of the product.", - "type": "string" - }, - "imageLink": { - "description": "URL of an image of the item.", - "type": "string" - }, - "itemGroupId": { - "description": "Shared identifier for all variants of the same product.", - "type": "string" - }, - "mpn": { - "description": "Manufacturer Part Number (MPN) of the item.", - "type": "string" + "maxHandlingTimeInDays": { + "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `minHandlingTimeInDays`.", + "format": "uint32", + "type": "integer" }, - "offerId": { - "description": "An identifier of the item.", - "type": "string" + "maxTransitTimeInDays": { + "description": "Maximum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `minTransitTimeInDays`.", + "format": "uint32", + "type": "integer" }, - "price": { - "$ref": "Price", - "description": "Price of the item." + "minHandlingTimeInDays": { + "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.", + "format": "uint32", + "type": "integer" }, - "shownImage": { - "description": "URL to the cached image shown to the user when order was placed.", - "type": "string" + "minTransitTimeInDays": { + "description": "Minimum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be set, but not both.", + "format": "uint32", + "type": "integer" }, - "targetCountry": { - "description": "The CLDR territory code of the target country of the product.", - "type": "string" + "transitBusinessDayConfig": { + "$ref": "BusinessDayConfig", + "description": "The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed." }, - "title": { - "description": "The title of the product.", - "type": "string" + "transitTimeTable": { + "$ref": "TransitTable", + "description": "Transit time table, number of business days spent in transit based on row and column dimensions. Either `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but not both." }, - "variantAttributes": { - "description": "Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here.", + "warehouseBasedDeliveryTimes": { + "description": "Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in DeliveryTime should be set.", "items": { - "$ref": "OrderLineItemProductVariantAttribute" + "$ref": "WarehouseBasedDeliveryTime" }, "type": "array" } }, "type": "object" }, - "OrderLineItemProductFee": { - "id": "OrderLineItemProductFee", - "properties": { - "amount": { - "$ref": "Price", - "description": "Amount of the fee." - }, - "name": { - "description": "Name of the fee.", - "type": "string" - } - }, - "type": "object" - }, - "OrderLineItemProductVariantAttribute": { - "id": "OrderLineItemProductVariantAttribute", + "Distance": { + "description": "Distance represented by an integer and unit.", + "id": "Distance", "properties": { - "dimension": { - "description": "The dimension of the variant.", + "unit": { + "description": "The distance unit. Acceptable values are `None`, `Miles`, and `Kilometers`.", "type": "string" }, "value": { - "description": "The value for the dimension.", + "description": "The distance represented as a number.", + "format": "int64", "type": "string" } }, "type": "object" }, - "OrderLineItemReturnInfo": { - "id": "OrderLineItemReturnInfo", + "ECommercePlatformLinkInfo": { + "description": "Additional information required for E_COMMERCE_PLATFORM link type.", + "id": "ECommercePlatformLinkInfo", "properties": { - "daysToReturn": { - "description": "Required. How many days later the item can be returned.", - "format": "int32", - "type": "integer" - }, - "isReturnable": { - "description": "Required. Whether the item is returnable.", - "type": "boolean" - }, - "policyUrl": { - "description": "Required. URL of the item return policy.", + "externalAccountId": { + "description": "The id used by the third party service provider to identify the merchant.", "type": "string" } }, "type": "object" }, - "OrderLineItemShippingDetails": { - "id": "OrderLineItemShippingDetails", + "Error": { + "description": "An error returned by the API.", + "id": "Error", "properties": { - "deliverByDate": { - "description": "Required. The delivery by date, in ISO 8601 format.", + "domain": { + "description": "The domain of the error.", "type": "string" }, - "method": { - "$ref": "OrderLineItemShippingDetailsMethod", - "description": "Required. Details of the shipping method." - }, - "pickupPromiseInMinutes": { - "description": "The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order.", - "format": "uint32", - "type": "integer" - }, - "shipByDate": { - "description": "Required. The ship by date, in ISO 8601 format.", + "message": { + "description": "A description of the error.", "type": "string" }, - "type": { - "description": "Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - \"`delivery`\" - \"`pickup`\" ", + "reason": { + "description": "The error code.", "type": "string" } }, "type": "object" }, - "OrderLineItemShippingDetailsMethod": { - "id": "OrderLineItemShippingDetailsMethod", + "Errors": { + "description": "A list of errors returned by a failed batch entry.", + "id": "Errors", "properties": { - "carrier": { - "description": "The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values.", - "type": "string" - }, - "maxDaysInTransit": { - "description": "Required. Maximum transit time.", + "code": { + "description": "The HTTP status of the first error in `errors`.", "format": "uint32", "type": "integer" }, - "methodName": { - "description": "Required. The name of the shipping method.", - "type": "string" - }, - "minDaysInTransit": { - "description": "Required. Minimum transit time.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "OrderMerchantProvidedAnnotation": { - "id": "OrderMerchantProvidedAnnotation", - "properties": { - "key": { - "description": "Key for additional merchant provided (as key-value pairs) annotation about the line item.", - "type": "string" + "errors": { + "description": "A list of errors.", + "items": { + "$ref": "Error" + }, + "type": "array" }, - "value": { - "description": "Value for additional merchant provided (as key-value pairs) annotation about the line item.", + "message": { + "description": "The message of the first error in `errors`.", "type": "string" } }, "type": "object" }, - "OrderOrderAnnotation": { - "id": "OrderOrderAnnotation", + "ExternalAction": { + "description": "Action that is implemented and performed outside of the third-party application. It should redirect the merchant to the provided URL of an external system where they can perform the action. For example to request a review in the Merchant Center.", + "id": "ExternalAction", "properties": { - "key": { - "description": "Key for additional google provided (as key-value pairs) annotation.", + "type": { + "description": "The type of external action.", + "enum": [ + "EXTERNAL_ACTION_TYPE_UNSPECIFIED", + "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER", + "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER", + "LEGAL_APPEAL_IN_HELP_CENTER", + "VERIFY_IDENTITY_IN_MERCHANT_CENTER" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their product.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their account.", + "Redirect to the form in Help Center where the merchant can request a legal appeal for the issue.", + "Redirect to Merchant Center where the merchant can perform identity verification." + ], "type": "string" }, - "value": { - "description": "Value for additional google provided (as key-value pairs) annotation.", + "uri": { + "description": "URL to external system, for example Merchant Center, where the merchant can perform the action.", "type": "string" } }, "type": "object" }, - "OrderPickupDetails": { - "id": "OrderPickupDetails", + "FreeListingsProgramStatus": { + "description": "Response message for GetFreeListingsProgramStatus.", + "id": "FreeListingsProgramStatus", "properties": { - "address": { - "$ref": "OrderAddress", - "description": "Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location." + "globalState": { + "description": "State of the program. `ENABLED` if there are offers for at least one region.", + "enum": [ + "PROGRAM_STATE_UNSPECIFIED", + "NOT_ENABLED", + "NO_OFFERS_UPLOADED", + "ENABLED" + ], + "enumDescriptions": [ + "State is unknown.", + "Program is not enabled for any country.", + "No products have been uploaded for any region. Upload products to Merchant Center.", + "Program is enabled and offers are uploaded for at least one country." + ], + "type": "string" }, - "collectors": { - "description": "Collectors authorized to pick up shipment from the pickup location.", + "regionStatuses": { + "description": "Status of the program in each region. Regions with the same status and review eligibility are grouped together in `regionCodes`.", "items": { - "$ref": "OrderPickupDetailsCollector" + "$ref": "FreeListingsProgramStatusRegionStatus" }, "type": "array" - }, - "locationId": { - "description": "ID of the pickup location.", - "type": "string" - }, - "pickupType": { - "description": "The pickup type of this order. Acceptable values are: - \"`merchantStore`\" - \"`merchantStoreCurbside`\" - \"`merchantStoreLocker`\" - \"`thirdPartyPickupPoint`\" - \"`thirdPartyLocker`\" ", - "type": "string" } }, "type": "object" }, - "OrderPickupDetailsCollector": { - "id": "OrderPickupDetailsCollector", + "FreeListingsProgramStatusRegionStatus": { + "description": "Status of program and region.", + "id": "FreeListingsProgramStatusRegionStatus", "properties": { - "name": { - "description": "Name of the person picking up the shipment.", + "disapprovalDate": { + "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", "type": "string" }, - "phoneNumber": { - "description": "Phone number of the person picking up the shipment.", + "eligibilityStatus": { + "description": "Eligibility status of the standard free listing program.", + "enum": [ + "STATE_UNSPECIFIED", + "APPROVED", + "DISAPPROVED", + "WARNING", + "UNDER_REVIEW", + "PENDING_REVIEW", + "ONBOARDING" + ], + "enumDescriptions": [ + "State is not known.", + "If the account has no issues and review is completed successfully.", + "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", + "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", + "Account is under review.", + "Account is waiting for review to start.", + "Program is currently onboarding. Upload valid offers to complete onboarding." + ], "type": "string" - } - }, - "type": "object" - }, - "OrderPromotion": { - "id": "OrderPromotion", - "properties": { - "applicableItems": { - "description": "Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item.", + }, + "onboardingIssues": { + "description": "Issues that must be fixed to be eligible for review.", "items": { - "$ref": "OrderPromotionItem" + "type": "string" }, "type": "array" }, - "appliedItems": { - "description": "Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item.", + "regionCodes": { + "description": "The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions with the same `eligibilityStatus` and `reviewEligibility`.", "items": { - "$ref": "OrderPromotionItem" + "type": "string" }, "type": "array" }, - "endTime": { - "description": "Promotion end time in ISO 8601 format. Date, time, and offset required, for example, \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\".", - "type": "string" - }, - "funder": { - "description": "Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - \"`google`\" - \"`merchant`\" ", - "type": "string" - }, - "merchantPromotionId": { - "description": "Required. This field is used to identify promotions within merchants' own systems.", - "type": "string" - }, - "priceValue": { - "$ref": "Price", - "description": "Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order." - }, - "shortTitle": { - "description": "A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`.", - "type": "string" - }, - "startTime": { - "description": "Promotion start time in ISO 8601 format. Date, time, and offset required, for example, \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\".", - "type": "string" - }, - "subtype": { - "description": "Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - \"`buyMGetMoneyOff`\" - \"`buyMGetNMoneyOff`\" - \"`buyMGetNPercentOff`\" - \"`buyMGetPercentOff`\" - \"`freeGift`\" - \"`freeGiftWithItemId`\" - \"`freeGiftWithValue`\" - \"`freeShippingOvernight`\" - \"`freeShippingStandard`\" - \"`freeShippingTwoDay`\" - \"`moneyOff`\" - \"`percentOff`\" - \"`rewardPoints`\" - \"`salePrice`\" ", - "type": "string" - }, - "taxValue": { - "$ref": "Price", - "description": "Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`." - }, - "title": { - "description": "Required. The title of the promotion.", - "type": "string" - }, - "type": { - "description": "Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - \"`product`\" - \"`shipping`\" ", - "type": "string" - } - }, - "type": "object" - }, - "OrderPromotionItem": { - "id": "OrderPromotionItem", - "properties": { - "lineItemId": { - "description": "The line item ID of a product. Do not provide for `orders.createtestorder`.", - "type": "string" - }, - "offerId": { - "description": "Required. Offer ID of a product. Only for `orders.createtestorder`.", - "type": "string" - }, - "productId": { - "description": "`orders.createtestorder`.", + "reviewEligibilityStatus": { + "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", + "enum": [ + "REVIEW_ELIGIBILITY_UNSPECIFIED", + "ELIGIBLE", + "INELIGIBLE" + ], + "enumDescriptions": [ + "Review eligibility state is unknown.", + "Account is eligible for review for a specified region code.", + "Account is not eligible for review for a specified region code." + ], "type": "string" }, - "quantity": { - "description": "The quantity of the associated product. Do not provide for `orders.createtestorder`.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "OrderRefund": { - "id": "OrderRefund", - "properties": { - "actor": { - "description": "The actor that created the refund. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", + "reviewIneligibilityReason": { + "description": "Review ineligibility reason if account is not eligible for review.", + "enum": [ + "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED", + "ONBOARDING_ISSUES", + "NOT_ENOUGH_OFFERS", + "IN_COOLDOWN_PERIOD", + "ALREADY_UNDER_REVIEW", + "NO_REVIEW_REQUIRED", + "WILL_BE_REVIEWED_AUTOMATICALLY", + "IS_RETIRED", + "ALREADY_REVIEWED" + ], + "enumDescriptions": [ + "Requesting a review from Google is not possible.", + "All onboarding issues needs to be fixed.", + "Not enough offers uploaded for this country.", + "Cooldown period applies. Wait until cooldown period ends.", + "Account is already under review.", + "No issues available to review.", + "Account will be automatically reviewed at the end of the grace period.", + "Account is retired. Should not appear in MC.", + "Account was already reviewd." + ], "type": "string" }, - "amount": { - "$ref": "Price", - "description": "The amount that is refunded." - }, - "creationDate": { - "description": "Date on which the item has been created, in ISO 8601 format.", + "reviewIneligibilityReasonDescription": { + "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" + "reviewIneligibilityReasonDetails": { + "$ref": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "reviewIssues": { + "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "OrderReportDisbursement": { - "description": "Order disbursement. All methods require the payment analyst role.", - "id": "OrderReportDisbursement", - "properties": { - "disbursementAmount": { - "$ref": "Price", - "description": "The disbursement amount." - }, - "disbursementCreationDate": { - "description": "The disbursement date, in ISO 8601 format.", - "type": "string" - }, - "disbursementDate": { - "description": "The date the disbursement was initiated, in ISO 8601 format.", - "type": "string" - }, - "disbursementId": { - "description": "The ID of the disbursement.", - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "FreeListingsProgramStatusReviewIneligibilityReasonDetails": { + "description": "Additional details for review ineligibility reasons.", + "id": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "properties": { + "cooldownTime": { + "description": "This timestamp represents end of cooldown period for review ineligbility reason `IN_COOLDOWN_PERIOD`.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "OrderReportTransaction": { - "id": "OrderReportTransaction", + "FreeShippingThreshold": { + "description": "Conditions to be met for a product to have free shipping.", + "id": "FreeShippingThreshold", "properties": { - "disbursementAmount": { - "$ref": "Price", - "description": "The disbursement amount." - }, - "disbursementCreationDate": { - "description": "The date the disbursement was created, in ISO 8601 format.", - "type": "string" - }, - "disbursementDate": { - "description": "The date the disbursement was initiated, in ISO 8601 format.", - "type": "string" - }, - "disbursementId": { - "description": "The ID of the disbursement.", - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "merchantOrderId": { - "description": "Merchant-provided ID of the order.", - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "country": { + "description": "Required. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the country to which an item will ship.", "type": "string" }, - "productAmount": { - "$ref": "ProductAmount", - "description": "Total amount for the items." - }, - "transactionDate": { - "description": "The date of the transaction, in ISO 8601 format.", - "type": "string" + "priceThreshold": { + "$ref": "Price", + "description": "Required. The minimum product price for the shipping cost to become free. Represented as a number." } }, "type": "object" }, - "OrderReturn": { - "id": "OrderReturn", + "GenerateRecommendationsResponse": { + "description": "Response containing generated recommendations.", + "id": "GenerateRecommendationsResponse", "properties": { - "actor": { - "description": "The actor that created the refund. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", - "type": "string" - }, - "creationDate": { - "description": "Date on which the item has been created, in ISO 8601 format.", - "type": "string" - }, - "quantity": { - "description": "Quantity that is returned.", - "format": "uint32", - "type": "integer" - }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" + "recommendations": { + "description": "Recommendations generated for a request.", + "items": { + "$ref": "Recommendation" + }, + "type": "array" }, - "reasonText": { - "description": "The explanation of the reason.", + "responseToken": { + "description": "Output only. Response token is a string created for each `GenerateRecommendationsResponse`. This token doesn't expire, and is globally unique. This token must be used when reporting interactions for recommendations.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrderShipment": { - "id": "OrderShipment", + "GmbAccounts": { + "id": "GmbAccounts", "properties": { - "carrier": { - "description": "The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. *Note:* You can also use unsupported carriers, but emails to customers won't include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for \"US\" are: - \"`ups`\" (United Parcel Service) *automatic status updates* - \"`usps`\" (United States Postal Service) *automatic status updates* - \"`fedex`\" (FedEx) *automatic status updates * - \"`dhl`\" (DHL eCommerce) *automatic status updates* (US only) - \"`ontrac`\" (OnTrac) *automatic status updates * - \"`dhl express`\" (DHL Express) - \"`deliv`\" (Deliv) - \"`dynamex`\" (TForce) - \"`lasership`\" (LaserShip) - \"`mpx`\" (Military Parcel Xpress) - \"`uds`\" (United Delivery Service) - \"`efw`\" (Estes Forwarding Worldwide) - \"`jd logistics`\" (JD Logistics) - \"`yunexpress`\" (YunExpress) - \"`china post`\" (China Post) - \"`china ems`\" (China Post Express Mail Service) - \"`singapore post`\" (Singapore Post) - \"`pos malaysia`\" (Pos Malaysia) - \"`postnl`\" (PostNL) - \"`ptt`\" (PTT Turkish Post) - \"`eub`\" (ePacket) - \"`chukou1`\" (Chukou1 Logistics) - \"`bestex`\" (Best Express) - \"`canada post`\" (Canada Post) - \"`purolator`\" (Purolator) - \"`canpar`\" (Canpar) - \"`india post`\" (India Post) - \"`blue dart`\" (Blue Dart) - \"`delhivery`\" (Delhivery) - \"`dtdc`\" (DTDC) - \"`tpc india`\" (TPC India) - \"`lso`\" (Lone Star Overnight) - \"`tww`\" (Team Worldwide) - \"`deliver-it`\" (Deliver-IT) - \"`cdl last mile`\" (CDL Last Mile) Supported carriers for FR are: - \"`la poste`\" (La Poste) *automatic status updates * - \"`colissimo`\" (Colissimo by La Poste) *automatic status updates* - \"`ups`\" (United Parcel Service) *automatic status updates * - \"`chronopost`\" (Chronopost by La Poste) - \"`gls`\" (General Logistics Systems France) - \"`dpd`\" (DPD Group by GeoPost) - \"`bpost`\" (Belgian Post Group) - \"`colis prive`\" (Colis Privé) - \"`boxtal`\" (Boxtal) - \"`geodis`\" (GEODIS) - \"`tnt`\" (TNT) - \"`db schenker`\" (DB Schenker) - \"`aramex`\" (Aramex) ", - "type": "string" - }, - "creationDate": { - "description": "Date on which the shipment has been created, in ISO 8601 format.", - "type": "string" - }, - "deliveryDate": { - "description": "Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered`", - "type": "string" - }, - "id": { - "description": "The ID of the shipment.", + "accountId": { + "description": "The ID of the Merchant Center account.", + "format": "uint64", "type": "string" }, - "lineItems": { - "description": "The line items that are shipped.", + "gmbAccounts": { + "description": "A list of Business Profiles which are available to the merchant.", "items": { - "$ref": "OrderShipmentLineItemShipment" + "$ref": "GmbAccountsGmbAccount" }, "type": "array" - }, - "scheduledDeliveryDetails": { - "$ref": "OrderShipmentScheduledDeliveryDetails", - "description": "Delivery details of the shipment if scheduling is needed." - }, - "shipmentGroupId": { - "description": "The shipment group ID of the shipment. This is set in shiplineitems request.", - "type": "string" - }, - "status": { - "description": "The status of the shipment. Acceptable values are: - \"`delivered`\" - \"`readyForPickup`\" - \"`shipped`\" - \"`undeliverable`\" ", - "type": "string" - }, - "trackingId": { - "description": "The tracking ID for the shipment.", - "type": "string" } }, "type": "object" }, - "OrderShipmentLineItemShipment": { - "id": "OrderShipmentLineItemShipment", + "GmbAccountsGmbAccount": { + "id": "GmbAccountsGmbAccount", "properties": { - "lineItemId": { - "description": "The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required.", + "email": { + "description": "The email which identifies the Business Profile.", "type": "string" }, - "productId": { - "description": "The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "listingCount": { + "description": "Number of listings under this account.", + "format": "uint64", "type": "string" }, - "quantity": { - "description": "The quantity that is shipped.", - "format": "uint32", - "type": "integer" + "name": { + "description": "The name of the Business Profile.", + "type": "string" + }, + "type": { + "description": "The type of the Business Profile (User or Business).", + "type": "string" } }, "type": "object" }, - "OrderShipmentScheduledDeliveryDetails": { - "id": "OrderShipmentScheduledDeliveryDetails", + "GoogleAnalyticsLink": { + "description": "\"Google Analytics Link\" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account.", + "id": "GoogleAnalyticsLink", "properties": { - "carrierPhoneNumber": { - "description": "The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (for example, \"+41 44 668 1800\").", + "attributionSettings": { + "$ref": "AttributionSettings", + "description": "Output only. Attribution settings for the linked Google Analytics property.", + "readOnly": true + }, + "propertyId": { + "description": "Required. Immutable. ID of the Google Analytics property the merchant is linked to.", + "format": "int64", "type": "string" }, - "scheduledDate": { - "description": "The date a shipment is scheduled for delivery, in ISO 8601 format.", + "propertyName": { + "description": "Output only. Name of the Google Analytics property the merchant is linked to.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrderTrackingSignal": { - "description": "Represents a merchant trade from which signals are extracted, e.g. shipping.", - "id": "OrderTrackingSignal", + "Headers": { + "description": "A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `numItems`, `postalCodeGroupNames`, or `location` must be set.", + "id": "Headers", "properties": { - "customerShippingFee": { - "$ref": "PriceAmount", - "description": "The shipping fee of the order; this value should be set to zero in the case of free shipping." + "locations": { + "description": "A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "$ref": "LocationIdSet" + }, + "type": "array" }, - "deliveryPostalCode": { - "description": "Required. The delivery postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", - "type": "string" + "numberOfItems": { + "description": "A list of inclusive number of items upper bounds. The last value can be `\"infinity\"`. For example `[\"10\", \"50\", \"infinity\"]` represents the headers \"\u003c= 10 items\", \"\u003c= 50 items\", and \"\u003e 50 items\". Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "type": "string" + }, + "type": "array" }, - "deliveryRegionCode": { - "description": "Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination.", - "type": "string" + "postalCodeGroupNames": { + "description": "A list of postal group names. The last value can be `\"all other locations\"`. Example: `[\"zone 1\", \"zone 2\", \"all other locations\"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "type": "string" + }, + "type": "array" }, - "lineItems": { - "description": "Information about line items in the order.", + "prices": { + "description": "A list of inclusive order price upper bounds. The last price's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"currency\": \"USD\"}, {\"value\": \"500\", \"currency\": \"USD\"}, {\"value\": \"infinity\", \"currency\": \"USD\"}]` represents the headers \"\u003c= $10\", \"\u003c= $500\", and \"\u003e $500\". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.", "items": { - "$ref": "OrderTrackingSignalLineItemDetails" + "$ref": "Price" }, "type": "array" }, - "merchantId": { - "description": "The Google merchant ID of this order tracking signal. This value is optional. If left unset, the caller's merchant ID is used. You must request access in order to provide data on behalf of another merchant. For more information, see [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking-signals).", - "format": "int64", + "weights": { + "description": "A list of inclusive order weight upper bounds. The last weight's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"unit\": \"kg\"}, {\"value\": \"50\", \"unit\": \"kg\"}, {\"value\": \"infinity\", \"unit\": \"kg\"}]` represents the headers \"\u003c= 10kg\", \"\u003c= 50kg\", and \"\u003e 50kg\". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "$ref": "Weight" + }, + "type": "array" + } + }, + "type": "object" + }, + "HolidayCutoff": { + "id": "HolidayCutoff", + "properties": { + "deadlineDate": { + "description": "Date of the order deadline, in ISO 8601 format. For example, \"2016-11-29\" for 29th November 2016. Required.", "type": "string" }, - "orderCreatedTime": { - "$ref": "DateTime", - "description": "Required. The time when the order was created on the merchant side. Include the year and timezone string, if available." + "deadlineHour": { + "description": "Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.", + "format": "uint32", + "type": "integer" }, - "orderId": { - "description": "Required. The ID of the order on the merchant side. This field will be hashed in returned OrderTrackingSignal creation response.", + "deadlineTimezone": { + "description": "Timezone identifier for the deadline hour (for example, \"Europe/Zurich\"). List of identifiers. Required.", "type": "string" }, - "orderTrackingSignalId": { - "description": "Output only. The ID that uniquely identifies this order tracking signal.", - "format": "int64", - "readOnly": true, + "holidayId": { + "description": "Unique identifier for the holiday. Required.", "type": "string" }, - "shipmentLineItemMapping": { - "description": "The mapping of the line items to the shipment information.", - "items": { - "$ref": "OrderTrackingSignalShipmentLineItemMapping" - }, - "type": "array" - }, - "shippingInfo": { - "description": "The shipping information for the order.", - "items": { - "$ref": "OrderTrackingSignalShippingInfo" - }, - "type": "array" + "visibleFromDate": { + "description": "Date on which the deadline will become visible to consumers in ISO 8601 format. For example, \"2016-10-31\" for 31st October 2016. Required.", + "type": "string" } }, "type": "object" }, - "OrderTrackingSignalLineItemDetails": { - "description": "The line items of the order.", - "id": "OrderTrackingSignalLineItemDetails", + "HolidaysHoliday": { + "id": "HolidaysHoliday", "properties": { - "brand": { - "description": "Brand of the product.", + "countryCode": { + "description": "The CLDR territory code of the country in which the holiday is available. For example, \"US\", \"DE\", \"GB\". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present.", "type": "string" }, - "gtin": { - "description": "The Global Trade Item Number.", + "date": { + "description": "Date of the holiday, in ISO 8601 format. For example, \"2016-12-25\" for Christmas 2016. Always present.", "type": "string" }, - "lineItemId": { - "description": "Required. The ID for this line item.", + "deliveryGuaranteeDate": { + "description": "Date on which the order has to arrive at the customer's, in ISO 8601 format. For example, \"2016-12-24\" for 24th December 2016. Always present.", "type": "string" }, - "mpn": { - "description": "The manufacturer part number.", + "deliveryGuaranteeHour": { + "description": "Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present.", + "format": "uint64", "type": "string" }, - "productDescription": { - "deprecated": true, - "description": "Plain text description of this product (deprecated: Please use product_title instead).", + "id": { + "description": "Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present.", "type": "string" }, - "productId": { - "description": "Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.", + "type": { + "description": "The holiday type. Always present. Acceptable values are: - \"`Christmas`\" - \"`Easter`\" - \"`Father's Day`\" - \"`Halloween`\" - \"`Independence Day (USA)`\" - \"`Mother's Day`\" - \"`Thanksgiving`\" - \"`Valentine's Day`\" ", "type": "string" + } + }, + "type": "object" + }, + "InputField": { + "description": "Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.", + "id": "InputField", + "properties": { + "checkboxInput": { + "$ref": "InputFieldCheckboxInput", + "description": "Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox)." }, - "productTitle": { - "description": "Plain text title of this product.", + "choiceInput": { + "$ref": "InputFieldChoiceInput", + "description": "Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio)." + }, + "id": { + "description": "Not for display but need to be sent back for the given input field.", "type": "string" }, - "quantity": { - "description": "The quantity of the line item in the order.", - "format": "int64", - "type": "string" + "label": { + "$ref": "TextWithTooltip", + "description": "Input field label. There may be more information to be shown in a tooltip." }, - "sku": { - "deprecated": true, - "description": "Merchant SKU for this item (deprecated).", - "type": "string" + "required": { + "description": "Whether the field is required. The action button needs to stay disabled till values for all required fields are provided.", + "type": "boolean" }, - "upc": { - "deprecated": true, - "description": "Universal product code for this item (deprecated: Please use GTIN instead).", - "type": "string" + "textInput": { + "$ref": "InputFieldTextInput", + "description": "Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." } }, "type": "object" }, - "OrderTrackingSignalShipmentLineItemMapping": { - "description": "Represents how many items are in the shipment for the given shipment_id and line_item_id.", - "id": "OrderTrackingSignalShipmentLineItemMapping", + "InputFieldCheckboxInput": { + "description": "Checkbox input allows merchants to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). If merchant checks the box, the input value for the field is `true`, otherwise it is `false`. This type of input is often used as a confirmation that the merchant completed required steps before they are allowed to start the action. In such a case, the input field is marked as required and the button to trigger the action should stay disabled until the merchant checks the box.", + "id": "InputFieldCheckboxInput", + "properties": {}, + "type": "object" + }, + "InputFieldChoiceInput": { + "description": "Choice input allows merchants to select one of the offered choices. Some choices may be linked to additional input fields that should be displayed under or next to the choice option. The value for the additional input field needs to be provided only when the specific choice is selected by the merchant. For example, additional input field can be hidden or disabled until the merchant selects the specific choice.", + "id": "InputFieldChoiceInput", "properties": { - "lineItemId": { - "description": "Required. The line item ID.", - "type": "string" - }, - "quantity": { - "description": "The line item quantity in the shipment.", - "format": "int64", - "type": "string" - }, - "shipmentId": { - "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", - "type": "string" + "options": { + "description": "A list of choices. Only one option can be selected.", + "items": { + "$ref": "InputFieldChoiceInputChoiceInputOption" + }, + "type": "array" } }, "type": "object" }, - "OrderTrackingSignalShippingInfo": { - "description": "The shipping information for the order.", - "id": "OrderTrackingSignalShippingInfo", + "InputFieldChoiceInputChoiceInputOption": { + "description": "A choice that merchant can select.", + "id": "InputFieldChoiceInputChoiceInputOption", "properties": { - "actualDeliveryTime": { - "$ref": "DateTime", - "description": "The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "carrierName": { - "description": "The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", - "type": "string" + "additionalInput": { + "$ref": "InputField", + "description": "Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`." }, - "carrierServiceName": { - "description": "The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc.", + "id": { + "description": "Not for display but need to be sent back for the selected choice option.", "type": "string" }, - "earliestDeliveryPromiseTime": { - "$ref": "DateTime", - "description": "The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "latestDeliveryPromiseTime": { - "$ref": "DateTime", - "description": "The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "originPostalCode": { - "description": "The origin postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", - "type": "string" + "label": { + "$ref": "TextWithTooltip", + "description": "Short description of the choice option. There may be more information to be shown as a tooltip." + } + }, + "type": "object" + }, + "InputFieldTextInput": { + "description": "Text input allows merchants to provide a text value.", + "id": "InputFieldTextInput", + "properties": { + "additionalInfo": { + "$ref": "TextWithTooltip", + "description": "Additional info regarding the field to be displayed to merchant. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip." }, - "originRegionCode": { - "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping origin.", + "ariaLabel": { + "description": "Text to be used as the [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input.", "type": "string" }, - "shipmentId": { - "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", + "formatInfo": { + "description": "Information about the required format. If present, it should be shown close to the input field to help merchants to provide a correct value. For example: \"VAT numbers should be in a format similar to SK9999999999\"", "type": "string" }, - "shippedTime": { - "$ref": "DateTime", - "description": "The time when the shipment was shipped. Include the year and timezone string, if available." - }, - "shippingStatus": { - "description": "The status of the shipment.", + "type": { + "description": "Type of the text input", "enum": [ - "SHIPPING_STATE_UNSPECIFIED", - "SHIPPED", - "DELIVERED" + "TEXT_INPUT_TYPE_UNSPECIFIED", + "GENERIC_SHORT_TEXT", + "GENERIC_LONG_TEXT" ], "enumDescriptions": [ - "The shipping status is not known to merchant.", - "All items are shipped.", - "The shipment is already delivered." + "Default value. Will never be provided by the API.", + "Used when a short text is expected. The field can be rendered as a [text field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text).", + "Used when a longer text is expected. The field should be rendered as a [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." ], "type": "string" - }, - "trackingId": { - "description": "The tracking ID of the shipment. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", - "type": "string" } }, "type": "object" }, - "OrderinvoicesCreateChargeInvoiceRequest": { - "id": "OrderinvoicesCreateChargeInvoiceRequest", + "InputValue": { + "description": "Input provided by the merchant for input field.", + "id": "InputValue", "properties": { - "invoiceId": { - "description": "[required] The ID of the invoice.", - "type": "string" - }, - "invoiceSummary": { - "$ref": "InvoiceSummary", - "description": "[required] Invoice summary." + "checkboxInputValue": { + "$ref": "InputValueCheckboxInputValue", + "description": "Value for checkbox input field." }, - "lineItemInvoices": { - "description": "[required] Invoice details per line item.", - "items": { - "$ref": "ShipmentInvoiceLineItemInvoice" - }, - "type": "array" + "choiceInputValue": { + "$ref": "InputValueChoiceInputValue", + "description": "Value for choice input field." }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order.", + "inputFieldId": { + "description": "Required. Id of the corresponding input field.", "type": "string" }, - "shipmentGroupId": { - "description": "[required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges.", - "type": "string" + "textInputValue": { + "$ref": "InputValueTextInputValue", + "description": "Value for text input field." } }, "type": "object" }, - "OrderinvoicesCreateChargeInvoiceResponse": { - "id": "OrderinvoicesCreateChargeInvoiceResponse", + "InputValueCheckboxInputValue": { + "description": "Value for checkbox input field.", + "id": "InputValueCheckboxInputValue", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderinvoicesCreateChargeInvoiceResponse`\".", + "value": { + "description": "Required. True if the merchant checked the box field. False otherwise.", + "type": "boolean" + } + }, + "type": "object" + }, + "InputValueChoiceInputValue": { + "description": "Value for choice input field.", + "id": "InputValueChoiceInputValue", + "properties": { + "choiceInputOptionId": { + "description": "Required. Id of the option that was selected by the merchant.", "type": "string" } }, "type": "object" }, - "OrderinvoicesCreateRefundInvoiceRequest": { - "id": "OrderinvoicesCreateRefundInvoiceRequest", + "InputValueTextInputValue": { + "description": "Value for text input field.", + "id": "InputValueTextInputValue", "properties": { - "invoiceId": { - "description": "[required] The ID of the invoice.", + "value": { + "description": "Required. Text provided by the merchant.", "type": "string" + } + }, + "type": "object" + }, + "InsertCheckoutSettingsRequest": { + "description": "Request message for the `InsertCheckoutSettings` method.", + "id": "InsertCheckoutSettingsRequest", + "properties": { + "uriSettings": { + "$ref": "UrlSettings", + "description": "Required. The `UrlSettings` for the request. The presence of URL settings indicates `Checkout` enrollment." + } + }, + "type": "object" + }, + "Installment": { + "description": "Details of a monthly installment payment offering. [Learn more](https://support.google.com/merchants/answer/6324474) about installments.", + "id": "Installment", + "properties": { + "amount": { + "$ref": "Price", + "description": "The amount the buyer has to pay per month." }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order.", + "creditType": { + "description": "Optional. Type of installment payments. Supported values are: - \"`finance`\" - \"`lease`\" ", "type": "string" }, - "refundOnlyOption": { - "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption", - "description": "Option to create a refund-only invoice. Exactly one of `refundOnlyOption` or `returnOption` must be provided." - }, - "returnOption": { - "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption", - "description": "Option to create an invoice for a refund and mark all items within the invoice as returned. Exactly one of `refundOnlyOption` or `returnOption` must be provided." + "downpayment": { + "$ref": "Price", + "description": "Optional. The initial down payment amount the buyer has to pay." }, - "shipmentInvoices": { - "description": "Invoice details for different shipment groups.", + "months": { + "description": "The number of installments the buyer has to pay.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "LabelIds": { + "description": "The IDs of labels that should be assigned to the CSS domain.", + "id": "LabelIds", + "properties": { + "labelIds": { + "description": "The list of label IDs.", "items": { - "$ref": "ShipmentInvoice" + "format": "int64", + "type": "string" }, "type": "array" } }, "type": "object" }, - "OrderinvoicesCreateRefundInvoiceResponse": { - "id": "OrderinvoicesCreateRefundInvoiceResponse", + "LiaAboutPageSettings": { + "id": "LiaAboutPageSettings", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "status": { + "description": "The status of the verification process for the About page. Supported values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderinvoicesCreateRefundInvoiceResponse`\".", + "url": { + "description": "The URL for the About page.", "type": "string" } }, "type": "object" }, - "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption": { - "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption", + "LiaCountrySettings": { + "id": "LiaCountrySettings", "properties": { - "description": { - "description": "Optional description of the refund reason.", - "type": "string" + "about": { + "$ref": "LiaAboutPageSettings", + "description": "The settings for the About page." }, - "reason": { - "description": "[required] Reason for the refund. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "country": { + "description": "Required. CLDR country code (for example, \"US\").", "type": "string" + }, + "hostedLocalStorefrontActive": { + "description": "The status of the \"Merchant hosted local storefront\" feature.", + "type": "boolean" + }, + "inventory": { + "$ref": "LiaInventorySettings", + "description": "LIA inventory verification settings." + }, + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The omnichannel experience configured for this country." + }, + "onDisplayToOrder": { + "$ref": "LiaOnDisplayToOrderSettings", + "description": "LIA \"On Display To Order\" settings." + }, + "posDataProvider": { + "$ref": "LiaPosDataProvider", + "description": "The POS data provider linked with this country." + }, + "storePickupActive": { + "description": "The status of the \"Store pickup\" feature.", + "type": "boolean" } }, "type": "object" }, - "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption": { - "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption", + "LiaInventorySettings": { + "id": "LiaInventorySettings", "properties": { - "description": { - "description": "Optional description of the return reason.", + "inventoryVerificationContactEmail": { + "description": "The email of the contact for the inventory verification process.", "type": "string" }, - "reason": { - "description": "[required] Reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "inventoryVerificationContactName": { + "description": "The name of the contact for the inventory verification process.", "type": "string" - } - }, - "type": "object" - }, - "OrderreportsListDisbursementsResponse": { - "id": "OrderreportsListDisbursementsResponse", - "properties": { - "disbursements": { - "description": "The list of disbursements.", - "items": { - "$ref": "OrderReportDisbursement" - }, - "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreportsListDisbursementsResponse`\".", + "inventoryVerificationContactStatus": { + "description": "The status of the verification contact. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of disbursements.", + "status": { + "description": "The status of the inventory verification process. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrderreportsListTransactionsResponse": { - "id": "OrderreportsListTransactionsResponse", + "LiaOmnichannelExperience": { + "description": "Omnichannel experience details.", + "id": "LiaOmnichannelExperience", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreportsListTransactionsResponse`\".", + "country": { + "description": "The CLDR country code (for example, \"US\").", "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of transactions.", + "lsfType": { + "description": "The Local Store Front (LSF) type for this country. Acceptable values are: - \"`ghlsf`\" (Google-Hosted Local Store Front) - \"`mhlsfBasic`\" (Merchant-Hosted Local Store Front Basic) - \"`mhlsfFull`\" (Merchant-Hosted Local Store Front Full) More details about these types can be found here.", "type": "string" }, - "transactions": { - "description": "The list of transactions.", + "pickupTypes": { + "description": "The Pickup types for this country. Acceptable values are: - \"`pickupToday`\" - \"`pickupLater`\" ", "items": { - "$ref": "OrderReportTransaction" + "type": "string" }, "type": "array" } }, "type": "object" }, - "OrderreturnsAcknowledgeRequest": { - "id": "OrderreturnsAcknowledgeRequest", + "LiaOnDisplayToOrderSettings": { + "id": "LiaOnDisplayToOrderSettings", "properties": { - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order return.", + "shippingCostPolicyUrl": { + "description": "Shipping cost and policy URL.", + "type": "string" + }, + "status": { + "description": "The status of the ?On display to order? feature. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrderreturnsAcknowledgeResponse": { - "id": "OrderreturnsAcknowledgeResponse", + "LiaPosDataProvider": { + "id": "LiaPosDataProvider", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "posDataProviderId": { + "description": "The ID of the POS data provider.", + "format": "uint64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsAcknowledgeResponse`\".", + "posExternalAccountId": { + "description": "The account ID by which this merchant is known to the POS data provider.", "type": "string" } }, "type": "object" }, - "OrderreturnsCreateOrderReturnRequest": { - "id": "OrderreturnsCreateOrderReturnRequest", + "LiaSettings": { + "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.", + "id": "LiaSettings", "properties": { - "lineItems": { - "description": "The list of line items to return.", + "accountId": { + "description": "The ID of the account to which these LIA settings belong. Ignored upon update, always present in get request responses.", + "format": "uint64", + "type": "string" + }, + "countrySettings": { + "description": "The LIA settings for each country.", "items": { - "$ref": "OrderreturnsLineItem" + "$ref": "LiaCountrySettings" }, "type": "array" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", - "type": "string" - }, - "returnMethodType": { - "description": "The way of the package being returned.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liaSettings`\"", "type": "string" } }, "type": "object" }, - "OrderreturnsCreateOrderReturnResponse": { - "id": "OrderreturnsCreateOrderReturnResponse", + "LiasettingsCustomBatchRequest": { + "id": "LiasettingsCustomBatchRequest", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsCreateOrderReturnResponse`\".", - "type": "string" - }, - "orderReturn": { - "$ref": "MerchantOrderReturn", - "description": "Created order return." + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "LiasettingsCustomBatchRequestEntry" + }, + "type": "array" } }, "type": "object" }, - "OrderreturnsLineItem": { - "id": "OrderreturnsLineItem", + "LiasettingsCustomBatchRequestEntry": { + "id": "LiasettingsCustomBatchRequestEntry", "properties": { - "lineItemId": { - "description": "The ID of the line item. This value is assigned by Google when an order is created. Either lineItemId or productId is required.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "accountId": { + "description": "The ID of the account for which to get/update account LIA settings.", + "format": "uint64", "type": "string" }, - "quantity": { - "description": "The quantity of this line item.", + "batchId": { + "description": "An entry ID, unique within the batch request.", "format": "uint32", "type": "integer" - } - }, - "type": "object" - }, - "OrderreturnsListResponse": { - "id": "OrderreturnsListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsListResponse`\".", - "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of returns.", + "contactEmail": { + "description": "Inventory validation contact email. Required only for SetInventoryValidationContact.", "type": "string" }, - "resources": { - "items": { - "$ref": "MerchantOrderReturn" - }, - "type": "array" - } - }, - "type": "object" - }, - "OrderreturnsPartialRefund": { - "id": "OrderreturnsPartialRefund", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax amount to be refunded, depending on the location of the order." + "contactName": { + "description": "Inventory validation contact name. Required only for SetInventoryValidationContact.", + "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "Tax amount to be refunded. Note: This has different meaning depending on the location of the order." - } - }, - "type": "object" - }, - "OrderreturnsProcessRequest": { - "id": "OrderreturnsProcessRequest", - "properties": { - "fullChargeReturnShippingCost": { - "description": "Option to charge the customer return shipping cost.", - "type": "boolean" + "country": { + "description": "The country code. Required only for RequestInventoryVerification.", + "type": "string" }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order return.", + "gmbEmail": { + "description": "The Business Profile. Required only for RequestGmbAccess.", "type": "string" }, - "refundShippingFee": { - "$ref": "OrderreturnsRefundOperation", - "description": "Refunds for original shipping fee." + "liaSettings": { + "$ref": "LiaSettings", + "description": "The account Lia settings to update. Only defined if the method is `update`." }, - "returnItems": { - "description": "The list of items to return.", - "items": { - "$ref": "OrderreturnsReturnItem" - }, - "type": "array" - } - }, - "type": "object" - }, - "OrderreturnsProcessResponse": { - "id": "OrderreturnsProcessResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsProcessResponse`\".", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`getAccessibleGmbAccounts`\" - \"`requestGmbAccess`\" - \"`requestInventoryVerification`\" - \"`setInventoryVerificationContact`\" - \"`update`\" ", "type": "string" - } - }, - "type": "object" - }, - "OrderreturnsRefundOperation": { - "id": "OrderreturnsRefundOperation", - "properties": { - "fullRefund": { - "description": "If true, the item will be fully refunded. Allowed only when payment_type is FOP. Merchant can choose this refund option to indicate the full remaining amount of corresponding object to be refunded to the customer through FOP.", - "type": "boolean" }, - "partialRefund": { - "$ref": "OrderreturnsPartialRefund", - "description": "If this is set, the item will be partially refunded. Merchant can choose this refund option to specify the customized amount that to be refunded to the customer." - }, - "paymentType": { - "description": "The payment way of issuing refund. Default value is ORIGINAL_FOP if not set.", - "type": "string" + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The omnichannel experience for a country. Required only for SetOmnichannelExperience." }, - "reasonText": { - "description": "The explanation of the reason.", + "posDataProviderId": { + "description": "The ID of POS data provider. Required only for SetPosProvider.", + "format": "uint64", "type": "string" }, - "returnRefundReason": { - "description": "Code of the refund reason.", + "posExternalAccountId": { + "description": "The account ID by which this merchant is known to the POS provider.", "type": "string" } }, "type": "object" }, - "OrderreturnsRejectOperation": { - "id": "OrderreturnsRejectOperation", + "LiasettingsCustomBatchResponse": { + "id": "LiasettingsCustomBatchResponse", "properties": { - "reason": { - "description": "The reason for the return.", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "LiasettingsCustomBatchResponseEntry" + }, + "type": "array" }, - "reasonText": { - "description": "The explanation of the reason.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "OrderreturnsReturnItem": { - "id": "OrderreturnsReturnItem", + "LiasettingsCustomBatchResponseEntry": { + "id": "LiasettingsCustomBatchResponseEntry", "properties": { - "refund": { - "$ref": "OrderreturnsRefundOperation", - "description": "Refunds the item." + "batchId": { + "description": "The ID of the request entry to which this entry responds.", + "format": "uint32", + "type": "integer" }, - "reject": { - "$ref": "OrderreturnsRejectOperation", - "description": "Rejects the item." + "errors": { + "$ref": "Errors", + "description": "A list of errors defined if, and only if, the request failed." }, - "returnItemId": { - "description": "Unit level ID for the return item. Different units of the same product will have different IDs.", - "type": "string" - } - }, - "type": "object" - }, - "OrdersAcknowledgeRequest": { - "id": "OrdersAcknowledgeRequest", - "properties": { - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "gmbAccounts": { + "$ref": "GmbAccounts", + "description": "The list of accessible Business Profiles." + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponseEntry`\"", "type": "string" + }, + "liaSettings": { + "$ref": "LiaSettings", + "description": "The retrieved or updated Lia settings." + }, + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The updated omnichannel experience for a country." + }, + "posDataProviders": { + "description": "The list of POS data providers.", + "items": { + "$ref": "PosDataProviders" + }, + "type": "array" } }, "type": "object" }, - "OrdersAcknowledgeResponse": { - "id": "OrdersAcknowledgeResponse", + "LiasettingsGetAccessibleGmbAccountsResponse": { + "id": "LiasettingsGetAccessibleGmbAccountsResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "accountId": { + "description": "The ID of the Merchant Center account.", + "format": "uint64", "type": "string" }, + "gmbAccounts": { + "description": "A list of Business Profiles which are available to the merchant.", + "items": { + "$ref": "GmbAccountsGmbAccount" + }, + "type": "array" + }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersAcknowledgeResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsGetAccessibleGmbAccountsResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersAdvanceTestOrderResponse": { - "id": "OrdersAdvanceTestOrderResponse", + "LiasettingsListPosDataProvidersResponse": { + "id": "LiasettingsListPosDataProvidersResponse", "properties": { "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersAdvanceTestOrderResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListPosDataProvidersResponse`\".", "type": "string" + }, + "posDataProviders": { + "description": "The list of POS data providers for each eligible country", + "items": { + "$ref": "PosDataProviders" + }, + "type": "array" } }, "type": "object" }, - "OrdersCancelLineItemRequest": { - "id": "OrdersCancelLineItemRequest", + "LiasettingsListResponse": { + "id": "LiasettingsListResponse", "properties": { - "lineItemId": { - "description": "The ID of the line item to cancel. Either lineItemId or productId is required.", - "type": "string" - }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListResponse`\".", "type": "string" }, - "quantity": { - "description": "The quantity to cancel.", - "format": "uint32", - "type": "integer" - }, - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", + "nextPageToken": { + "description": "The token for the retrieval of the next page of LIA settings.", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "resources": { + "items": { + "$ref": "LiaSettings" + }, + "type": "array" } }, "type": "object" }, - "OrdersCancelLineItemResponse": { - "id": "OrdersCancelLineItemResponse", + "LiasettingsRequestGmbAccessResponse": { + "id": "LiasettingsRequestGmbAccessResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelLineItemResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestGmbAccessResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelRequest": { - "id": "OrdersCancelRequest", + "LiasettingsRequestInventoryVerificationResponse": { + "id": "LiasettingsRequestInventoryVerificationResponse", "properties": { - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", - "type": "string" - }, - "reasonText": { - "description": "The explanation of the reason.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestInventoryVerificationResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelResponse": { - "id": "OrdersCancelResponse", + "LiasettingsSetInventoryVerificationContactResponse": { + "id": "LiasettingsSetInventoryVerificationContactResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetInventoryVerificationContactResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelTestOrderByCustomerRequest": { - "id": "OrdersCancelTestOrderByCustomerRequest", + "LiasettingsSetPosDataProviderResponse": { + "id": "LiasettingsSetPosDataProviderResponse", "properties": { - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`changedMind`\" - \"`orderedWrongItem`\" - \"`other`\" ", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetPosDataProviderResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelTestOrderByCustomerResponse": { - "id": "OrdersCancelTestOrderByCustomerResponse", + "LinkService": { + "id": "LinkService", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelTestOrderByCustomerResponse`\".", + "service": { + "description": "Service provided to or by the linked account. Acceptable values are: - \"`shoppingActionsOrderManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingAdsProductManagement`\" - \"`paymentProcessing`\" ", + "type": "string" + }, + "status": { + "description": "Status of the link Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrdersCreateTestOrderRequest": { - "id": "OrdersCreateTestOrderRequest", + "LinkedAccount": { + "id": "LinkedAccount", "properties": { - "country": { - "description": "The CLDR territory code of the country of the test order to create. Affects the currency and addresses of orders created through `template_name`, or the addresses of orders created through `test_order`. Acceptable values are: - \"`US`\" - \"`FR`\" Defaults to \"`US`\".", - "type": "string" - }, - "templateName": { - "description": "The test order template to use. Specify as an alternative to `testOrder` as a shortcut for retrieving a template and then creating an order using that template. Acceptable values are: - \"`template1`\" - \"`template1a`\" - \"`template1b`\" - \"`template2`\" - \"`template3`\" ", + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" }, - "testOrder": { - "$ref": "TestOrder", - "description": "The test order to create." + "services": { + "description": "List of provided services.", + "items": { + "$ref": "LinkService" + }, + "type": "array" } }, "type": "object" }, - "OrdersCreateTestOrderResponse": { - "id": "OrdersCreateTestOrderResponse", + "ListAccountLabelsResponse": { + "description": "Response message for the `ListAccountLabels` method.", + "id": "ListAccountLabelsResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCreateTestOrderResponse`\".", - "type": "string" + "accountLabels": { + "description": "The labels from the specified account.", + "items": { + "$ref": "AccountLabel" + }, + "type": "array" }, - "orderId": { - "description": "The ID of the newly created test order.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "OrdersCreateTestReturnRequest": { - "id": "OrdersCreateTestReturnRequest", + "ListAccountReturnCarrierResponse": { + "description": "Response for listing account return carriers.", + "id": "ListAccountReturnCarrierResponse", "properties": { - "items": { - "description": "Returned items.", + "accountReturnCarriers": { + "description": "List of all available account return carriers for the merchant.", "items": { - "$ref": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem" + "$ref": "AccountReturnCarrier" }, "type": "array" } }, "type": "object" }, - "OrdersCreateTestReturnResponse": { - "id": "OrdersCreateTestReturnResponse", + "ListCollectionStatusesResponse": { + "description": "Response message for the ListCollectionStatuses method.", + "id": "ListCollectionStatusesResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCreateTestReturnResponse`\".", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "returnId": { - "description": "The ID of the newly created test order return.", - "type": "string" + "resources": { + "description": "The collectionstatuses listed.", + "items": { + "$ref": "CollectionStatus" + }, + "type": "array" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem": { - "id": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem", + "ListCollectionsResponse": { + "description": "Response message for the ListCollections method.", + "id": "ListCollectionsResponse", "properties": { - "lineItemId": { - "description": "The ID of the line item to return.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "quantity": { - "description": "Quantity that is returned.", - "format": "uint32", - "type": "integer" + "resources": { + "description": "The collections listed.", + "items": { + "$ref": "Collection" + }, + "type": "array" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryRefundItemItem": { - "id": "OrdersCustomBatchRequestEntryRefundItemItem", + "ListConversionSourcesResponse": { + "description": "Response message for the ListConversionSources method.", + "id": "ListConversionSourcesResponse", "properties": { - "amount": { - "$ref": "MonetaryAmount", - "description": "The total amount that is refunded. (for example, refunding $5 each for 2 products should be done by setting quantity to 2 and amount to 10$) In case of multiple refunds, this should be the amount you currently want to refund to the customer." - }, - "fullRefund": { - "description": "If true, the full item will be refunded. If this is true, amount shouldn't be provided and will be ignored.", - "type": "boolean" - }, - "lineItemId": { - "description": "The ID of the line item. Either lineItemId or productId is required.", - "type": "string" + "conversionSources": { + "description": "List of conversion sources.", + "items": { + "$ref": "ConversionSource" + }, + "type": "array" }, - "productId": { - "description": "The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "nextPageToken": { + "description": "Token to be used to fetch the next results page.", "type": "string" - }, - "quantity": { - "description": "The number of products that are refunded.", - "format": "int32", - "type": "integer" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryRefundItemShipping": { - "id": "OrdersCustomBatchRequestEntryRefundItemShipping", + "ListCssesResponse": { + "description": "The response message for the `ListCsses` method", + "id": "ListCssesResponse", "properties": { - "amount": { - "$ref": "Price", - "description": "The amount that is refunded. If this is not the first refund for the shipment, this should be the newly refunded amount." + "csses": { + "description": "The CSS domains affiliated with the specified CSS group.", + "items": { + "$ref": "Css" + }, + "type": "array" }, - "fullRefund": { - "description": "If set to true, all shipping costs for the order will be refunded. If this is true, amount shouldn't be provided and will be ignored. If set to false, submit the amount of the partial shipping refund, excluding the shipping tax. The shipping tax is calculated and handled on Google's side.", - "type": "boolean" + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo": { - "id": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo", + "ListMethodQuotasResponse": { + "description": "Response message for the ListMethodQuotas method.", + "id": "ListMethodQuotasResponse", "properties": { - "carrier": { - "description": "The carrier handling the shipment. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values.", - "type": "string" - }, - "shipmentId": { - "description": "Required. The ID of the shipment. This is assigned by the merchant and is unique to each shipment.", - "type": "string" + "methodQuotas": { + "description": "The current quota usage and limits per each method.", + "items": { + "$ref": "MethodQuota" + }, + "type": "array" }, - "trackingId": { - "description": "The tracking ID for the shipment.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails": { - "description": "ScheduledDeliveryDetails used to update the scheduled delivery order.", - "id": "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails", + "ListPromotionResponse": { + "description": "Response message for Promotions.List method.", + "id": "ListPromotionResponse", "properties": { - "carrierPhoneNumber": { - "description": "The phone number of the carrier fulfilling the delivery. The phone number should be formatted as the international notation in", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "scheduledDate": { - "description": "The date a shipment is scheduled for delivery, in ISO 8601 format.", - "type": "string" + "promotions": { + "description": "List of all available promotions for the merchant.", + "items": { + "$ref": "Promotion" + }, + "type": "array" } }, "type": "object" }, - "OrdersGetByMerchantOrderIdResponse": { - "id": "OrdersGetByMerchantOrderIdResponse", + "ListRegionsResponse": { + "description": "Response message for the `ListRegions` method.", + "id": "ListRegionsResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersGetByMerchantOrderIdResponse`\".", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "order": { - "$ref": "Order", - "description": "The requested order." + "regions": { + "description": "The regions from the specified merchant.", + "items": { + "$ref": "Region" + }, + "type": "array" } }, "type": "object" }, - "OrdersGetTestOrderTemplateResponse": { - "id": "OrdersGetTestOrderTemplateResponse", + "ListReturnPolicyOnlineResponse": { + "description": "Response message for the `ListReturnPolicyOnline` method.", + "id": "ListReturnPolicyOnlineResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersGetTestOrderTemplateResponse`\".", - "type": "string" - }, - "template": { - "$ref": "TestOrder", - "description": "The requested test order template." + "returnPolicies": { + "description": "The retrieved return policies.", + "items": { + "$ref": "ReturnPolicyOnline" + }, + "type": "array" } }, "type": "object" }, - "OrdersInStoreRefundLineItemRequest": { - "id": "OrdersInStoreRefundLineItemRequest", + "LocalInventory": { + "description": "Local inventory resource. For accepted attribute values, see the local product inventory feed specification.", + "id": "LocalInventory", "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", + "availability": { + "description": "The availability of the product. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "customAttributes": { + "description": "A list of custom (merchant-provided) attributes. Can also be used to submit any attribute of the feed specification in its generic form, for example, `{ \"name\": \"size type\", \"value\": \"regular\" }`.", + "items": { + "$ref": "CustomAttribute" + }, + "type": "array" + }, + "instoreProductLocation": { + "description": "The in-store product location.", "type": "string" }, - "priceAmount": { - "$ref": "Price", - "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. Required." + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localInventory`\"", + "type": "string" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "pickupMethod": { + "description": "The supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, + "pickupSla": { + "description": "The expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", + "type": "string" + }, + "price": { + "$ref": "Price", + "description": "The price of the product." + }, "quantity": { - "description": "The quantity to return and refund.", + "description": "The quantity of the product. Must be nonnegative.", + "format": "uint32", + "type": "integer" + }, + "salePrice": { + "$ref": "Price", + "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." + }, + "salePriceEffectiveDate": { + "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates may be specified as 'null' if undecided.", + "type": "string" + }, + "storeCode": { + "description": "Required. The store code of this local inventory resource.", + "type": "string" + } + }, + "type": "object" + }, + "LocalinventoryCustomBatchRequest": { + "id": "LocalinventoryCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "LocalinventoryCustomBatchRequestEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "LocalinventoryCustomBatchRequestEntry": { + "description": "Batch entry encoding a single local inventory update request.", + "id": "LocalinventoryCustomBatchRequestEntry", + "properties": { + "batchId": { + "description": "An entry ID, unique within the batch request.", "format": "uint32", "type": "integer" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "localInventory": { + "$ref": "LocalInventory", + "description": "Local inventory of the product." + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "method": { + "description": "Method of the batch request entry. Acceptable values are: - \"`insert`\" ", "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "The amount of tax to be refunded. Required." + "productId": { + "description": "The ID of the product for which to update local inventory.", + "type": "string" } }, "type": "object" }, - "OrdersInStoreRefundLineItemResponse": { - "id": "OrdersInStoreRefundLineItemResponse", + "LocalinventoryCustomBatchResponse": { + "id": "LocalinventoryCustomBatchResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "LocalinventoryCustomBatchResponseEntry" + }, + "type": "array" }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersInStoreRefundLineItemResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersListResponse": { - "id": "OrdersListResponse", + "LocalinventoryCustomBatchResponseEntry": { + "description": "Batch entry encoding a single local inventory update response.", + "id": "LocalinventoryCustomBatchResponseEntry", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersListResponse`\".", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of orders.", - "type": "string" + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "resources": { - "items": { - "$ref": "Order" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponseEntry`\"", + "type": "string" } }, "type": "object" }, - "OrdersRefundItemRequest": { - "id": "OrdersRefundItemRequest", + "LocationIdSet": { + "id": "LocationIdSet", "properties": { - "items": { - "description": "The items that are refunded. Either Item or Shipping must be provided in the request.", + "locationIds": { + "description": "A non-empty list of location IDs. They must all be of the same location type (for example, state).", "items": { - "$ref": "OrdersCustomBatchRequestEntryRefundItemItem" + "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "LoyaltyProgram": { + "description": "Allows the setting up of loyalty program benefits (for example price or points). https://support.google.com/merchants/answer/12922446", + "id": "LoyaltyProgram", + "properties": { + "cashbackForFutureUse": { + "$ref": "Price", + "description": "Optional. The cashback that can be used for future purchases." }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "loyaltyPoints": { + "description": "Optional. The amount of loyalty points earned on a purchase.", + "format": "int64", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`shippingCostAdjustment`\" - \"`priceAdjustment`\" - \"`taxAdjustment`\" - \"`feeAdjustment`\" - \"`courtesyAdjustment`\" - \"`adjustment`\" - \"`customerCancelled`\" - \"`noInventory`\" - \"`productNotAsDescribed`\" - \"`undeliverableShippingAddress`\" - \"`wrongProductShipped`\" - \"`lateShipmentCredit`\" - \"`deliveredLateByCarrier`\" - \"`productArrivedDamaged`\" ", + "memberPriceEffectiveDate": { + "description": "Optional. A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "price": { + "$ref": "Price", + "description": "Optional. The price for members of the given tier (instant discount price). Must be smaller or equal to the regular price." }, - "shipping": { - "$ref": "OrdersCustomBatchRequestEntryRefundItemShipping", - "description": "The refund on shipping. Optional, but either Item or Shipping must be provided in the request." - } - }, - "type": "object" - }, - "OrdersRefundItemResponse": { - "id": "OrdersRefundItemResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "programLabel": { + "description": "Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRefundItemResponse`\".", + "tierLabel": { + "description": "Required. The label of the tier within the loyalty program. Must match one of the labels within the program.", "type": "string" } }, "type": "object" }, - "OrdersRefundOrderRequest": { - "id": "OrdersRefundOrderRequest", + "MerchantCenterDestination": { + "description": "\"Merchant Center Destination\" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created.", + "id": "MerchantCenterDestination", "properties": { - "amount": { - "$ref": "MonetaryAmount", - "description": "The amount that is refunded. If this is not the first refund for the order, this should be the newly refunded amount." - }, - "fullRefund": { - "description": "If true, the full order will be refunded, including shipping. If this is true, amount shouldn't be provided and will be ignored.", - "type": "boolean" + "attributionSettings": { + "$ref": "AttributionSettings", + "description": "Required. Attribution settings being used for the Merchant Center Destination." }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "currencyCode": { + "description": "Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`courtesyAdjustment`\" - \"`other`\" ", + "destinationId": { + "description": "Output only. Merchant Center Destination ID.", + "readOnly": true, "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "displayName": { + "description": "Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.", "type": "string" } }, "type": "object" }, - "OrdersRefundOrderResponse": { - "id": "OrdersRefundOrderResponse", + "MethodQuota": { + "description": "The quota information per method in the Content API.", + "id": "MethodQuota", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "method": { + "description": "Output only. The method name, for example `products.list`. Method name does not contain version because quota can be shared between different API versions of the same method.", + "readOnly": true, "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRefundOrderResponse`\".", + "quotaLimit": { + "description": "Output only. The maximum number of calls allowed per day for the method.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "quotaMinuteLimit": { + "description": "Output only. The maximum number of calls allowed per minute for the method.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "quotaUsage": { + "description": "Output only. The current quota usage, meaning the number of calls already made to the method per day. Usage is reset every day at 12 PM midday UTC.", + "format": "int64", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrdersRejectReturnLineItemRequest": { - "id": "OrdersRejectReturnLineItemRequest", + "Metrics": { + "description": "Performance metrics. Values are only set for metrics requested explicitly in the request's search query.", + "id": "Metrics", "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", - "type": "string" + "aos": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" + "aovMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order value in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "clicks": { + "description": "Number of clicks.", + "format": "int64", "type": "string" }, - "quantity": { - "description": "The quantity to return and refund.", - "format": "uint32", - "type": "integer" + "conversionRate": { + "description": "Number of conversions divided by the number of clicks, reported on the impression date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", + "format": "double", + "type": "number" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`damagedOrUsed`\" - \"`missingComponent`\" - \"`notEligible`\" - \"`other`\" - \"`outOfReturnWindow`\" ", + "conversionValueMicros": { + "description": "Value of conversions in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) attributed to the product, reported on the conversion date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "format": "int64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "conversions": { + "description": "Number of conversions attributed to the product, reported on the conversion date. Depending on the attribution model, a conversion might be distributed across multiple clicks, where each click gets its own credit assigned. This metric is a sum of all such credits. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", + "format": "double", + "type": "number" + }, + "ctr": { + "description": "Click-through rate - the number of clicks merchant's products receive (clicks) divided by the number of times the products are shown (impressions).", + "format": "double", + "type": "number" + }, + "daysToShip": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" + }, + "impressions": { + "description": "Number of times merchant's products are shown.", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersRejectReturnLineItemResponse": { - "id": "OrdersRejectReturnLineItemResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + }, + "itemDaysToShip": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an item being ordered and the item being **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "itemFillRate": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "orderedItemSalesMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros). Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRejectReturnLineItemResponse`\".", + "orderedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersReturnRefundLineItemRequest": { - "id": "OrdersReturnRefundLineItemRequest", - "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", + }, + "orders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "int64", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "rejectedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items canceled by the merchant, reported on the order date. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "priceAmount": { - "$ref": "Price", - "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. If omitted, refundless return is assumed." + "returnRate": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "returnedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items sent back for return, reported on the date when the merchant accepted the return. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "quantity": { - "description": "The quantity to return and refund. Quantity is required.", - "format": "uint32", - "type": "integer" + "returnsMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items sent back for return in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", + "type": "string" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "shippedItemSalesMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of shipped items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", + "type": "string" + }, + "shippedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of shipped items, reported on the shipment date. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "shippedOrders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "int64", "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "The amount of tax to be refunded. Optional, but if filled, then priceAmount must be set. Calculated automatically if not provided." + "unshippedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "unshippedOrders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" } }, "type": "object" }, - "OrdersReturnRefundLineItemResponse": { - "id": "OrdersReturnRefundLineItemResponse", + "MinimumOrderValueTable": { + "id": "MinimumOrderValueTable", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersReturnRefundLineItemResponse`\".", - "type": "string" + "storeCodeSetWithMovs": { + "items": { + "$ref": "MinimumOrderValueTableStoreCodeSetWithMov" + }, + "type": "array" } }, "type": "object" }, - "OrdersSetLineItemMetadataRequest": { - "id": "OrdersSetLineItemMetadataRequest", + "MinimumOrderValueTableStoreCodeSetWithMov": { + "description": "A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency.", + "id": "MinimumOrderValueTableStoreCodeSetWithMov", "properties": { - "annotations": { + "storeCodes": { + "description": "A list of unique store codes or empty for the catch all.", "items": { - "$ref": "OrderMerchantProvidedAnnotation" + "type": "string" }, "type": "array" }, - "lineItemId": { - "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.", - "type": "string" - }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.", - "type": "string" + "value": { + "$ref": "Price", + "description": "The minimum order value for the given stores." } }, "type": "object" }, - "OrdersSetLineItemMetadataResponse": { - "id": "OrdersSetLineItemMetadataResponse", + "OrderTrackingSignal": { + "description": "Represents a merchant trade from which signals are extracted, e.g. shipping.", + "id": "OrderTrackingSignal", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "customerShippingFee": { + "$ref": "PriceAmount", + "description": "The shipping fee of the order; this value should be set to zero in the case of free shipping." + }, + "deliveryPostalCode": { + "description": "Required. The delivery postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersSetLineItemMetadataResponse`\".", + "deliveryRegionCode": { + "description": "Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination.", "type": "string" - } - }, - "type": "object" - }, - "OrdersShipLineItemsRequest": { - "id": "OrdersShipLineItemsRequest", - "properties": { + }, "lineItems": { - "description": "Line items to ship.", + "description": "Information about line items in the order.", "items": { - "$ref": "OrderShipmentLineItemShipment" + "$ref": "OrderTrackingSignalLineItemDetails" }, "type": "array" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "merchantId": { + "description": "The Google merchant ID of this order tracking signal. This value is optional. If left unset, the caller's merchant ID is used. You must request access in order to provide data on behalf of another merchant. For more information, see [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking-signals).", + "format": "int64", + "type": "string" + }, + "orderCreatedTime": { + "$ref": "DateTime", + "description": "Required. The time when the order was created on the merchant side. Include the year and timezone string, if available." + }, + "orderId": { + "description": "Required. The ID of the order on the merchant side. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" }, - "shipmentGroupId": { - "description": "ID of the shipment group. Required for orders that use the orderinvoices service.", + "orderTrackingSignalId": { + "description": "Output only. The ID that uniquely identifies this order tracking signal.", + "format": "int64", + "readOnly": true, "type": "string" }, - "shipmentInfos": { - "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "shipmentLineItemMapping": { + "description": "The mapping of the line items to the shipment information.", + "items": { + "$ref": "OrderTrackingSignalShipmentLineItemMapping" + }, + "type": "array" + }, + "shippingInfo": { + "description": "The shipping information for the order.", "items": { - "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + "$ref": "OrderTrackingSignalShippingInfo" }, "type": "array" } }, "type": "object" }, - "OrdersShipLineItemsResponse": { - "id": "OrdersShipLineItemsResponse", + "OrderTrackingSignalLineItemDetails": { + "description": "The line items of the order.", + "id": "OrderTrackingSignalLineItemDetails", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "brand": { + "description": "Brand of the product.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersShipLineItemsResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateLineItemShippingDetailsRequest": { - "id": "OrdersUpdateLineItemShippingDetailsRequest", - "properties": { - "deliverByDate": { - "description": "Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. Provided date should be within 1 year timeframe and can't be a date in the past.", + "gtin": { + "description": "The Global Trade Item Number.", "type": "string" }, "lineItemId": { - "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.", + "description": "Required. The ID for this line item.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "mpn": { + "description": "The manufacturer part number.", "type": "string" }, - "productId": { - "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "productDescription": { + "deprecated": true, + "description": "Plain text description of this product (deprecated: Please use product_title instead).", "type": "string" }, - "shipByDate": { - "description": "Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. Provided date should be within 1 year timeframe and can't be a date in the past.", + "productId": { + "description": "Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.", "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateLineItemShippingDetailsResponse": { - "id": "OrdersUpdateLineItemShippingDetailsResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + }, + "productTitle": { + "description": "Plain text title of this product.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateLineItemShippingDetailsResponse`\".", + "quantity": { + "description": "The quantity of the line item in the order.", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateMerchantOrderIdRequest": { - "id": "OrdersUpdateMerchantOrderIdRequest", - "properties": { - "merchantOrderId": { - "description": "The merchant order id to be assigned to the order. Must be unique per merchant.", + }, + "sku": { + "deprecated": true, + "description": "Merchant SKU for this item (deprecated).", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "upc": { + "deprecated": true, + "description": "Universal product code for this item (deprecated: Please use GTIN instead).", "type": "string" } }, "type": "object" }, - "OrdersUpdateMerchantOrderIdResponse": { - "id": "OrdersUpdateMerchantOrderIdResponse", + "OrderTrackingSignalShipmentLineItemMapping": { + "description": "Represents how many items are in the shipment for the given shipment_id and line_item_id.", + "id": "OrderTrackingSignalShipmentLineItemMapping", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "lineItemId": { + "description": "Required. The line item ID.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateMerchantOrderIdResponse`\".", + "quantity": { + "description": "The line item quantity in the shipment.", + "format": "int64", + "type": "string" + }, + "shipmentId": { + "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" } }, "type": "object" }, - "OrdersUpdateShipmentRequest": { - "id": "OrdersUpdateShipmentRequest", + "OrderTrackingSignalShippingInfo": { + "description": "The shipping information for the order.", + "id": "OrderTrackingSignalShippingInfo", "properties": { - "carrier": { - "description": "The carrier handling the shipment. Not updated if missing. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values.", - "type": "string" - }, - "deliveryDate": { - "description": "Date on which the shipment has been delivered, in ISO 8601 format. Optional and can be provided only if `status` is `delivered`.", - "type": "string" + "actualDeliveryTime": { + "$ref": "DateTime", + "description": "The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "lastPickupDate": { - "description": "Date after which the pickup will expire, in ISO 8601 format. Required only when order is buy-online-pickup-in-store(BOPIS) and `status` is `ready for pickup`.", + "carrierName": { + "description": "The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "carrierServiceName": { + "description": "The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc.", "type": "string" }, - "readyPickupDate": { - "description": "Date on which the shipment has been ready for pickup, in ISO 8601 format. Optional and can be provided only if `status` is `ready for pickup`.", - "type": "string" + "earliestDeliveryPromiseTime": { + "$ref": "DateTime", + "description": "The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "scheduledDeliveryDetails": { - "$ref": "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails", - "description": "Delivery details of the shipment if scheduling is needed." + "latestDeliveryPromiseTime": { + "$ref": "DateTime", + "description": "The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "shipmentId": { - "description": "The ID of the shipment.", + "originPostalCode": { + "description": "The origin postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", "type": "string" }, - "status": { - "description": "New status for the shipment. Not updated if missing. Acceptable values are: - \"`delivered`\" - \"`undeliverable`\" - \"`readyForPickup`\" ", + "originRegionCode": { + "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping origin.", "type": "string" }, - "trackingId": { - "description": "The tracking ID for the shipment. Not updated if missing.", + "shipmentId": { + "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" }, - "undeliveredDate": { - "description": "Date on which the shipment has been undeliverable, in ISO 8601 format. Optional and can be provided only if `status` is `undeliverable`.", - "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateShipmentResponse": { - "id": "OrdersUpdateShipmentResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "shippedTime": { + "$ref": "DateTime", + "description": "The time when the shipment was shipped. Include the year and timezone string, if available." + }, + "shippingStatus": { + "description": "The status of the shipment.", + "enum": [ + "SHIPPING_STATE_UNSPECIFIED", + "SHIPPED", + "DELIVERED" + ], + "enumDescriptions": [ + "The shipping status is not known to merchant.", + "All items are shipped.", + "The shipment is already delivered." + ], "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateShipmentResponse`\".", + "trackingId": { + "description": "The tracking ID of the shipment. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", "type": "string" } }, "type": "object" }, - "PauseBuyOnGoogleProgramRequest": { - "description": "Request message for the PauseProgram method.", - "id": "PauseBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, "PaymentServiceProviderLinkInfo": { "description": "Additional information required for PAYMENT_SERVICE_PROVIDER link type.", "id": "PaymentServiceProviderLinkInfo", @@ -14553,24 +10681,6 @@ }, "type": "object" }, - "ProductAmount": { - "id": "ProductAmount", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax price depending on the location of the order." - }, - "remittedTaxAmount": { - "$ref": "Price", - "description": "Remitted tax value." - }, - "taxAmount": { - "$ref": "Price", - "description": "Tax value." - } - }, - "type": "object" - }, "ProductCertification": { "description": "Product [certification](https://support.google.com/merchants/answer/13528839), introduced for EU energy efficiency labeling compliance using the [EU EPREL](https://eprel.ec.europa.eu/screen/home) database.", "id": "ProductCertification", @@ -16229,20 +12339,6 @@ }, "type": "object" }, - "RefundReason": { - "id": "RefundReason", - "properties": { - "description": { - "description": "Description of the reason.", - "type": "string" - }, - "reasonCode": { - "description": "Code of the refund reason. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" - } - }, - "type": "object" - }, "Region": { "description": "Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets.", "id": "Region", @@ -16678,12 +12774,6 @@ }, "type": "object" }, - "RequestReviewBuyOnGoogleProgramRequest": { - "description": "Request message for the RequestReviewProgram method.", - "id": "RequestReviewBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, "RequestReviewFreeListingsRequest": { "description": "Request message for the RequestReviewFreeListings Program method.", "id": "RequestReviewFreeListingsRequest", @@ -17013,122 +13103,40 @@ }, "ReturnPolicyPolicy": { "id": "ReturnPolicyPolicy", - "properties": { - "lastReturnDate": { - "description": "Required. Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to \"lastReturnDate\". Use this for seasonal overrides only.", - "type": "string" - }, - "numberOfDays": { - "description": "The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to \"numberOfDaysAfterDelivery\". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "Policy type. Use \"lastReturnDate\" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items. Acceptable values are: - \"`lastReturnDate`\" - \"`lifetimeReturns`\" - \"`noReturns`\" - \"`numberOfDaysAfterDelivery`\" ", - "type": "string" - } - }, - "type": "object" - }, - "ReturnPolicySeasonalOverride": { - "id": "ReturnPolicySeasonalOverride", - "properties": { - "endDate": { - "description": "Required. Last day on which the override applies. In ISO 8601 format.", - "type": "string" - }, - "name": { - "description": "Required. The name of the seasonal override as shown in Merchant Center.", - "type": "string" - }, - "policy": { - "$ref": "ReturnPolicyPolicy", - "description": "Required. The policy which is in effect during that time." - }, - "startDate": { - "description": "Required. First day on which the override applies. In ISO 8601 format.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnPricingInfo": { - "id": "ReturnPricingInfo", - "properties": { - "chargeReturnShippingFee": { - "description": "Default option for whether merchant should charge the customer for return shipping costs, based on customer selected return reason and merchant's return policy for the items being returned.", - "type": "boolean" - }, - "maxReturnShippingFee": { - "$ref": "MonetaryAmount", - "description": "Maximum return shipping costs that may be charged to the customer depending on merchant's assessment of the return reason and the merchant's return policy for the items being returned." - }, - "refundableItemsTotalAmount": { - "$ref": "MonetaryAmount", - "description": "Total amount that can be refunded for the items in this return. It represents the total amount received by the merchant for the items, after applying merchant coupons." - }, - "refundableShippingAmount": { - "$ref": "MonetaryAmount", - "description": "Maximum amount that can be refunded for the original shipping fee." - }, - "totalRefundedAmount": { - "$ref": "MonetaryAmount", - "description": "Total amount already refunded by the merchant. It includes all types of refunds (items, shipping, etc.) Not provided if no refund has been applied yet." - } - }, - "type": "object" - }, - "ReturnShipment": { - "id": "ReturnShipment", - "properties": { - "creationDate": { - "description": "The date of creation of the shipment, in ISO 8601 format.", - "type": "string" - }, - "deliveryDate": { - "description": "The date of delivery of the shipment, in ISO 8601 format.", - "type": "string" - }, - "returnMethodType": { - "description": "Type of the return method. Acceptable values are: - \"`byMail`\" - \"`contactCustomerSupport`\" - \"`returnless`\" - \"`inStore`\" ", - "type": "string" - }, - "shipmentId": { - "description": "Shipment ID generated by Google.", + "properties": { + "lastReturnDate": { + "description": "Required. Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to \"lastReturnDate\". Use this for seasonal overrides only.", "type": "string" }, - "shipmentTrackingInfos": { - "description": "Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially.", - "items": { - "$ref": "ShipmentTrackingInfo" - }, - "type": "array" - }, - "shippingDate": { - "description": "The date of shipping of the shipment, in ISO 8601 format.", + "numberOfDays": { + "description": "The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to \"numberOfDaysAfterDelivery\". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.", + "format": "int64", "type": "string" }, - "state": { - "description": "State of the shipment. Acceptable values are: - \"`completed`\" - \"`new`\" - \"`shipped`\" - \"`undeliverable`\" - \"`pending`\" ", + "type": { + "description": "Policy type. Use \"lastReturnDate\" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items. Acceptable values are: - \"`lastReturnDate`\" - \"`lifetimeReturns`\" - \"`noReturns`\" - \"`numberOfDaysAfterDelivery`\" ", "type": "string" } }, "type": "object" }, - "ReturnShippingLabel": { - "description": "Return shipping label for a Buy on Google merchant-managed return.", - "id": "ReturnShippingLabel", + "ReturnPolicySeasonalOverride": { + "id": "ReturnPolicySeasonalOverride", "properties": { - "carrier": { - "description": "Name of the carrier.", + "endDate": { + "description": "Required. Last day on which the override applies. In ISO 8601 format.", "type": "string" }, - "labelUri": { - "description": "The URL for the return shipping label in PDF format", + "name": { + "description": "Required. The name of the seasonal override as shown in Merchant Center.", "type": "string" }, - "trackingId": { - "description": "The tracking id of this return label.", + "policy": { + "$ref": "ReturnPolicyPolicy", + "description": "Required. The policy which is in effect during that time." + }, + "startDate": { + "description": "Required. First day on which the override applies. In ISO 8601 format.", "type": "string" } }, @@ -17803,66 +13811,6 @@ }, "type": "object" }, - "ShipmentInvoice": { - "id": "ShipmentInvoice", - "properties": { - "invoiceSummary": { - "$ref": "InvoiceSummary", - "description": "[required] Invoice summary." - }, - "lineItemInvoices": { - "description": "[required] Invoice details per line item.", - "items": { - "$ref": "ShipmentInvoiceLineItemInvoice" - }, - "type": "array" - }, - "shipmentGroupId": { - "description": "[required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges.", - "type": "string" - } - }, - "type": "object" - }, - "ShipmentInvoiceLineItemInvoice": { - "id": "ShipmentInvoiceLineItemInvoice", - "properties": { - "lineItemId": { - "description": "ID of the line item. Either lineItemId or productId must be set.", - "type": "string" - }, - "productId": { - "description": "ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.", - "type": "string" - }, - "shipmentUnitIds": { - "description": "[required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units).", - "items": { - "type": "string" - }, - "type": "array" - }, - "unitInvoice": { - "$ref": "UnitInvoice", - "description": "[required] Invoice details for a single unit." - } - }, - "type": "object" - }, - "ShipmentTrackingInfo": { - "id": "ShipmentTrackingInfo", - "properties": { - "carrier": { - "description": "The shipping carrier that handles the package. Acceptable values are: - \"`boxtal`\" - \"`bpost`\" - \"`chronopost`\" - \"`colisPrive`\" - \"`colissimo`\" - \"`cxt`\" - \"`deliv`\" - \"`dhl`\" - \"`dpd`\" - \"`dynamex`\" - \"`eCourier`\" - \"`easypost`\" - \"`efw`\" - \"`fedex`\" - \"`fedexSmartpost`\" - \"`geodis`\" - \"`gls`\" - \"`googleCourier`\" - \"`gsx`\" - \"`jdLogistics`\" - \"`laPoste`\" - \"`lasership`\" - \"`manual`\" - \"`mpx`\" - \"`onTrac`\" - \"`other`\" - \"`tnt`\" - \"`uds`\" - \"`ups`\" - \"`usps`\" ", - "type": "string" - }, - "trackingNumber": { - "description": "The tracking number for the package.", - "type": "string" - } - }, - "type": "object" - }, "ShippingSettings": { "description": "The merchant account's shipping settings. All methods except getsupportedcarriers and getsupportedholidays require the admin role.", "id": "ShippingSettings", @@ -18220,258 +14168,6 @@ }, "type": "object" }, - "TestOrder": { - "id": "TestOrder", - "properties": { - "deliveryDetails": { - "$ref": "TestOrderDeliveryDetails", - "description": "Overrides the predefined delivery details if provided." - }, - "enableOrderinvoices": { - "description": "Whether the orderinvoices service should support this order.", - "type": "boolean" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#testOrder`\"", - "type": "string" - }, - "lineItems": { - "description": "Required. Line items that are ordered. At least one line item must be provided.", - "items": { - "$ref": "TestOrderLineItem" - }, - "type": "array" - }, - "notificationMode": { - "description": "Restricted. Do not use.", - "type": "string" - }, - "pickupDetails": { - "$ref": "TestOrderPickupDetails", - "description": "Overrides the predefined pickup details if provided." - }, - "predefinedBillingAddress": { - "description": "Required. The billing address. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "predefinedDeliveryAddress": { - "description": "Required. Identifier of one of the predefined delivery addresses for the delivery. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "predefinedEmail": { - "description": "Required. Email address of the customer. Acceptable values are: - \"`pog.dwight.schrute@gmail.com`\" - \"`pog.jim.halpert@gmail.com`\" - \"`penpog.pam.beesly@gmail.comding`\" ", - "type": "string" - }, - "predefinedPickupDetails": { - "description": "Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "promotions": { - "description": "Promotions associated with the order.", - "items": { - "$ref": "OrderPromotion" - }, - "type": "array" - }, - "shippingCost": { - "$ref": "Price", - "description": "Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states." - }, - "shippingOption": { - "description": "Required. The requested shipping option. Acceptable values are: - \"`economy`\" - \"`expedited`\" - \"`oneDay`\" - \"`sameDay`\" - \"`standard`\" - \"`twoDay`\" ", - "type": "string" - } - }, - "type": "object" - }, - "TestOrderAddress": { - "id": "TestOrderAddress", - "properties": { - "country": { - "description": "CLDR country code (for example, \"US\").", - "type": "string" - }, - "fullAddress": { - "description": "Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States ", - "items": { - "type": "string" - }, - "type": "array" - }, - "isPostOfficeBox": { - "description": "Whether the address is a post office box.", - "type": "boolean" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "postalCode": { - "description": "Postal Code or ZIP (for example, \"94043\").", - "type": "string" - }, - "recipientName": { - "description": "Name of the recipient.", - "type": "string" - }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderDeliveryDetails": { - "id": "TestOrderDeliveryDetails", - "properties": { - "address": { - "$ref": "TestOrderAddress", - "description": "The delivery address" - }, - "isScheduledDelivery": { - "description": "Whether the order is scheduled delivery order.", - "type": "boolean" - }, - "phoneNumber": { - "description": "The phone number of the person receiving the delivery.", - "type": "string" - } - }, - "type": "object" - }, - "TestOrderLineItem": { - "id": "TestOrderLineItem", - "properties": { - "product": { - "$ref": "TestOrderLineItemProduct", - "description": "Required. Product data from the time of the order placement." - }, - "quantityOrdered": { - "description": "Required. Number of items ordered.", - "format": "uint32", - "type": "integer" - }, - "returnInfo": { - "$ref": "OrderLineItemReturnInfo", - "description": "Required. Details of the return policy for the line item." - }, - "shippingDetails": { - "$ref": "OrderLineItemShippingDetails", - "description": "Required. Details of the requested shipping for the line item." - } - }, - "type": "object" - }, - "TestOrderLineItemProduct": { - "id": "TestOrderLineItemProduct", - "properties": { - "brand": { - "description": "Required. Brand of the item.", - "type": "string" - }, - "condition": { - "description": "Required. Condition or state of the item. Acceptable values are: - \"`new`\" ", - "type": "string" - }, - "contentLanguage": { - "description": "Required. The two-letter ISO 639-1 language code for the item. Acceptable values are: - \"`en`\" - \"`fr`\" ", - "type": "string" - }, - "fees": { - "description": "Fees for the item. Optional.", - "items": { - "$ref": "OrderLineItemProductFee" - }, - "type": "array" - }, - "gtin": { - "description": "Global Trade Item Number (GTIN) of the item. Optional.", - "type": "string" - }, - "imageLink": { - "description": "Required. URL of an image of the item.", - "type": "string" - }, - "itemGroupId": { - "description": "Shared identifier for all variants of the same product. Optional.", - "type": "string" - }, - "mpn": { - "description": "Manufacturer Part Number (MPN) of the item. Optional.", - "type": "string" - }, - "offerId": { - "description": "Required. An identifier of the item.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied." - }, - "targetCountry": { - "description": "Required. The CLDR territory code of the target country of the product.", - "type": "string" - }, - "title": { - "description": "Required. The title of the product.", - "type": "string" - }, - "variantAttributes": { - "description": "Variant attributes for the item. Optional.", - "items": { - "$ref": "OrderLineItemProductVariantAttribute" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderPickupDetails": { - "id": "TestOrderPickupDetails", - "properties": { - "locationCode": { - "description": "Required. Code of the location defined by provider or merchant.", - "type": "string" - }, - "pickupLocationAddress": { - "$ref": "TestOrderAddress", - "description": "Required. Pickup location address." - }, - "pickupLocationType": { - "description": "Pickup location type. Acceptable values are: - \"`locker`\" - \"`store`\" - \"`curbside`\" ", - "type": "string" - }, - "pickupPersons": { - "description": "Required. all pickup persons set by users.", - "items": { - "$ref": "TestOrderPickupDetailsPickupPerson" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderPickupDetailsPickupPerson": { - "id": "TestOrderPickupDetailsPickupPerson", - "properties": { - "name": { - "description": "Required. Full name of the pickup person.", - "type": "string" - }, - "phoneNumber": { - "description": "Required. The phone number of the person picking up the items.", - "type": "string" - } - }, - "type": "object" - }, "TextWithTooltip": { "description": "Block of text that may contain a tooltip with more information.", "id": "TextWithTooltip", @@ -18668,62 +14364,6 @@ "properties": {}, "type": "object" }, - "UnitInvoice": { - "id": "UnitInvoice", - "properties": { - "additionalCharges": { - "description": "Additional charges for a unit, for example, shipping costs.", - "items": { - "$ref": "UnitInvoiceAdditionalCharge" - }, - "type": "array" - }, - "unitPrice": { - "$ref": "Price", - "description": "[required] Pre-tax or post-tax price of one unit depending on the locality of the order. *Note:* Invoicing works on a per unit basis. The `unitPrice` is the price of a single unit, and will be multiplied by the number of entries in `shipmentUnitId`." - }, - "unitPriceTaxes": { - "description": "Tax amounts to apply to the unit price.", - "items": { - "$ref": "UnitInvoiceTaxLine" - }, - "type": "array" - } - }, - "type": "object" - }, - "UnitInvoiceAdditionalCharge": { - "id": "UnitInvoiceAdditionalCharge", - "properties": { - "additionalChargeAmount": { - "$ref": "Amount", - "description": "[required] Amount of the additional charge per unit. *Note:* Invoicing works on a per unit bases. The `additionalChargeAmount` is the amount charged per unit, and will be multiplied by the number of entries in `shipmentUnitID`." - }, - "type": { - "description": "[required] Type of the additional charge. Acceptable values are: - \"`shipping`\" ", - "type": "string" - } - }, - "type": "object" - }, - "UnitInvoiceTaxLine": { - "id": "UnitInvoiceTaxLine", - "properties": { - "taxAmount": { - "$ref": "Price", - "description": "[required] Tax amount for the tax type." - }, - "taxName": { - "description": "Optional name of the tax type. This should only be provided if `taxType` is `otherFeeTax`.", - "type": "string" - }, - "taxType": { - "description": "[required] Type of the tax. Acceptable values are: - \"`otherFee`\" - \"`otherFeeTax`\" - \"`sales`\" ", - "type": "string" - } - }, - "type": "object" - }, "UrlSettings": { "description": "Specifications related to the `Checkout` URL. The `UriTemplate` is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` will be automatically replaced with data from the merchant account with this attribute [offer_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id)", "id": "UrlSettings", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 46657fd967b..bfcdfba6dd7 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -137,7 +137,6 @@ func New(client *http.Client) (*APIService, error) { s.Accounts = NewAccountsService(s) s.Accountstatuses = NewAccountstatusesService(s) s.Accounttax = NewAccounttaxService(s) - s.Buyongoogleprograms = NewBuyongoogleprogramsService(s) s.Collections = NewCollectionsService(s) s.Collectionstatuses = NewCollectionstatusesService(s) s.Conversionsources = NewConversionsourcesService(s) @@ -148,10 +147,6 @@ func New(client *http.Client) (*APIService, error) { s.Liasettings = NewLiasettingsService(s) s.Localinventory = NewLocalinventoryService(s) s.Merchantsupport = NewMerchantsupportService(s) - s.Orderinvoices = NewOrderinvoicesService(s) - s.Orderreports = NewOrderreportsService(s) - s.Orderreturns = NewOrderreturnsService(s) - s.Orders = NewOrdersService(s) s.Ordertrackingsignals = NewOrdertrackingsignalsService(s) s.Pos = NewPosService(s) s.Productdeliverytime = NewProductdeliverytimeService(s) @@ -185,8 +180,6 @@ type APIService struct { Accounttax *AccounttaxService - Buyongoogleprograms *BuyongoogleprogramsService - Collections *CollectionsService Collectionstatuses *CollectionstatusesService @@ -207,14 +200,6 @@ type APIService struct { Merchantsupport *MerchantsupportService - Orderinvoices *OrderinvoicesService - - Orderreports *OrderreportsService - - Orderreturns *OrderreturnsService - - Orders *OrdersService - Ordertrackingsignals *OrdertrackingsignalsService Pos *PosService @@ -324,15 +309,6 @@ type AccounttaxService struct { s *APIService } -func NewBuyongoogleprogramsService(s *APIService) *BuyongoogleprogramsService { - rs := &BuyongoogleprogramsService{s: s} - return rs -} - -type BuyongoogleprogramsService struct { - s *APIService -} - func NewCollectionsService(s *APIService) *CollectionsService { rs := &CollectionsService{s: s} return rs @@ -435,54 +411,6 @@ type MerchantsupportService struct { s *APIService } -func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { - rs := &OrderinvoicesService{s: s} - return rs -} - -type OrderinvoicesService struct { - s *APIService -} - -func NewOrderreportsService(s *APIService) *OrderreportsService { - rs := &OrderreportsService{s: s} - return rs -} - -type OrderreportsService struct { - s *APIService -} - -func NewOrderreturnsService(s *APIService) *OrderreturnsService { - rs := &OrderreturnsService{s: s} - rs.Labels = NewOrderreturnsLabelsService(s) - return rs -} - -type OrderreturnsService struct { - s *APIService - - Labels *OrderreturnsLabelsService -} - -func NewOrderreturnsLabelsService(s *APIService) *OrderreturnsLabelsService { - rs := &OrderreturnsLabelsService{s: s} - return rs -} - -type OrderreturnsLabelsService struct { - s *APIService -} - -func NewOrdersService(s *APIService) *OrdersService { - rs := &OrdersService{s: s} - return rs -} - -type OrdersService struct { - s *APIService -} - func NewOrdertrackingsignalsService(s *APIService) *OrdertrackingsignalsService { rs := &OrdertrackingsignalsService{s: s} return rs @@ -2605,11 +2533,6 @@ func (s ActionReason) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ActivateBuyOnGoogleProgramRequest: Request message for the ActivateProgram -// method. -type ActivateBuyOnGoogleProgramRequest struct { -} - type Address struct { // AdministrativeArea: Required. Top-level administrative subdivision of the // country. For example, a state like California ("CA") or a province like @@ -2673,30 +2596,6 @@ func (s AlternateDisputeResolution) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type Amount struct { - // PriceAmount: [required] The pre-tax or post-tax price depending on the - // location of the order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: [required] Tax value. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PriceAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Amount) MarshalJSON() ([]byte, error) { - type NoMethod Amount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // AttributionSettings: Represents attribution settings for conversion sources // receiving pre-attribution data. type AttributionSettings struct { @@ -3078,102 +2977,6 @@ func (s BusinessDayConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BuyOnGoogleProgramStatus: Response message for the GetProgramStatus method. -type BuyOnGoogleProgramStatus struct { - // BusinessModel: The business models in which merchant participates. - // - // Possible values: - // "BUSINESS_MODEL_UNSPECIFIED" - Default value when business model is not - // set. - // "MANUFACTURER" - Merchant is a manufacturer. - // "IMPORTER" - Merchant is an importer. - // "RESELLER" - Merchant is a reseller. - // "OTHER" - Merchant has a different business model. - BusinessModel []string `json:"businessModel,omitempty"` - // CustomerServicePendingEmail: The customer service pending email. After - // verification this field becomes empty. - CustomerServicePendingEmail string `json:"customerServicePendingEmail,omitempty"` - // CustomerServicePendingPhoneNumber: The pending phone number specified for - // BuyOnGoogle program. It might be different than account level phone number. - // In order to update this field the customer_service_pending_phone_region_code - // must also be set. After verification this field becomes empty. - CustomerServicePendingPhoneNumber string `json:"customerServicePendingPhoneNumber,omitempty"` - // CustomerServicePendingPhoneRegionCode: Two letter country code for the - // pending phone number, for example `CA` for Canadian numbers. See the ISO - // 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. In order to update this field the - // customer_service_pending_phone_number must also be set. After verification - // this field becomes empty. - CustomerServicePendingPhoneRegionCode string `json:"customerServicePendingPhoneRegionCode,omitempty"` - // CustomerServiceVerifiedEmail: Output only. The customer service verified - // email. - CustomerServiceVerifiedEmail string `json:"customerServiceVerifiedEmail,omitempty"` - // CustomerServiceVerifiedPhoneNumber: Output only. The verified phone number - // specified for BuyOnGoogle program. It might be different than account level - // phone number. - CustomerServiceVerifiedPhoneNumber string `json:"customerServiceVerifiedPhoneNumber,omitempty"` - // CustomerServiceVerifiedPhoneRegionCode: Output only. Two letter country code - // for the verified phone number, for example `CA` for Canadian numbers. See - // the ISO 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. - CustomerServiceVerifiedPhoneRegionCode string `json:"customerServiceVerifiedPhoneRegionCode,omitempty"` - // OnlineSalesChannel: The channels through which the merchant is selling. - // - // Possible values: - // "ONLINE_SALES_CHANNEL_UNSPECIFIED" - Default value when online sales - // channel is not set. - // "GOOGLE_EXCLUSIVE" - Merchant is selling exclusively on Google. - // "GOOGLE_AND_OTHER_WEBSITES" - Merchant is selling on Google and other - // websites. - OnlineSalesChannel string `json:"onlineSalesChannel,omitempty"` - // ParticipationStage: Output only. The current participation stage for the - // program. - // - // Possible values: - // "PROGRAM_PARTICIPATION_STAGE_UNSPECIFIED" - Default value when - // participation stage is not set. - // "NOT_ELIGIBLE" - Merchant is not eligible for onboarding to a given - // program in a specific region code. - // "ELIGIBLE" - Merchant is eligible for onboarding to a given program in a - // specific region code. - // "ONBOARDING" - Merchant is onboarding to a given program in a specific - // region code. - // "ELIGIBLE_FOR_REVIEW" - Merchant fulfilled all the requirements and is - // ready to request review in a specific region code. - // "PENDING_REVIEW" - Merchant is waiting for the review to be completed in a - // specific region code. - // "REVIEW_DISAPPROVED" - The review for a merchant has been rejected in a - // specific region code. - // "ACTIVE" - Merchant's program participation is active for a specific - // region code. - // "PAUSED" - Participation has been paused. - // "DEPRECATED" - The program cannot be further reactivated or paused. See - // more about [Buy on - // Google](https://support.google.com/merchants/answer/7679273). - ParticipationStage string `json:"participationStage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BusinessModel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BusinessModel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BuyOnGoogleProgramStatus) MarshalJSON() ([]byte, error) { - type NoMethod BuyOnGoogleProgramStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Callout: An important message that should be highlighted. Usually displayed // as a banner. type Callout struct { @@ -3211,42 +3014,6 @@ func (s Callout) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CaptureOrderRequest: Request message for the CaptureOrder method. -type CaptureOrderRequest struct { -} - -// CaptureOrderResponse: Response message for the CaptureOrder method. -type CaptureOrderResponse struct { - // ExecutionStatus: The status of the execution. Only defined if the request - // was successful. Acceptable values are: * "duplicate" * "executed" - // - // Possible values: - // "EXECUTION_STATUS_UNSPECIFIED" - Default value. This value is unused. - // "EXECUTED" - The request was completed successfully. - // "DUPLICATE" - The request was not performed because it already executed - // once successfully. - ExecutionStatus string `json:"executionStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CaptureOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod CaptureOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type CarrierRate struct { // CarrierName: Carrier service, such as "UPS" or "Fedex". The list of // supported carriers can be retrieved through the `getSupportedCarriers` @@ -3954,34 +3721,6 @@ func (s CustomAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type CustomerReturnReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the return reason. Acceptable values are: - - // "betterPriceFound" - "changedMind" - "damagedOrDefectiveItem" - - // "didNotMatchDescription" - "doesNotFit" - "expiredItem" - - // "incorrectItemReceived" - "noLongerNeeded" - "notSpecified" - - // "orderedWrongItem" - "other" - "qualityNotExpected" - - // "receivedTooLate" - "undeliverable" - ReasonCode string `json:"reasonCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomerReturnReason) MarshalJSON() ([]byte, error) { - type NoMethod CustomerReturnReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type CutoffTime struct { // Hour: Hour of the cutoff time until which an order has to be placed to be // processed in the same day. Required. @@ -5693,54 +5432,6 @@ func (s Installment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type InvoiceSummary struct { - // AdditionalChargeSummaries: Summary of the total amounts of the additional - // charges. - AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` - // ProductTotal: [required] Total price for the product. - ProductTotal *Amount `json:"productTotal,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalChargeSummaries") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalChargeSummaries") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InvoiceSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InvoiceSummaryAdditionalChargeSummary struct { - // TotalAmount: [required] Total additional charge for this type. - TotalAmount *Amount `json:"totalAmount,omitempty"` - // Type: [required] Type of the additional charge. Acceptable values are: - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummaryAdditionalChargeSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // LabelIds: The IDs of labels that should be assigned to the CSS domain. type LabelIds struct { // LabelIds: The list of label IDs. @@ -6888,117 +6579,6 @@ func (s MerchantCenterDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MerchantOrderReturn: Order return. Production access (all methods) requires -// the order manager role. Sandbox access does not. -type MerchantOrderReturn struct { - // CreationDate: The date of creation of the return, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // MerchantOrderId: Merchant defined order ID. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderId: Google order ID. - OrderId string `json:"orderId,omitempty"` - // OrderReturnId: Order return ID generated by Google. - OrderReturnId string `json:"orderReturnId,omitempty"` - // ReturnItems: Items of the return. - ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` - // ReturnPricingInfo: Information about shipping costs. - ReturnPricingInfo *ReturnPricingInfo `json:"returnPricingInfo,omitempty"` - // ReturnShipments: Shipments of the return. - ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MerchantOrderReturn) MarshalJSON() ([]byte, error) { - type NoMethod MerchantOrderReturn - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MerchantOrderReturnItem struct { - // CustomerReturnReason: The reason that the customer chooses to return an - // item. - CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` - // ItemId: Product level item ID. If the returned items are of the same - // product, they will have the same ID. - ItemId string `json:"itemId,omitempty"` - // MerchantRejectionReason: The reason that the merchant chose to reject an - // item return. - MerchantRejectionReason *MerchantRejectionReason `json:"merchantRejectionReason,omitempty"` - // MerchantReturnReason: The reason that merchant chooses to accept a return - // item. - MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` - // Product: Product data from the time of the order placement. - Product *OrderLineItemProduct `json:"product,omitempty"` - // RefundableAmount: Maximum amount that can be refunded for this return item. - RefundableAmount *MonetaryAmount `json:"refundableAmount,omitempty"` - // ReturnItemId: Unit level ID for the return item. Different units of the same - // product will have different IDs. - ReturnItemId string `json:"returnItemId,omitempty"` - // ReturnShipmentIds: IDs of the return shipments that this return item belongs - // to. - ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` - // ShipmentGroupId: ID of the original shipment group. Provided for shipments - // with invoice support. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ShipmentUnitId: ID of the shipment unit assigned by the merchant. Provided - // for shipments with invoice support. - ShipmentUnitId string `json:"shipmentUnitId,omitempty"` - // State: State of the item. Acceptable values are: - "canceled" - "new" - - // "received" - "refunded" - "rejected" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerReturnReason") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerReturnReason") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod MerchantOrderReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MerchantRejectionReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the rejection reason. - ReasonCode string `json:"reasonCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MerchantRejectionReason) MarshalJSON() ([]byte, error) { - type NoMethod MerchantRejectionReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MethodQuota: The quota information per method in the Content API. type MethodQuota struct { // Method: Output only. The method name, for example `products.list`. Method @@ -7281,14101 +6861,6301 @@ func (s MinimumOrderValueTableStoreCodeSetWithMov) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type MonetaryAmount struct { - // PriceAmount: The pre-tax or post-tax price depends on the location of the - // order. - For countries (for example, "US". where price attribute excludes - // tax, this field corresponds to the pre-tax value. - For coutries (for - // example, "France") where price attribute includes tax, this field - // corresponds to the post-tax value . - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: Tax value, present only for countries where price attribute - // excludes tax (for example, "US". No tax is referenced as 0 value with the - // corresponding `currency`. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") to +// OrderTrackingSignal: Represents a merchant trade from which signals are +// extracted, e.g. shipping. +type OrderTrackingSignal struct { + // CustomerShippingFee: The shipping fee of the order; this value should be set + // to zero in the case of free shipping. + CustomerShippingFee *PriceAmount `json:"customerShippingFee,omitempty"` + // DeliveryPostalCode: Required. The delivery postal code, as a continuous + // string without spaces or dashes, e.g. "95016". This field will be anonymized + // in returned OrderTrackingSignal creation response. + DeliveryPostalCode string `json:"deliveryPostalCode,omitempty"` + // DeliveryRegionCode: Required. The [CLDR territory code] + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the + // shipping destination. + DeliveryRegionCode string `json:"deliveryRegionCode,omitempty"` + // LineItems: Information about line items in the order. + LineItems []*OrderTrackingSignalLineItemDetails `json:"lineItems,omitempty"` + // MerchantId: The Google merchant ID of this order tracking signal. This value + // is optional. If left unset, the caller's merchant ID is used. You must + // request access in order to provide data on behalf of another merchant. For + // more information, see Submitting Order Tracking Signals + // (/shopping-content/guides/order-tracking-signals). + MerchantId int64 `json:"merchantId,omitempty,string"` + // OrderCreatedTime: Required. The time when the order was created on the + // merchant side. Include the year and timezone string, if available. + OrderCreatedTime *DateTime `json:"orderCreatedTime,omitempty"` + // OrderId: Required. The ID of the order on the merchant side. This field will + // be hashed in returned OrderTrackingSignal creation response. + OrderId string `json:"orderId,omitempty"` + // OrderTrackingSignalId: Output only. The ID that uniquely identifies this + // order tracking signal. + OrderTrackingSignalId int64 `json:"orderTrackingSignalId,omitempty,string"` + // ShipmentLineItemMapping: The mapping of the line items to the shipment + // information. + ShipmentLineItemMapping []*OrderTrackingSignalShipmentLineItemMapping `json:"shipmentLineItemMapping,omitempty"` + // ShippingInfo: The shipping information for the order. + ShippingInfo []*OrderTrackingSignalShippingInfo `json:"shippingInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CustomerShippingFee") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PriceAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "CustomerShippingFee") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s MonetaryAmount) MarshalJSON() ([]byte, error) { - type NoMethod MonetaryAmount +func (s OrderTrackingSignal) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OnboardBuyOnGoogleProgramRequest: Request message for the OnboardProgram -// method. -type OnboardBuyOnGoogleProgramRequest struct { - // CustomerServiceEmail: The customer service email. - CustomerServiceEmail string `json:"customerServiceEmail,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerServiceEmail") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// OrderTrackingSignalLineItemDetails: The line items of the order. +type OrderTrackingSignalLineItemDetails struct { + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // Gtin: The Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // LineItemId: Required. The ID for this line item. + LineItemId string `json:"lineItemId,omitempty"` + // Mpn: The manufacturer part number. + Mpn string `json:"mpn,omitempty"` + // ProductDescription: Plain text description of this product (deprecated: + // Please use product_title instead). + ProductDescription string `json:"productDescription,omitempty"` + // ProductId: Required. The Content API REST ID of the product, in the form + // channel:contentLanguage:targetCountry:offerId. + ProductId string `json:"productId,omitempty"` + // ProductTitle: Plain text title of this product. + ProductTitle string `json:"productTitle,omitempty"` + // Quantity: The quantity of the line item in the order. + Quantity int64 `json:"quantity,omitempty,string"` + // Sku: Merchant SKU for this item (deprecated). + Sku string `json:"sku,omitempty"` + // Upc: Universal product code for this item (deprecated: Please use GTIN + // instead). + Upc string `json:"upc,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerServiceEmail") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Brand") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OnboardBuyOnGoogleProgramRequest) MarshalJSON() ([]byte, error) { - type NoMethod OnboardBuyOnGoogleProgramRequest +func (s OrderTrackingSignalLineItemDetails) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalLineItemDetails return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Order: Order. Production access (all methods) requires the order manager -// role. Sandbox access does not. -type Order struct { - // Acknowledged: Whether the order was acknowledged. - Acknowledged bool `json:"acknowledged,omitempty"` - // Annotations: List of key-value pairs that are attached to a given order. - Annotations []*OrderOrderAnnotation `json:"annotations,omitempty"` - // BillingAddress: The billing address. - BillingAddress *OrderAddress `json:"billingAddress,omitempty"` - // Customer: The details of the customer who placed the order. - Customer *OrderCustomer `json:"customer,omitempty"` - // DeliveryDetails: Delivery details for shipments of type `delivery`. - DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` - // Id: The REST ID of the order. Globally unique. - Id string `json:"id,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#order" - Kind string `json:"kind,omitempty"` - // LineItems: Line items that are ordered. - LineItems []*OrderLineItem `json:"lineItems,omitempty"` - MerchantId uint64 `json:"merchantId,omitempty,string"` - // MerchantOrderId: Merchant-provided ID of the order. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // NetPriceAmount: The net amount for the order (price part). For example, if - // an order was originally for $100 and a refund was issued for $20, the net - // amount will be $80. - NetPriceAmount *Price `json:"netPriceAmount,omitempty"` - // NetTaxAmount: The net amount for the order (tax part). Note that in certain - // cases due to taxable base adjustment `netTaxAmount` might not match to a sum - // of tax field across all lineItems and refunds. - NetTaxAmount *Price `json:"netTaxAmount,omitempty"` - // PaymentStatus: The status of the payment. Acceptable values are: - - // "paymentCaptured" - "paymentRejected" - "paymentSecured" - - // "pendingAuthorization" - PaymentStatus string `json:"paymentStatus,omitempty"` - // PickupDetails: Pickup details for shipments of type `pickup`. - PickupDetails *OrderPickupDetails `json:"pickupDetails,omitempty"` - // PlacedDate: The date when the order was placed, in ISO 8601 format. - PlacedDate string `json:"placedDate,omitempty"` - // Promotions: Promotions associated with the order. To determine which - // promotions apply to which products, check the - // `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` - // field for each promotion. If a promotion is applied to more than 1 offerId, - // divide the discount value by the number of affected offers to determine how - // much discount to apply to each offerId. Examples: 1. To calculate price paid - // by the customer for a single line item including the discount: For each - // promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` - // amount from the `LineItems[].Price.value`. 2. To calculate price paid by the - // customer for a single line item including the discount in case of multiple - // quantity: For each promotion, divide the - // `LineItems[].adjustments[].priceAdjustment.value` by the quantity of - // products then subtract the resulting value from the - // `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion - // can be applied to an offerId in a given order. To refund an item which had a - // promotion applied to it, make sure to refund the amount after first - // subtracting the promotion discount from the item price. More details about - // the program are here. - Promotions []*OrderPromotion `json:"promotions,omitempty"` - // Refunds: Refunds for the order. - Refunds []*OrderRefund `json:"refunds,omitempty"` - // Shipments: Shipments of the order. - Shipments []*OrderShipment `json:"shipments,omitempty"` - // ShippingCost: The total cost of shipping for all items. - ShippingCost *Price `json:"shippingCost,omitempty"` - // ShippingCostTax: The tax for the total shipping cost. - ShippingCostTax *Price `json:"shippingCostTax,omitempty"` - // Status: The status of the order. Acceptable values are: - "canceled" - - // "delivered" - "inProgress" - "partiallyDelivered" - - // "partiallyReturned" - "partiallyShipped" - "pendingShipment" - - // "returned" - "shipped" - Status string `json:"status,omitempty"` - // TaxCollector: The party responsible for collecting and remitting taxes. - // Acceptable values are: - "marketplaceFacilitator" - "merchant" - TaxCollector string `json:"taxCollector,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Acknowledged") to +// OrderTrackingSignalShipmentLineItemMapping: Represents how many items are in +// the shipment for the given shipment_id and line_item_id. +type OrderTrackingSignalShipmentLineItemMapping struct { + // LineItemId: Required. The line item ID. + LineItemId string `json:"lineItemId,omitempty"` + // Quantity: The line item quantity in the shipment. + Quantity int64 `json:"quantity,omitempty,string"` + // ShipmentId: Required. The shipment ID. This field will be hashed in returned + // OrderTrackingSignal creation response. + ShipmentId string `json:"shipmentId,omitempty"` + // ForceSendFields is a list of field names (e.g. "LineItemId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Acknowledged") to include in API + // NullFields is a list of field names (e.g. "LineItemId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Order) MarshalJSON() ([]byte, error) { - type NoMethod Order +func (s OrderTrackingSignalShipmentLineItemMapping) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalShipmentLineItemMapping return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // FullAddress: Strings representing the lines of the printed label for mailing - // the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, - // CA, 94043 United States - FullAddress []string `json:"fullAddress,omitempty"` - // IsPostOfficeBox: Whether the address is a post office box. - IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal Code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. Use `\n` to add a second - // line. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// OrderTrackingSignalShippingInfo: The shipping information for the order. +type OrderTrackingSignalShippingInfo struct { + // ActualDeliveryTime: The time when the shipment was actually delivered. + // Include the year and timezone string, if available. This field is required, + // if one of the following fields is absent: tracking_id or carrier_name. + ActualDeliveryTime *DateTime `json:"actualDeliveryTime,omitempty"` + // CarrierName: The name of the shipping carrier for the delivery. This field + // is required if one of the following fields is absent: + // earliest_delivery_promise_time, latest_delivery_promise_time, and + // actual_delivery_time. + CarrierName string `json:"carrierName,omitempty"` + // CarrierServiceName: The service type for fulfillment, e.g., GROUND, + // FIRST_CLASS, etc. + CarrierServiceName string `json:"carrierServiceName,omitempty"` + // EarliestDeliveryPromiseTime: The earliest delivery promised time. Include + // the year and timezone string, if available. This field is required, if one + // of the following fields is absent: tracking_id or carrier_name. + EarliestDeliveryPromiseTime *DateTime `json:"earliestDeliveryPromiseTime,omitempty"` + // LatestDeliveryPromiseTime: The latest delivery promised time. Include the + // year and timezone string, if available. This field is required, if one of + // the following fields is absent: tracking_id or carrier_name. + LatestDeliveryPromiseTime *DateTime `json:"latestDeliveryPromiseTime,omitempty"` + // OriginPostalCode: The origin postal code, as a continuous string without + // spaces or dashes, e.g. "95016". This field will be anonymized in returned + // OrderTrackingSignal creation response. + OriginPostalCode string `json:"originPostalCode,omitempty"` + // OriginRegionCode: The [CLDR territory code] + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the + // shipping origin. + OriginRegionCode string `json:"originRegionCode,omitempty"` + // ShipmentId: Required. The shipment ID. This field will be hashed in returned + // OrderTrackingSignal creation response. + ShipmentId string `json:"shipmentId,omitempty"` + // ShippedTime: The time when the shipment was shipped. Include the year and + // timezone string, if available. + ShippedTime *DateTime `json:"shippedTime,omitempty"` + // ShippingStatus: The status of the shipment. + // + // Possible values: + // "SHIPPING_STATE_UNSPECIFIED" - The shipping status is not known to + // merchant. + // "SHIPPED" - All items are shipped. + // "DELIVERED" - The shipment is already delivered. + ShippingStatus string `json:"shippingStatus,omitempty"` + // TrackingId: The tracking ID of the shipment. This field is required if one + // of the following fields is absent: earliest_delivery_promise_time, + // latest_delivery_promise_time, and actual_delivery_time. + TrackingId string `json:"trackingId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActualDeliveryTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ActualDeliveryTime") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderAddress) MarshalJSON() ([]byte, error) { - type NoMethod OrderAddress +func (s OrderTrackingSignalShippingInfo) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalShippingInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCancellation struct { - // Actor: The actor that created the cancellation. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // CreationDate: Date on which the cancellation has been created, in ISO 8601 - // format. - CreationDate string `json:"creationDate,omitempty"` - // Quantity: The quantity that was canceled. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the cancellation. Orders that are canceled with a - // noInventory reason will lead to the removal of the product from Buy on - // Google until you make an update to that product. This won't affect your - // Shopping ads. Acceptable values are: - "autoPostInternal" - - // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - - // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - - // "couponAbuse" - "customerCanceled" - "customerInitiatedCancel" - - // "customerSupportRequested" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "invalidCoupon" - - // "malformedShippingAddress" - "merchantDidNotShipOnTime" - - // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - - // "paymentDeclined" - "priceError" - "returnRefundAbuse" - - // "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// PaymentServiceProviderLinkInfo: Additional information required for +// PAYMENT_SERVICE_PROVIDER link type. +type PaymentServiceProviderLinkInfo struct { + // ExternalAccountBusinessCountry: The business country of the merchant account + // as identified by the third party service provider. + ExternalAccountBusinessCountry string `json:"externalAccountBusinessCountry,omitempty"` + // ExternalAccountId: The id used by the third party service provider to + // identify the merchant. + ExternalAccountId string `json:"externalAccountId,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ExternalAccountBusinessCountry") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actor") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ExternalAccountBusinessCountry") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderCancellation) MarshalJSON() ([]byte, error) { - type NoMethod OrderCancellation +func (s PaymentServiceProviderLinkInfo) MarshalJSON() ([]byte, error) { + type NoMethod PaymentServiceProviderLinkInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomer struct { - // FullName: Full name of the customer. - FullName string `json:"fullName,omitempty"` - // InvoiceReceivingEmail: Email address for the merchant to send value-added - // tax or invoice documentation of the order. Only the last document sent is - // made available to the customer. For more information, see About automated - // VAT invoicing for Buy on Google. - InvoiceReceivingEmail string `json:"invoiceReceivingEmail,omitempty"` - // LoyaltyInfo: Loyalty program information. - LoyaltyInfo *OrderCustomerLoyaltyInfo `json:"loyaltyInfo,omitempty"` - // MarketingRightsInfo: Customer's marketing preferences. Contains the - // marketing opt-in information that is current at the time that the merchant - // call. User preference selections can change from one order to the next so - // preferences must be checked with every order. - MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullName") to +type PickupCarrierService struct { + // CarrierName: The name of the pickup carrier (for example, "UPS"). + // Required. + CarrierName string `json:"carrierName,omitempty"` + // ServiceName: The name of the pickup service (for example, "Access point"). + // Required. + ServiceName string `json:"serviceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullName") to include in API + // NullFields is a list of field names (e.g. "CarrierName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderCustomer) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomer +func (s PickupCarrierService) MarshalJSON() ([]byte, error) { + type NoMethod PickupCarrierService return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomerLoyaltyInfo struct { - // LoyaltyNumber: The loyalty card/membership number. - LoyaltyNumber string `json:"loyaltyNumber,omitempty"` - // Name: Name of card/membership holder, this field will be populated when - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoyaltyNumber") to +type PickupServicesPickupService struct { + // CarrierName: The name of the carrier (for example, "UPS"). Always present. + CarrierName string `json:"carrierName,omitempty"` + // Country: The CLDR country code of the carrier (for example, "US"). Always + // present. + Country string `json:"country,omitempty"` + // ServiceName: The name of the pickup service (for example, "Access point"). + // Always present. + ServiceName string `json:"serviceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LoyaltyNumber") to include in API + // NullFields is a list of field names (e.g. "CarrierName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderCustomerLoyaltyInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomerLoyaltyInfo +func (s PickupServicesPickupService) MarshalJSON() ([]byte, error) { + type NoMethod PickupServicesPickupService return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomerMarketingRightsInfo struct { - // ExplicitMarketingPreference: Last known customer selection regarding - // marketing preferences. In certain cases this selection might not be known, - // so this field would be empty. If a customer selected `granted` in their most - // recent order, they can be subscribed to marketing emails. Customers who have - // chosen `denied` must not be subscribed, or must be unsubscribed if already - // opted-in. Acceptable values are: - "denied" - "granted" - ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` - // LastUpdatedTimestamp: Timestamp when last time marketing preference was - // updated. Could be empty, if user wasn't offered a selection yet. - LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` - // MarketingEmailAddress: Email address that can be used for marketing - // purposes. The field may be empty even if `explicitMarketingPreference` is - // 'granted'. This happens when retrieving an old order from the customer who - // deleted their account. - MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExplicitMarketingPreference") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. +type PosCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExplicitMarketingPreference") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomerMarketingRightsInfo +func (s PosCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderDeliveryDetails struct { - // Address: The delivery address - Address *OrderAddress `json:"address,omitempty"` - // PhoneNumber: The phone number of the person receiving the delivery. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally +type PosCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // Inventory: The inventory to submit. This should be set only if the method is + // `inventory`. + Inventory *PosInventory `json:"inventory,omitempty"` + // MerchantId: The ID of the POS data provider. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "delete" - + // "get" - "insert" - "inventory" - "sale" + Method string `json:"method,omitempty"` + // Sale: The sale information to submit. This should be set only if the method + // is `sale`. + Sale *PosSale `json:"sale,omitempty"` + // Store: The store information to submit. This should be set only if the + // method is `insert`. + Store *PosStore `json:"store,omitempty"` + // StoreCode: The store code. This should be set only if the method is `delete` + // or `get`. + StoreCode string `json:"storeCode,omitempty"` + // TargetMerchantId: The ID of the account for which to get/submit data. + TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API + // NullFields is a list of field names (e.g. "BatchId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderDeliveryDetails +func (s PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchRequestEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItem struct { - // Adjustments: Price and tax adjustments applied on the line item. - Adjustments []*OrderLineItemAdjustment `json:"adjustments,omitempty"` - // Annotations: Annotations that are attached to the line item. - Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` - // Cancellations: Cancellations of the line item. - Cancellations []*OrderCancellation `json:"cancellations,omitempty"` - // Id: The ID of the line item. - Id string `json:"id,omitempty"` - // Price: Total price for the line item. For example, if two items for $10 are - // purchased, the total price will be $20. - Price *Price `json:"price,omitempty"` - // Product: Product data as seen by customer from the time of the order - // placement. Note that certain attributes values (for example, title or gtin) - // might be reformatted and no longer match values submitted through product - // feed. - Product *OrderLineItemProduct `json:"product,omitempty"` - // QuantityCanceled: Number of items canceled. - QuantityCanceled int64 `json:"quantityCanceled,omitempty"` - // QuantityDelivered: Number of items delivered. - QuantityDelivered int64 `json:"quantityDelivered,omitempty"` - // QuantityOrdered: Number of items ordered. - QuantityOrdered int64 `json:"quantityOrdered,omitempty"` - // QuantityPending: Number of items pending. - QuantityPending int64 `json:"quantityPending,omitempty"` - // QuantityReadyForPickup: Number of items ready for pickup. - QuantityReadyForPickup int64 `json:"quantityReadyForPickup,omitempty"` - // QuantityReturned: Number of items returned. - QuantityReturned int64 `json:"quantityReturned,omitempty"` - // QuantityShipped: Number of items shipped. - QuantityShipped int64 `json:"quantityShipped,omitempty"` - // QuantityUndeliverable: Number of items undeliverable. - QuantityUndeliverable int64 `json:"quantityUndeliverable,omitempty"` - // ReturnInfo: Details of the return policy for the line item. - ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` - // Returns: Returns of the line item. - Returns []*OrderReturn `json:"returns,omitempty"` - // ShippingDetails: Details of the requested shipping for the line item. - ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` - // Tax: Total tax amount for the line item. For example, if two items are - // purchased, and each have a cost tax of $2, the total tax amount will be $4. - Tax *Price `json:"tax,omitempty"` - // ForceSendFields is a list of field names (e.g. "Adjustments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +type PosCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Adjustments") to include in API + // NullFields is a list of field names (e.g. "Entries") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItem +func (s PosCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemAdjustment struct { - // PriceAdjustment: Adjustment for total price of the line item. - PriceAdjustment *Price `json:"priceAdjustment,omitempty"` - // TaxAdjustment: Adjustment for total tax of the line item. - TaxAdjustment *Price `json:"taxAdjustment,omitempty"` - // Type: Type of this adjustment. Acceptable values are: - "promotion" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAdjustment") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PriceAdjustment") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderLineItemAdjustment) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemAdjustment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderLineItemProduct struct { - // Brand: Brand of the item. - Brand string `json:"brand,omitempty"` - // Condition: Condition or state of the item. Acceptable values are: - "new" - // - "refurbished" - "used" - Condition string `json:"condition,omitempty"` - // ContentLanguage: The two-letter ISO 639-1 language code for the item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Fees: Associated fees at order creation time. - Fees []*OrderLineItemProductFee `json:"fees,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. - Gtin string `json:"gtin,omitempty"` - // Id: The REST ID of the product. - Id string `json:"id,omitempty"` - // ImageLink: URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. - Mpn string `json:"mpn,omitempty"` - // OfferId: An identifier of the item. - OfferId string `json:"offerId,omitempty"` - // Price: Price of the item. - Price *Price `json:"price,omitempty"` - // ShownImage: URL to the cached image shown to the user when order was placed. - ShownImage string `json:"shownImage,omitempty"` - // TargetCountry: The CLDR territory code of the target country of the product. - TargetCountry string `json:"targetCountry,omitempty"` - // Title: The title of the product. - Title string `json:"title,omitempty"` - // VariantAttributes: Variant attributes for the item. These are dimensions of - // the product, such as color, gender, material, pattern, and size. You can - // find a comprehensive list of variant attributes here. - VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally +type PosCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Inventory: The updated inventory information. + Inventory *PosInventory `json:"inventory,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // Sale: The updated sale information. + Sale *PosSale `json:"sale,omitempty"` + // Store: The retrieved or updated store information. + Store *PosStore `json:"store,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API + // NullFields is a list of field names (e.g. "BatchId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemProduct) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProduct +func (s PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchResponseEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemProductFee struct { - // Amount: Amount of the fee. - Amount *Price `json:"amount,omitempty"` - // Name: Name of the fee. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally +type PosDataProviders struct { + // Country: Country code. + Country string `json:"country,omitempty"` + // PosDataProviders: A list of POS data providers. + PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API + // NullFields is a list of field names (e.g. "Country") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemProductFee) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProductFee +func (s PosDataProviders) MarshalJSON() ([]byte, error) { + type NoMethod PosDataProviders return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemProductVariantAttribute struct { - // Dimension: The dimension of the variant. - Dimension string `json:"dimension,omitempty"` - // Value: The value for the dimension. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimension") to +type PosDataProvidersPosDataProvider struct { + // DisplayName: The display name of Pos data Provider. + DisplayName string `json:"displayName,omitempty"` + // FullName: The full name of this POS data Provider. + FullName string `json:"fullName,omitempty"` + // ProviderId: The ID of the account. + ProviderId uint64 `json:"providerId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimension") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProductVariantAttribute +func (s PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { + type NoMethod PosDataProvidersPosDataProvider return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemReturnInfo struct { - // DaysToReturn: Required. How many days later the item can be returned. - DaysToReturn int64 `json:"daysToReturn,omitempty"` - // IsReturnable: Required. Whether the item is returnable. - IsReturnable bool `json:"isReturnable,omitempty"` - // PolicyUrl: Required. URL of the item return policy. - PolicyUrl string `json:"policyUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "DaysToReturn") to +// PosInventory: The absolute quantity of an item available at the given store. +type PosInventory struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posInventory" + Kind string `json:"kind,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DaysToReturn") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ContentLanguage") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemReturnInfo +func (s PosInventory) MarshalJSON() ([]byte, error) { + type NoMethod PosInventory return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemShippingDetails struct { - // DeliverByDate: Required. The delivery by date, in ISO 8601 format. - DeliverByDate string `json:"deliverByDate,omitempty"` - // Method: Required. Details of the shipping method. - Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` - // PickupPromiseInMinutes: The promised time in minutes in which the order will - // be ready for pickup. This only applies to buy-online-pickup-in-store - // same-day order. - PickupPromiseInMinutes int64 `json:"pickupPromiseInMinutes,omitempty"` - // ShipByDate: Required. The ship by date, in ISO 8601 format. - ShipByDate string `json:"shipByDate,omitempty"` - // Type: Type of shipment. Indicates whether `deliveryDetails` or - // `pickupDetails` is applicable for this shipment. Acceptable values are: - - // "delivery" - "pickup" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliverByDate") to +type PosInventoryRequest struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeliverByDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ContentLanguage") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemShippingDetails +func (s PosInventoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosInventoryRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemShippingDetailsMethod struct { - // Carrier: The carrier for the shipping. Optional. See `shipments[].carrier` - // for a list of acceptable values. - Carrier string `json:"carrier,omitempty"` - // MaxDaysInTransit: Required. Maximum transit time. - MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` - // MethodName: Required. The name of the shipping method. - MethodName string `json:"methodName,omitempty"` - // MinDaysInTransit: Required. Minimum transit time. - MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +type PosInventoryResponse struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posInventoryResponse". + Kind string `json:"kind,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ContentLanguage") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemShippingDetailsMethod +func (s PosInventoryResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosInventoryResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderMerchantProvidedAnnotation struct { - // Key: Key for additional merchant provided (as key-value pairs) annotation - // about the line item. - Key string `json:"key,omitempty"` - // Value: Value for additional merchant provided (as key-value pairs) - // annotation about the line item. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally +type PosListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posListResponse". + Kind string `json:"kind,omitempty"` + Resources []*PosStore `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests + // NullFields is a list of field names (e.g. "Kind") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod OrderMerchantProvidedAnnotation +func (s PosListResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosListResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderOrderAnnotation struct { - // Key: Key for additional google provided (as key-value pairs) annotation. - Key string `json:"key,omitempty"` - // Value: Value for additional google provided (as key-value pairs) annotation. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// PosSale: The change of the available quantity of an item at the given store. +type PosSale struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posSale" + Kind string `json:"kind,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderOrderAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod OrderOrderAnnotation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderPickupDetails struct { - // Address: Address of the pickup location where the shipment should be sent. - // Note that `recipientName` in the address is the name of the business at the - // pickup location. - Address *OrderAddress `json:"address,omitempty"` - // Collectors: Collectors authorized to pick up shipment from the pickup - // location. - Collectors []*OrderPickupDetailsCollector `json:"collectors,omitempty"` - // LocationId: ID of the pickup location. - LocationId string `json:"locationId,omitempty"` - // PickupType: The pickup type of this order. Acceptable values are: - - // "merchantStore" - "merchantStoreCurbside" - "merchantStoreLocker" - - // "thirdPartyPickupPoint" - "thirdPartyLocker" - PickupType string `json:"pickupType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ContentLanguage") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderPickupDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderPickupDetails +func (s PosSale) MarshalJSON() ([]byte, error) { + type NoMethod PosSale return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPickupDetailsCollector struct { - // Name: Name of the person picking up the shipment. - Name string `json:"name,omitempty"` - // PhoneNumber: Phone number of the person picking up the shipment. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +type PosSaleRequest struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "ContentLanguage") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderPickupDetailsCollector) MarshalJSON() ([]byte, error) { - type NoMethod OrderPickupDetailsCollector +func (s PosSaleRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosSaleRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPromotion struct { - // ApplicableItems: Items that this promotion may be applied to. If empty, - // there are no restrictions on applicable items and quantity. This field will - // also be empty for shipping promotions because shipping is not tied to any - // specific item. - ApplicableItems []*OrderPromotionItem `json:"applicableItems,omitempty"` - // AppliedItems: Items that this promotion have been applied to. Do not provide - // for `orders.createtestorder`. This field will be empty for shipping - // promotions because shipping is not tied to any specific item. - AppliedItems []*OrderPromotionItem `json:"appliedItems,omitempty"` - // EndTime: Promotion end time in ISO 8601 format. Date, time, and offset - // required, for example, "2020-01-02T09:00:00+01:00" or - // "2020-01-02T09:00:00Z". - EndTime string `json:"endTime,omitempty"` - // Funder: Required. The party funding the promotion. Only `merchant` is - // supported for `orders.createtestorder`. Acceptable values are: - "google" - // - "merchant" - Funder string `json:"funder,omitempty"` - // MerchantPromotionId: Required. This field is used to identify promotions - // within merchants' own systems. - MerchantPromotionId string `json:"merchantPromotionId,omitempty"` - // PriceValue: Estimated discount applied to price. Amount is pre-tax or - // post-tax depending on location of order. - PriceValue *Price `json:"priceValue,omitempty"` - // ShortTitle: A short title of the promotion to be shown on the checkout page. - // Do not provide for `orders.createtestorder`. - ShortTitle string `json:"shortTitle,omitempty"` - // StartTime: Promotion start time in ISO 8601 format. Date, time, and offset - // required, for example, "2020-01-02T09:00:00+01:00" or - // "2020-01-02T09:00:00Z". - StartTime string `json:"startTime,omitempty"` - // Subtype: Required. The category of the promotion. Only `moneyOff` is - // supported for `orders.createtestorder`. Acceptable values are: - - // "buyMGetMoneyOff" - "buyMGetNMoneyOff" - "buyMGetNPercentOff" - - // "buyMGetPercentOff" - "freeGift" - "freeGiftWithItemId" - - // "freeGiftWithValue" - "freeShippingOvernight" - "freeShippingStandard" - // - "freeShippingTwoDay" - "moneyOff" - "percentOff" - "rewardPoints" - // - "salePrice" - Subtype string `json:"subtype,omitempty"` - // TaxValue: Estimated discount applied to tax (if allowed by law). Do not - // provide for `orders.createtestorder`. - TaxValue *Price `json:"taxValue,omitempty"` - // Title: Required. The title of the promotion. - Title string `json:"title,omitempty"` - // Type: Required. The scope of the promotion. Only `product` is supported for - // `orders.createtestorder`. Acceptable values are: - "product" - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableItems") to +type PosSaleResponse struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posSaleResponse". + Kind string `json:"kind,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicableItems") to include in + // NullFields is a list of field names (e.g. "ContentLanguage") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderPromotion) MarshalJSON() ([]byte, error) { - type NoMethod OrderPromotion +func (s PosSaleResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosSaleResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPromotionItem struct { - // LineItemId: The line item ID of a product. Do not provide for - // `orders.createtestorder`. - LineItemId string `json:"lineItemId,omitempty"` - // OfferId: Required. Offer ID of a product. Only for `orders.createtestorder`. - OfferId string `json:"offerId,omitempty"` - // ProductId: `orders.createtestorder`. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity of the associated product. Do not provide for - // `orders.createtestorder`. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to +// PosStore: Store resource. +type PosStore struct { + // GcidCategory: The business type of the store. + GcidCategory []string `json:"gcidCategory,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posStore" + Kind string `json:"kind,omitempty"` + // MatchingStatus: Output only. The matching status of POS store and Google + // Business Profile store. Possible values are: - "matched": The POS store is + // successfully matched with the Google Business Profile store. - "failed": + // The POS store is not matched with the Google Business Profile store. See + // matching_status_hint for further details. Note that there is up to 48 hours + // propagation delay for changes in Merchant Center (e.g. creation of new + // account, accounts linking) and Google Business Profile (e.g. store address + // update) which may affect the matching status. In such cases, after a delay + // call pos.list + // (https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) + // to retrieve the updated matching status. + MatchingStatus string `json:"matchingStatus,omitempty"` + // MatchingStatusHint: Output only. The hint of why the matching has failed. + // This is only set when matching_status=failed. Possible values are: - + // "linked-store-not-found": There aren't any Google Business Profile stores + // available for matching. Connect your Merchant Center account with the Google + // Business Profile account. Or add a new Google Business Profile store + // corresponding to the POS store. - "store-match-not-found": The provided + // POS store couldn't be matched to any of the connected Google Business + // Profile stores. Merchant Center account is connected correctly and stores + // are available on Google Business Profile, but POS store location address + // does not match with Google Business Profile stores' addresses. Update POS + // store address or Google Business Profile store address to match correctly. - + // "store-match-unverified": The provided POS store couldn't be matched to + // any of the connected Google Business Profile stores, as the matched Google + // Business Profile store is unverified. Go through the Google Business Profile + // verification process to match correctly. + MatchingStatusHint string `json:"matchingStatusHint,omitempty"` + // PhoneNumber: The store phone number. + PhoneNumber string `json:"phoneNumber,omitempty"` + // PlaceId: The Google Place Id of the store location. + PlaceId string `json:"placeId,omitempty"` + // StoreAddress: Required. The street address of the store. + StoreAddress string `json:"storeAddress,omitempty"` + // StoreCode: Required. A store identifier that is unique for the given + // merchant. + StoreCode string `json:"storeCode,omitempty"` + // StoreName: The merchant or store name. + StoreName string `json:"storeName,omitempty"` + // WebsiteUrl: The website url for the store or merchant. + WebsiteUrl string `json:"websiteUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GcidCategory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API + // NullFields is a list of field names (e.g. "GcidCategory") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderPromotionItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderPromotionItem +func (s PosStore) MarshalJSON() ([]byte, error) { + type NoMethod PosStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderRefund struct { - // Actor: The actor that created the refund. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // Amount: The amount that is refunded. - Amount *Price `json:"amount,omitempty"` - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - "adjustment" - - // "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally +type PostalCodeGroup struct { + // Country: The CLDR territory code of the country the postal code group + // applies to. Required. + Country string `json:"country,omitempty"` + // Name: The name of the postal code group, referred to in headers. Required. + Name string `json:"name,omitempty"` + // PostalCodeRanges: A range of postal codes. Required. + PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actor") to include in API + // NullFields is a list of field names (e.g. "Country") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderRefund) MarshalJSON() ([]byte, error) { - type NoMethod OrderRefund +func (s PostalCodeGroup) MarshalJSON() ([]byte, error) { + type NoMethod PostalCodeGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderReportDisbursement: Order disbursement. All methods require the payment -// analyst role. -type OrderReportDisbursement struct { - // DisbursementAmount: The disbursement amount. - DisbursementAmount *Price `json:"disbursementAmount,omitempty"` - // DisbursementCreationDate: The disbursement date, in ISO 8601 format. - DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` - // DisbursementDate: The date the disbursement was initiated, in ISO 8601 - // format. - DisbursementDate string `json:"disbursementDate,omitempty"` - // DisbursementId: The ID of the disbursement. - DisbursementId string `json:"disbursementId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DisbursementAmount") to +type PostalCodeRange struct { + // PostalCodeRangeBegin: A postal code or a pattern of the form `prefix*` + // denoting the inclusive lower bound of the range defining the area. Examples + // values: "94108", "9410*", "9*". Required. + PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` + // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` + // denoting the inclusive upper bound of the range defining the area. It must + // have the same length as `postalCodeRangeBegin`: if `postalCodeRangeBegin` is + // a postal code then `postalCodeRangeEnd` must be a postal code too; if + // `postalCodeRangeBegin` is a pattern then `postalCodeRangeEnd` must be a + // pattern with the same prefix length. Optional: if not set, then the area is + // defined as being all the postal codes matching `postalCodeRangeBegin`. + PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodeRangeBegin") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisbursementAmount") to include + // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderReportDisbursement) MarshalJSON() ([]byte, error) { - type NoMethod OrderReportDisbursement +func (s PostalCodeRange) MarshalJSON() ([]byte, error) { + type NoMethod PostalCodeRange return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderReportTransaction struct { - // DisbursementAmount: The disbursement amount. - DisbursementAmount *Price `json:"disbursementAmount,omitempty"` - // DisbursementCreationDate: The date the disbursement was created, in ISO 8601 - // format. - DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` - // DisbursementDate: The date the disbursement was initiated, in ISO 8601 - // format. - DisbursementDate string `json:"disbursementDate,omitempty"` - // DisbursementId: The ID of the disbursement. - DisbursementId string `json:"disbursementId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // MerchantOrderId: Merchant-provided ID of the order. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderId: The ID of the order. - OrderId string `json:"orderId,omitempty"` - // ProductAmount: Total amount for the items. - ProductAmount *ProductAmount `json:"productAmount,omitempty"` - // TransactionDate: The date of the transaction, in ISO 8601 format. - TransactionDate string `json:"transactionDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisbursementAmount") to +type Price struct { + // Currency: The currency of the price. + Currency string `json:"currency,omitempty"` + // Value: The price represented as a number. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Currency") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisbursementAmount") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Currency") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderReportTransaction) MarshalJSON() ([]byte, error) { - type NoMethod OrderReportTransaction +func (s Price) MarshalJSON() ([]byte, error) { + type NoMethod Price return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderReturn struct { - // Actor: The actor that created the refund. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // Quantity: Quantity that is returned. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actor") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderReturn) MarshalJSON() ([]byte, error) { - type NoMethod OrderReturn - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderShipment struct { - // Carrier: The carrier handling the shipment. For supported carriers, Google - // includes the carrier name and tracking URL in emails to customers. For - // select supported carriers, Google also automatically updates the shipment - // status based on the provided shipment ID. *Note:* You can also use - // unsupported carriers, but emails to customers won't include the carrier name - // or tracking URL, and there will be no automatic order status updates. - // Supported carriers for "US" are: - "ups" (United Parcel Service) - // *automatic status updates* - "usps" (United States Postal Service) - // *automatic status updates* - "fedex" (FedEx) *automatic status updates * - - // "dhl" (DHL eCommerce) *automatic status updates* (US only) - "ontrac" - // (OnTrac) *automatic status updates * - "dhl express" (DHL Express) - - // "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - - // "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - - // "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - - // "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" - // (China Post Express Mail Service) - "singapore post" (Singapore Post) - - // "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish - // Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) - "bestex" - // (Best Express) - "canada post" (Canada Post) - "purolator" (Purolator) - - // "canpar" (Canpar) - "india post" (India Post) - "blue dart" (Blue - // Dart) - "delhivery" (Delhivery) - "dtdc" (DTDC) - "tpc india" (TPC - // India) - "lso" (Lone Star Overnight) - "tww" (Team Worldwide) - - // "deliver-it" (Deliver-IT) - "cdl last mile" (CDL Last Mile) Supported - // carriers for FR are: - "la poste" (La Poste) *automatic status updates * - - // "colissimo" (Colissimo by La Poste) *automatic status updates* - "ups" - // (United Parcel Service) *automatic status updates * - "chronopost" - // (Chronopost by La Poste) - "gls" (General Logistics Systems France) - - // "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis - // prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" - // (TNT) - "db schenker" (DB Schenker) - "aramex" (Aramex) - Carrier string `json:"carrier,omitempty"` - // CreationDate: Date on which the shipment has been created, in ISO 8601 - // format. - CreationDate string `json:"creationDate,omitempty"` - // DeliveryDate: Date on which the shipment has been delivered, in ISO 8601 - // format. Present only if `status` is `delivered` - DeliveryDate string `json:"deliveryDate,omitempty"` - // Id: The ID of the shipment. - Id string `json:"id,omitempty"` - // LineItems: The line items that are shipped. - LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // ScheduledDeliveryDetails: Delivery details of the shipment if scheduling is - // needed. - ScheduledDeliveryDetails *OrderShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` - // ShipmentGroupId: The shipment group ID of the shipment. This is set in - // shiplineitems request. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // Status: The status of the shipment. Acceptable values are: - "delivered" - - // "readyForPickup" - "shipped" - "undeliverable" - Status string `json:"status,omitempty"` - // TrackingId: The tracking ID for the shipment. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// PriceAmount: The price represented as a number and currency. +type PriceAmount struct { + // Currency: The currency of the price. + Currency string `json:"currency,omitempty"` + // Value: The price represented as a number. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Currency") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API + // NullFields is a list of field names (e.g. "Currency") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderShipment) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipment +func (s PriceAmount) MarshalJSON() ([]byte, error) { + type NoMethod PriceAmount return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderShipmentLineItemShipment struct { - // LineItemId: The ID of the line item that is shipped. This value is assigned - // by Google when an order is created. Either lineItemId or productId is - // required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product to ship. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity that is shipped. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipmentLineItemShipment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderShipmentScheduledDeliveryDetails struct { - // CarrierPhoneNumber: The phone number of the carrier fulfilling the delivery. - // The phone number is formatted as the international notation in ITU-T - // Recommendation E.123 (for example, "+41 44 668 1800"). - CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` - // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 8601 - // format. - ScheduledDate string `json:"scheduledDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") to - // unconditionally include in API requests. By default, fields with empty or +// PriceCompetitiveness: Price competitiveness fields requested by the merchant +// in the query. Field values are only set if the merchant queries +// `PriceCompetitivenessProductView`. +// https://support.google.com/merchants/answer/9626903 +type PriceCompetitiveness struct { + // BenchmarkPriceCurrencyCode: The price benchmark currency (ISO 4217 code). + BenchmarkPriceCurrencyCode string `json:"benchmarkPriceCurrencyCode,omitempty"` + // BenchmarkPriceMicros: The latest available price benchmark in micros (1 + // millionth of a standard unit, 1 USD = 1000000 micros) for the product's + // catalog in the benchmark country. + BenchmarkPriceMicros int64 `json:"benchmarkPriceMicros,omitempty,string"` + // CountryCode: The country of the price benchmark (ISO 3166 code). + CountryCode string `json:"countryCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierPhoneNumber") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipmentScheduledDeliveryDetails +func (s PriceCompetitiveness) MarshalJSON() ([]byte, error) { + type NoMethod PriceCompetitiveness return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderTrackingSignal: Represents a merchant trade from which signals are -// extracted, e.g. shipping. -type OrderTrackingSignal struct { - // CustomerShippingFee: The shipping fee of the order; this value should be set - // to zero in the case of free shipping. - CustomerShippingFee *PriceAmount `json:"customerShippingFee,omitempty"` - // DeliveryPostalCode: Required. The delivery postal code, as a continuous - // string without spaces or dashes, e.g. "95016". This field will be anonymized - // in returned OrderTrackingSignal creation response. - DeliveryPostalCode string `json:"deliveryPostalCode,omitempty"` - // DeliveryRegionCode: Required. The [CLDR territory code] - // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the - // shipping destination. - DeliveryRegionCode string `json:"deliveryRegionCode,omitempty"` - // LineItems: Information about line items in the order. - LineItems []*OrderTrackingSignalLineItemDetails `json:"lineItems,omitempty"` - // MerchantId: The Google merchant ID of this order tracking signal. This value - // is optional. If left unset, the caller's merchant ID is used. You must - // request access in order to provide data on behalf of another merchant. For - // more information, see Submitting Order Tracking Signals - // (/shopping-content/guides/order-tracking-signals). - MerchantId int64 `json:"merchantId,omitempty,string"` - // OrderCreatedTime: Required. The time when the order was created on the - // merchant side. Include the year and timezone string, if available. - OrderCreatedTime *DateTime `json:"orderCreatedTime,omitempty"` - // OrderId: Required. The ID of the order on the merchant side. This field will - // be hashed in returned OrderTrackingSignal creation response. - OrderId string `json:"orderId,omitempty"` - // OrderTrackingSignalId: Output only. The ID that uniquely identifies this - // order tracking signal. - OrderTrackingSignalId int64 `json:"orderTrackingSignalId,omitempty,string"` - // ShipmentLineItemMapping: The mapping of the line items to the shipment - // information. - ShipmentLineItemMapping []*OrderTrackingSignalShipmentLineItemMapping `json:"shipmentLineItemMapping,omitempty"` - // ShippingInfo: The shipping information for the order. - ShippingInfo []*OrderTrackingSignalShippingInfo `json:"shippingInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CustomerShippingFee") to +// PriceInsights: Price insights fields requested by the merchant in the query. +// Field values are only set if the merchant queries +// `PriceInsightsProductView`. +// https://support.google.com/merchants/answer/11916926 +type PriceInsights struct { + // Effectiveness: The predicted effectiveness of applying the price suggestion, + // bucketed. + // + // Possible values: + // "EFFECTIVENESS_UNSPECIFIED" - Effectiveness is unknown. + // "LOW" - Effectiveness is low. + // "MEDIUM" - Effectiveness is medium. + // "HIGH" - Effectiveness is high. + Effectiveness string `json:"effectiveness,omitempty"` + // PredictedClicksChangeFraction: The predicted change in clicks as a fraction + // after introducing the suggested price compared to current active price. For + // example, 0.05 is a 5% predicted increase in clicks. + PredictedClicksChangeFraction float64 `json:"predictedClicksChangeFraction,omitempty"` + // PredictedConversionsChangeFraction: The predicted change in conversions as a + // fraction after introducing the suggested price compared to current active + // price. For example, 0.05 is a 5% predicted increase in conversions). + PredictedConversionsChangeFraction float64 `json:"predictedConversionsChangeFraction,omitempty"` + // PredictedGrossProfitChangeFraction: *Deprecated*: This field is no longer + // supported and will start returning 0. The predicted change in gross profit + // as a fraction after introducing the suggested price compared to current + // active price. For example, 0.05 is a 5% predicted increase in gross profit. + PredictedGrossProfitChangeFraction float64 `json:"predictedGrossProfitChangeFraction,omitempty"` + // PredictedImpressionsChangeFraction: The predicted change in impressions as a + // fraction after introducing the suggested price compared to current active + // price. For example, 0.05 is a 5% predicted increase in impressions. + PredictedImpressionsChangeFraction float64 `json:"predictedImpressionsChangeFraction,omitempty"` + // PredictedMonthlyGrossProfitChangeCurrencyCode: *Deprecated*: This field is + // no longer supported and will start returning USD for all requests. The + // predicted monthly gross profit change currency (ISO 4217 code). + PredictedMonthlyGrossProfitChangeCurrencyCode string `json:"predictedMonthlyGrossProfitChangeCurrencyCode,omitempty"` + // PredictedMonthlyGrossProfitChangeMicros: *Deprecated*: This field is no + // longer supported and will start returning 0. The predicted change in gross + // profit in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) + // after introducing the suggested price for a month compared to current active + // price. + PredictedMonthlyGrossProfitChangeMicros int64 `json:"predictedMonthlyGrossProfitChangeMicros,omitempty,string"` + // SuggestedPriceCurrencyCode: The suggested price currency (ISO 4217 code). + SuggestedPriceCurrencyCode string `json:"suggestedPriceCurrencyCode,omitempty"` + // SuggestedPriceMicros: The latest suggested price in micros (1 millionth of a + // standard unit, 1 USD = 1000000 micros) for the product. + SuggestedPriceMicros int64 `json:"suggestedPriceMicros,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Effectiveness") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerShippingFee") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderTrackingSignal) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignal - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OrderTrackingSignalLineItemDetails: The line items of the order. -type OrderTrackingSignalLineItemDetails struct { - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // Gtin: The Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // LineItemId: Required. The ID for this line item. - LineItemId string `json:"lineItemId,omitempty"` - // Mpn: The manufacturer part number. - Mpn string `json:"mpn,omitempty"` - // ProductDescription: Plain text description of this product (deprecated: - // Please use product_title instead). - ProductDescription string `json:"productDescription,omitempty"` - // ProductId: Required. The Content API REST ID of the product, in the form - // channel:contentLanguage:targetCountry:offerId. - ProductId string `json:"productId,omitempty"` - // ProductTitle: Plain text title of this product. - ProductTitle string `json:"productTitle,omitempty"` - // Quantity: The quantity of the line item in the order. - Quantity int64 `json:"quantity,omitempty,string"` - // Sku: Merchant SKU for this item (deprecated). - Sku string `json:"sku,omitempty"` - // Upc: Universal product code for this item (deprecated: Please use GTIN - // instead). - Upc string `json:"upc,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API + // NullFields is a list of field names (e.g. "Effectiveness") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s OrderTrackingSignalLineItemDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalLineItemDetails +func (s PriceInsights) MarshalJSON() ([]byte, error) { + type NoMethod PriceInsights return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderTrackingSignalShipmentLineItemMapping: Represents how many items are in -// the shipment for the given shipment_id and line_item_id. -type OrderTrackingSignalShipmentLineItemMapping struct { - // LineItemId: Required. The line item ID. - LineItemId string `json:"lineItemId,omitempty"` - // Quantity: The line item quantity in the shipment. - Quantity int64 `json:"quantity,omitempty,string"` - // ShipmentId: Required. The shipment ID. This field will be hashed in returned - // OrderTrackingSignal creation response. - ShipmentId string `json:"shipmentId,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderTrackingSignalShipmentLineItemMapping) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalShipmentLineItemMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s *PriceInsights) UnmarshalJSON(data []byte) error { + type NoMethod PriceInsights + var s1 struct { + PredictedClicksChangeFraction gensupport.JSONFloat64 `json:"predictedClicksChangeFraction"` + PredictedConversionsChangeFraction gensupport.JSONFloat64 `json:"predictedConversionsChangeFraction"` + PredictedGrossProfitChangeFraction gensupport.JSONFloat64 `json:"predictedGrossProfitChangeFraction"` + PredictedImpressionsChangeFraction gensupport.JSONFloat64 `json:"predictedImpressionsChangeFraction"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PredictedClicksChangeFraction = float64(s1.PredictedClicksChangeFraction) + s.PredictedConversionsChangeFraction = float64(s1.PredictedConversionsChangeFraction) + s.PredictedGrossProfitChangeFraction = float64(s1.PredictedGrossProfitChangeFraction) + s.PredictedImpressionsChangeFraction = float64(s1.PredictedImpressionsChangeFraction) + return nil } -// OrderTrackingSignalShippingInfo: The shipping information for the order. -type OrderTrackingSignalShippingInfo struct { - // ActualDeliveryTime: The time when the shipment was actually delivered. - // Include the year and timezone string, if available. This field is required, - // if one of the following fields is absent: tracking_id or carrier_name. - ActualDeliveryTime *DateTime `json:"actualDeliveryTime,omitempty"` - // CarrierName: The name of the shipping carrier for the delivery. This field - // is required if one of the following fields is absent: - // earliest_delivery_promise_time, latest_delivery_promise_time, and - // actual_delivery_time. - CarrierName string `json:"carrierName,omitempty"` - // CarrierServiceName: The service type for fulfillment, e.g., GROUND, - // FIRST_CLASS, etc. - CarrierServiceName string `json:"carrierServiceName,omitempty"` - // EarliestDeliveryPromiseTime: The earliest delivery promised time. Include - // the year and timezone string, if available. This field is required, if one - // of the following fields is absent: tracking_id or carrier_name. - EarliestDeliveryPromiseTime *DateTime `json:"earliestDeliveryPromiseTime,omitempty"` - // LatestDeliveryPromiseTime: The latest delivery promised time. Include the - // year and timezone string, if available. This field is required, if one of - // the following fields is absent: tracking_id or carrier_name. - LatestDeliveryPromiseTime *DateTime `json:"latestDeliveryPromiseTime,omitempty"` - // OriginPostalCode: The origin postal code, as a continuous string without - // spaces or dashes, e.g. "95016". This field will be anonymized in returned - // OrderTrackingSignal creation response. - OriginPostalCode string `json:"originPostalCode,omitempty"` - // OriginRegionCode: The [CLDR territory code] - // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the - // shipping origin. - OriginRegionCode string `json:"originRegionCode,omitempty"` - // ShipmentId: Required. The shipment ID. This field will be hashed in returned - // OrderTrackingSignal creation response. - ShipmentId string `json:"shipmentId,omitempty"` - // ShippedTime: The time when the shipment was shipped. Include the year and - // timezone string, if available. - ShippedTime *DateTime `json:"shippedTime,omitempty"` - // ShippingStatus: The status of the shipment. - // - // Possible values: - // "SHIPPING_STATE_UNSPECIFIED" - The shipping status is not known to - // merchant. - // "SHIPPED" - All items are shipped. - // "DELIVERED" - The shipment is already delivered. - ShippingStatus string `json:"shippingStatus,omitempty"` - // TrackingId: The tracking ID of the shipment. This field is required if one - // of the following fields is absent: earliest_delivery_promise_time, - // latest_delivery_promise_time, and actual_delivery_time. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActualDeliveryTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActualDeliveryTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderTrackingSignalShippingInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalShippingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateChargeInvoiceRequest struct { - // InvoiceId: [required] The ID of the invoice. - InvoiceId string `json:"invoiceId,omitempty"` - // InvoiceSummary: [required] Invoice summary. - InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` - // LineItemInvoices: [required] Invoice details per line item. - LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order. - OperationId string `json:"operationId,omitempty"` - // ShipmentGroupId: [required] ID of the shipment group. It is assigned by the - // merchant in the `shipLineItems` method and is used to group multiple line - // items that have the same kind of shipping charges. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InvoiceId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateChargeInvoiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateChargeInvoiceResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderinvoicesCreateChargeInvoiceResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateChargeInvoiceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateRefundInvoiceRequest struct { - // InvoiceId: [required] The ID of the invoice. - InvoiceId string `json:"invoiceId,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order. - OperationId string `json:"operationId,omitempty"` - // RefundOnlyOption: Option to create a refund-only invoice. Exactly one of - // `refundOnlyOption` or `returnOption` must be provided. - RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` - // ReturnOption: Option to create an invoice for a refund and mark all items - // within the invoice as returned. Exactly one of `refundOnlyOption` or - // `returnOption` must be provided. - ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` - // ShipmentInvoices: Invoice details for different shipment groups. - ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InvoiceId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateRefundInvoiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateRefundInvoiceResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` +// Product: Required product attributes are primarily defined by the product +// data specification. See the Product Data Specification Help Center article +// for information. Product data. After inserting, updating, or deleting a +// product, it may take several minutes before changes take effect. +type Product struct { + // AdditionalImageLinks: Additional URLs of images of the item. + AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` + // AdditionalSizeType: Additional cut of the item. Used together with size_type + // to represent combined size types for apparel items. + AdditionalSizeType string `json:"additionalSizeType,omitempty"` + // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%, + // discouraged otherwise. + AdsGrouping string `json:"adsGrouping,omitempty"` + // AdsLabels: Similar to ads_grouping, but only works on CPC. + AdsLabels []string `json:"adsLabels,omitempty"` + // AdsRedirect: Allows advertisers to override the item URL when the product is + // shown within the context of Product Ads. + AdsRedirect string `json:"adsRedirect,omitempty"` + // Adult: Should be set to true if the item is targeted towards adults. + Adult bool `json:"adult,omitempty"` + // AgeGroup: Target age group of the item. + AgeGroup string `json:"ageGroup,omitempty"` + // AutoPricingMinPrice: A safeguard in the Automated Discounts + // (//support.google.com/merchants/answer/10295759) and Dynamic Promotions + // (//support.google.com/merchants/answer/13949249) projects, ensuring that + // discounts on merchants' offers do not fall below this value, thereby + // preserving the offer's value and profitability. + AutoPricingMinPrice *Price `json:"autoPricingMinPrice,omitempty"` + // Availability: Availability status of the item. + Availability string `json:"availability,omitempty"` + // AvailabilityDate: The day a pre-ordered product becomes available for + // delivery, in ISO 8601 format. + AvailabilityDate string `json:"availabilityDate,omitempty"` + // Brand: Brand of the item. + Brand string `json:"brand,omitempty"` + // CanonicalLink: URL for the canonical version of your item's landing page. + CanonicalLink string `json:"canonicalLink,omitempty"` + // Certifications: Product certification + // (https://support.google.com/merchants/answer/13528839), introduced for EU + // energy efficiency labeling compliance using the EU EPREL + // (https://eprel.ec.europa.eu/screen/home) database. + Certifications []*ProductCertification `json:"certifications,omitempty"` + // Channel: Required. The item's channel (online or local). Acceptable values + // are: - "local" - "online" + Channel string `json:"channel,omitempty"` + // CloudExportAdditionalProperties: Extra fields to export to the Cloud Retail + // program. + CloudExportAdditionalProperties []*CloudExportAdditionalProperties `json:"cloudExportAdditionalProperties,omitempty"` + // Color: Color of the item. + Color string `json:"color,omitempty"` + // Condition: Condition or state of the item. + Condition string `json:"condition,omitempty"` + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. + CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` + // CustomAttributes: A list of custom (merchant-provided) attributes. It can + // also be used for submitting any attribute of the feed specification in its + // generic form (for example, `{ "name": "size type", "value": "regular" }`). + // This is useful for submitting attributes not explicitly exposed by the API, + // such as additional attributes used for Buy on Google (formerly known as + // Shopping Actions). + CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` + // CustomLabel0: Custom label 0 for custom grouping of items in a Shopping + // campaign. + CustomLabel0 string `json:"customLabel0,omitempty"` + // CustomLabel1: Custom label 1 for custom grouping of items in a Shopping + // campaign. + CustomLabel1 string `json:"customLabel1,omitempty"` + // CustomLabel2: Custom label 2 for custom grouping of items in a Shopping + // campaign. + CustomLabel2 string `json:"customLabel2,omitempty"` + // CustomLabel3: Custom label 3 for custom grouping of items in a Shopping + // campaign. + CustomLabel3 string `json:"customLabel3,omitempty"` + // CustomLabel4: Custom label 4 for custom grouping of items in a Shopping + // campaign. + CustomLabel4 string `json:"customLabel4,omitempty"` + // Description: Description of the item. + Description string `json:"description,omitempty"` + // DisclosureDate: The date time when an offer becomes visible in search + // results across Google’s YouTube surfaces, in ISO 8601 + // (http://en.wikipedia.org/wiki/ISO_8601) format. See Disclosure date + // (https://support.google.com/merchants/answer/13034208) for more information. + DisclosureDate string `json:"disclosureDate,omitempty"` + // DisplayAdsId: An identifier for an item for dynamic remarketing campaigns. + DisplayAdsId string `json:"displayAdsId,omitempty"` + // DisplayAdsLink: URL directly to your item's landing page for dynamic + // remarketing campaigns. + DisplayAdsLink string `json:"displayAdsLink,omitempty"` + // DisplayAdsSimilarIds: Advertiser-specified recommendations. + DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` + // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. + DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` + // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. + DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` + // EnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` + // ExcludedDestinations: The list of destinations to exclude + // (//support.google.com/merchants/answer/6324486) for this target (corresponds + // to cleared check boxes in Merchant Center). Products that are excluded from + // all destinations for more than 7 days are automatically deleted. + ExcludedDestinations []string `json:"excludedDestinations,omitempty"` + // ExpirationDate: Date on which the item should expire, as specified upon + // insertion, in ISO 8601 format. The actual expiration date in Google Shopping + // is exposed in `productstatuses` as `googleExpirationDate` and might be + // earlier if `expirationDate` is too far in the future. + ExpirationDate string `json:"expirationDate,omitempty"` + // ExternalSellerId: Required for multi-seller accounts. Use this attribute if + // you're a marketplace uploading products for various sellers to your + // multi-seller account. + ExternalSellerId string `json:"externalSellerId,omitempty"` + // FeedLabel: Feed label for the item. Either `targetCountry` or `feedLabel` is + // required. Must be less than or equal to 20 uppercase letters (A-Z), numbers + // (0-9), and dashes (-). + FeedLabel string `json:"feedLabel,omitempty"` + // FreeShippingThreshold: Optional. Conditions to be met for a product to have + // free shipping. + FreeShippingThreshold []*FreeShippingThreshold `json:"freeShippingThreshold,omitempty"` + // Gender: Target gender of the item. + Gender string `json:"gender,omitempty"` + // GoogleProductCategory: Google's category of the item (see Google product + // taxonomy (https://support.google.com/merchants/answer/1705911)). When + // querying products, this field will contain the user provided value. There is + // currently no way to get back the auto assigned google product categories + // through the API. + GoogleProductCategory string `json:"googleProductCategory,omitempty"` + // Gtin: Global Trade Item Number (GTIN) of the item. + Gtin string `json:"gtin,omitempty"` + // Id: The REST ID of the product. Content API methods that operate on products + // take this as their `productId` parameter. The REST ID for a product has one + // of the 2 forms channel:contentLanguage: targetCountry: offerId or + // channel:contentLanguage:feedLabel: offerId. + Id string `json:"id,omitempty"` + // IdentifierExists: False when the item does not have unique product + // identifiers appropriate to its category, such as GTIN, MPN, and brand. + // Required according to the Unique Product Identifier Rules for all target + // countries except for Canada. + IdentifierExists bool `json:"identifierExists,omitempty"` + // ImageLink: URL of an image of the item. + ImageLink string `json:"imageLink,omitempty"` + // IncludedDestinations: The list of destinations to include + // (//support.google.com/merchants/answer/7501026) for this target (corresponds + // to checked check boxes in Merchant Center). Default destinations are always + // included unless provided in `excludedDestinations`. + IncludedDestinations []string `json:"includedDestinations,omitempty"` + // Installment: Number and amount of installments to pay for an item. + Installment *Installment `json:"installment,omitempty"` + // IsBundle: Whether the item is a merchant-defined bundle. A bundle is a + // custom grouping of different products sold by a merchant for a single price. + IsBundle bool `json:"isBundle,omitempty"` + // ItemGroupId: Shared identifier for all variants of the same product. + ItemGroupId string `json:"itemGroupId,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderinvoicesCreateRefundInvoiceResponse". + // "content#product" Kind string `json:"kind,omitempty"` + // LifestyleImageLinks: Additional URLs of lifestyle images of the item. Used + // to explicitly identify images that showcase your item in a real-world + // context. See the Help Center article for more information. + LifestyleImageLinks []string `json:"lifestyleImageLinks,omitempty"` + // Link: URL directly linking to your item's page on your website. + Link string `json:"link,omitempty"` + // LinkTemplate: URL template for merchant hosted local storefront. + LinkTemplate string `json:"linkTemplate,omitempty"` + // LoyaltyProgram: Loyalty program information that is used to surface loyalty + // benefits ( for example, better pricing, points, etc) to the user of this + // item. This signular field points to the latest uploaded loyalty program + // info. This field will be deprecated in the coming weeks and should not be + // used in favor of the plural 'LoyaltyProgram' field below. + LoyaltyProgram *LoyaltyProgram `json:"loyaltyProgram,omitempty"` + // LoyaltyPrograms: Optional. A list of loyalty program information that is + // used to surface loyalty benefits (for example, better pricing, points, etc) + // to the user of this item. + LoyaltyPrograms []*LoyaltyProgram `json:"loyaltyPrograms,omitempty"` + // Material: The material of which the item is made. + Material string `json:"material,omitempty"` + // MaxEnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` + // MaxHandlingTime: Maximal product handling time (in business days). + MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` + // MinEnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` + // MinHandlingTime: Minimal product handling time (in business days). + MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` + // MobileLink: URL for the mobile-optimized version of your item's landing + // page. + MobileLink string `json:"mobileLink,omitempty"` + // MobileLinkTemplate: URL template for merchant hosted local storefront + // optimized for mobile devices. + MobileLinkTemplate string `json:"mobileLinkTemplate,omitempty"` + // Mpn: Manufacturer Part Number (MPN) of the item. + Mpn string `json:"mpn,omitempty"` + // Multipack: The number of identical products in a merchant-defined multipack. + Multipack int64 `json:"multipack,omitempty,string"` + // OfferId: Required. A unique identifier for the item. Leading and trailing + // whitespaces are stripped and multiple whitespaces are replaced by a single + // whitespace upon submission. Only valid unicode characters are accepted. See + // the products feed specification for details. *Note:* Content API methods + // that operate on products take the REST ID of the product, *not* this + // identifier. + OfferId string `json:"offerId,omitempty"` + // Pattern: The item's pattern (for example, polka dots). + Pattern string `json:"pattern,omitempty"` + // Pause: Publication of this item should be temporarily paused. Acceptable + // values are: - "ads" + Pause string `json:"pause,omitempty"` + // PickupMethod: The pick up option for the item. Acceptable values are: - + // "buy" - "reserve" - "ship to store" - "not supported" + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Item store pickup timeline. Acceptable values are: - "same day" + // - "next day" - "2-day" - "3-day" - "4-day" - "5-day" - "6-day" - + // "7-day" - "multi-week" + PickupSla string `json:"pickupSla,omitempty"` + // Price: Price of the item. + Price *Price `json:"price,omitempty"` + // ProductDetails: Technical specification or additional product details. + ProductDetails []*ProductProductDetail `json:"productDetails,omitempty"` + // ProductHeight: The height of the product in the units provided. The value + // must be between 0 (exclusive) and 3000 (inclusive). + ProductHeight *ProductDimension `json:"productHeight,omitempty"` + // ProductHighlights: Bullet points describing the most relevant highlights of + // a product. + ProductHighlights []string `json:"productHighlights,omitempty"` + // ProductLength: The length of the product in the units provided. The value + // must be between 0 (exclusive) and 3000 (inclusive). + ProductLength *ProductDimension `json:"productLength,omitempty"` + // ProductTypes: Categories of the item (formatted as in product data + // specification). + ProductTypes []string `json:"productTypes,omitempty"` + // ProductWeight: The weight of the product in the units provided. The value + // must be between 0 (exclusive) and 2000 (inclusive). + ProductWeight *ProductWeight `json:"productWeight,omitempty"` + // ProductWidth: The width of the product in the units provided. The value must + // be between 0 (exclusive) and 3000 (inclusive). + ProductWidth *ProductDimension `json:"productWidth,omitempty"` + // PromotionIds: The unique ID of a promotion. + PromotionIds []string `json:"promotionIds,omitempty"` + // SalePrice: Advertised sale price of the item. + SalePrice *Price `json:"salePrice,omitempty"` + // SalePriceEffectiveDate: Date range during which the item is on sale (see + // product data specification ). + SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` + // SellOnGoogleQuantity: The quantity of the product that is available for + // selling on Google. Supported only for online products. + SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` + // Shipping: Shipping rules. + Shipping []*ProductShipping `json:"shipping,omitempty"` + // ShippingHeight: Height of the item for shipping. + ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` + // ShippingLabel: The shipping label of the product, used to group product in + // account-level shipping rules. + ShippingLabel string `json:"shippingLabel,omitempty"` + // ShippingLength: Length of the item for shipping. + ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` + // ShippingWeight: Weight of the item for shipping. + ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` + // ShippingWidth: Width of the item for shipping. + ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` + // ShoppingAdsExcludedCountries: List of country codes (ISO 3166-1 alpha-2) to + // exclude the offer from Shopping Ads destination. Countries from this list + // are removed from countries configured in MC feed settings. + ShoppingAdsExcludedCountries []string `json:"shoppingAdsExcludedCountries,omitempty"` + // SizeSystem: System in which the size is specified. Recommended for apparel + // items. + SizeSystem string `json:"sizeSystem,omitempty"` + // SizeType: The cut of the item. Recommended for apparel items. + SizeType string `json:"sizeType,omitempty"` + // Sizes: Size of the item. Only one value is allowed. For variants with + // different sizes, insert a separate product for each size with the same + // `itemGroupId` value (see size definition). + Sizes []string `json:"sizes,omitempty"` + // Source: Output only. The source of the offer, that is, how the offer was + // created. Acceptable values are: - "api" - "crawl" - "feed" + Source string `json:"source,omitempty"` + // StructuredDescription: Structured description, for algorithmically + // (AI)-generated descriptions. + StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` + // StructuredTitle: Structured title, for algorithmically (AI)-generated + // titles. + StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` + // SubscriptionCost: Number of periods (months or years) and amount of payment + // per period for an item with an associated subscription contract. + SubscriptionCost *ProductSubscriptionCost `json:"subscriptionCost,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item's country of + // sale. + TargetCountry string `json:"targetCountry,omitempty"` + // TaxCategory: The tax category of the product, used to configure detailed tax + // nexus in account-level tax settings. + TaxCategory string `json:"taxCategory,omitempty"` + // Taxes: Tax information. + Taxes []*ProductTax `json:"taxes,omitempty"` + // Title: Title of the item. + Title string `json:"title,omitempty"` + // TransitTimeLabel: The transit time label of the product, used to group + // product in account-level transit time tables. + TransitTimeLabel string `json:"transitTimeLabel,omitempty"` + // UnitPricingBaseMeasure: The preference of the denominator of the unit price. + UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` + // UnitPricingMeasure: The measure and dimension of an item. + UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` + // VirtualModelLink: URL of the 3D model of the item to provide more visuals. + VirtualModelLink string `json:"virtualModelLink,omitempty"` - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateRefundInvoiceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { - // Description: Optional description of the refund reason. - Description string `json:"description,omitempty"` - // Reason: [required] Reason for the refund. Acceptable values are: - - // "adjustment" - "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { - // Description: Optional description of the return reason. - Description string `json:"description,omitempty"` - // Reason: [required] Reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreportsListDisbursementsResponse struct { - // Disbursements: The list of disbursements. - Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreportsListDisbursementsResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of - // disbursements. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Disbursements") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disbursements") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreportsListDisbursementsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreportsListTransactionsResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreportsListTransactionsResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of transactions. - NextPageToken string `json:"nextPageToken,omitempty"` - // Transactions: The list of transactions. - Transactions []*OrderReportTransaction `json:"transactions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreportsListTransactionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsAcknowledgeRequest struct { - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order return. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OperationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsAcknowledgeRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsAcknowledgeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsAcknowledgeResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsAcknowledgeResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsAcknowledgeResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsAcknowledgeResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsCreateOrderReturnRequest struct { - // LineItems: The list of line items to return. - LineItems []*OrderreturnsLineItem `json:"lineItems,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // OrderId: The ID of the order. - OrderId string `json:"orderId,omitempty"` - // ReturnMethodType: The way of the package being returned. - ReturnMethodType string `json:"returnMethodType,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItems") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItems") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsCreateOrderReturnRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsCreateOrderReturnRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsCreateOrderReturnResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsCreateOrderReturnResponse". - Kind string `json:"kind,omitempty"` - // OrderReturn: Created order return. - OrderReturn *MerchantOrderReturn `json:"orderReturn,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsCreateOrderReturnResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsCreateOrderReturnResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsLineItem struct { - // LineItemId: The ID of the line item. This value is assigned by Google when - // an order is created. Either lineItemId or productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product to cancel. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity of this line item. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsLineItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsLineItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*MerchantOrderReturn `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsPartialRefund struct { - // PriceAmount: The pre-tax or post-tax amount to be refunded, depending on the - // location of the order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: Tax amount to be refunded. Note: This has different meaning - // depending on the location of the order. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PriceAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsPartialRefund) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsPartialRefund - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsProcessRequest struct { - // FullChargeReturnShippingCost: Option to charge the customer return shipping - // cost. - FullChargeReturnShippingCost bool `json:"fullChargeReturnShippingCost,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order return. - OperationId string `json:"operationId,omitempty"` - // RefundShippingFee: Refunds for original shipping fee. - RefundShippingFee *OrderreturnsRefundOperation `json:"refundShippingFee,omitempty"` - // ReturnItems: The list of items to return. - ReturnItems []*OrderreturnsReturnItem `json:"returnItems,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "FullChargeReturnShippingCost") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullChargeReturnShippingCost") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsProcessRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsProcessRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsProcessResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsProcessResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsProcessResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsProcessResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsRefundOperation struct { - // FullRefund: If true, the item will be fully refunded. Allowed only when - // payment_type is FOP. Merchant can choose this refund option to indicate the - // full remaining amount of corresponding object to be refunded to the customer - // through FOP. - FullRefund bool `json:"fullRefund,omitempty"` - // PartialRefund: If this is set, the item will be partially refunded. Merchant - // can choose this refund option to specify the customized amount that to be - // refunded to the customer. - PartialRefund *OrderreturnsPartialRefund `json:"partialRefund,omitempty"` - // PaymentType: The payment way of issuing refund. Default value is - // ORIGINAL_FOP if not set. - PaymentType string `json:"paymentType,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ReturnRefundReason: Code of the refund reason. - ReturnRefundReason string `json:"returnRefundReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullRefund") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullRefund") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsRefundOperation) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsRefundOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsRejectOperation struct { - // Reason: The reason for the return. - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reason") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsRejectOperation) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsRejectOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsReturnItem struct { - // Refund: Refunds the item. - Refund *OrderreturnsRefundOperation `json:"refund,omitempty"` - // Reject: Rejects the item. - Reject *OrderreturnsRejectOperation `json:"reject,omitempty"` - // ReturnItemId: Unit level ID for the return item. Different units of the same - // product will have different IDs. - ReturnItemId string `json:"returnItemId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Refund") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Refund") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrderreturnsReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAcknowledgeRequest struct { - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OperationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAcknowledgeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAcknowledgeResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersAcknowledgeResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAcknowledgeResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAdvanceTestOrderResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersAdvanceTestOrderResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAdvanceTestOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelLineItemRequest struct { - // LineItemId: The ID of the line item to cancel. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to cancel. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to cancel. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the cancellation. Acceptable values are: - - // "customerInitiatedCancel" - "invalidCoupon" - - // "malformedShippingAddress" - "noInventory" - "other" - "priceError" - // - "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelRequest struct { - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the cancellation. Acceptable values are: - - // "customerInitiatedCancel" - "invalidCoupon" - - // "malformedShippingAddress" - "noInventory" - "other" - "priceError" - // - "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OperationId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelTestOrderByCustomerRequest struct { - // Reason: The reason for the cancellation. Acceptable values are: - - // "changedMind" - "orderedWrongItem" - "other" - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reason") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelTestOrderByCustomerRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelTestOrderByCustomerResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelTestOrderByCustomerResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelTestOrderByCustomerResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestOrderRequest struct { - // Country: The CLDR territory code of the country of the test order to create. - // Affects the currency and addresses of orders created through - // `template_name`, or the addresses of orders created through `test_order`. - // Acceptable values are: - "US" - "FR" Defaults to "US". - Country string `json:"country,omitempty"` - // TemplateName: The test order template to use. Specify as an alternative to - // `testOrder` as a shortcut for retrieving a template and then creating an - // order using that template. Acceptable values are: - "template1" - - // "template1a" - "template1b" - "template2" - "template3" - TemplateName string `json:"templateName,omitempty"` - // TestOrder: The test order to create. - TestOrder *TestOrder `json:"testOrder,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestOrderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestOrderResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCreateTestOrderResponse". - Kind string `json:"kind,omitempty"` - // OrderId: The ID of the newly created test order. - OrderId string `json:"orderId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestReturnRequest struct { - // Items: Returned items. - Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestReturnRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestReturnResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCreateTestReturnResponse". - Kind string `json:"kind,omitempty"` - // ReturnId: The ID of the newly created test order return. - ReturnId string `json:"returnId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestReturnResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { - // LineItemId: The ID of the line item to return. - LineItemId string `json:"lineItemId,omitempty"` - // Quantity: Quantity that is returned. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryRefundItemItem struct { - // Amount: The total amount that is refunded. (for example, refunding $5 each - // for 2 products should be done by setting quantity to 2 and amount to 10$) In - // case of multiple refunds, this should be the amount you currently want to - // refund to the customer. - Amount *MonetaryAmount `json:"amount,omitempty"` - // FullRefund: If true, the full item will be refunded. If this is true, amount - // shouldn't be provided and will be ignored. - FullRefund bool `json:"fullRefund,omitempty"` - // LineItemId: The ID of the line item. Either lineItemId or productId is - // required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product. This is the REST ID used in the products - // service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The number of products that are refunded. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCustomBatchRequestEntryRefundItemItem) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryRefundItemItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryRefundItemShipping struct { - // Amount: The amount that is refunded. If this is not the first refund for the - // shipment, this should be the newly refunded amount. - Amount *Price `json:"amount,omitempty"` - // FullRefund: If set to true, all shipping costs for the order will be - // refunded. If this is true, amount shouldn't be provided and will be ignored. - // If set to false, submit the amount of the partial shipping refund, excluding - // the shipping tax. The shipping tax is calculated and handled on Google's - // side. - FullRefund bool `json:"fullRefund,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCustomBatchRequestEntryRefundItemShipping) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryRefundItemShipping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { - // Carrier: The carrier handling the shipment. See `shipments[].carrier` in the - // Orders resource representation for a list of acceptable values. - Carrier string `json:"carrier,omitempty"` - // ShipmentId: Required. The ID of the shipment. This is assigned by the - // merchant and is unique to each shipment. - ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking ID for the shipment. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails: -// ScheduledDeliveryDetails used to update the scheduled delivery order. -type OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails struct { - // CarrierPhoneNumber: The phone number of the carrier fulfilling the delivery. - // The phone number should be formatted as the international notation in - CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` - // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 8601 - // format. - ScheduledDate string `json:"scheduledDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierPhoneNumber") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersGetByMerchantOrderIdResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersGetByMerchantOrderIdResponse". - Kind string `json:"kind,omitempty"` - // Order: The requested order. - Order *Order `json:"order,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersGetByMerchantOrderIdResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersGetTestOrderTemplateResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersGetTestOrderTemplateResponse". - Kind string `json:"kind,omitempty"` - // Template: The requested test order template. - Template *TestOrder `json:"template,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersGetTestOrderTemplateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersInStoreRefundLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // PriceAmount: The amount to be refunded. This may be pre-tax or post-tax - // depending on the location of the order. Required. - PriceAmount *Price `json:"priceAmount,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // TaxAmount: The amount of tax to be refunded. Required. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersInStoreRefundLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersInStoreRefundLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersInStoreRefundLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersInStoreRefundLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of orders. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*Order `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundItemRequest struct { - // Items: The items that are refunded. Either Item or Shipping must be provided - // in the request. - Items []*OrdersCustomBatchRequestEntryRefundItemItem `json:"items,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - - // "shippingCostAdjustment" - "priceAdjustment" - "taxAdjustment" - - // "feeAdjustment" - "courtesyAdjustment" - "adjustment" - - // "customerCancelled" - "noInventory" - "productNotAsDescribed" - - // "undeliverableShippingAddress" - "wrongProductShipped" - - // "lateShipmentCredit" - "deliveredLateByCarrier" - - // "productArrivedDamaged" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // Shipping: The refund on shipping. Optional, but either Item or Shipping must - // be provided in the request. - Shipping *OrdersCustomBatchRequestEntryRefundItemShipping `json:"shipping,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRefundItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRefundItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRefundItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundOrderRequest struct { - // Amount: The amount that is refunded. If this is not the first refund for the - // order, this should be the newly refunded amount. - Amount *MonetaryAmount `json:"amount,omitempty"` - // FullRefund: If true, the full order will be refunded, including shipping. If - // this is true, amount shouldn't be provided and will be ignored. - FullRefund bool `json:"fullRefund,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - - // "courtesyAdjustment" - "other" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRefundOrderRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundOrderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundOrderResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRefundOrderResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRefundOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRejectReturnLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "damagedOrUsed" - "missingComponent" - "notEligible" - "other" - - // "outOfReturnWindow" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRejectReturnLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRejectReturnLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRejectReturnLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRejectReturnLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersReturnRefundLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // PriceAmount: The amount to be refunded. This may be pre-tax or post-tax - // depending on the location of the order. If omitted, refundless return is - // assumed. - PriceAmount *Price `json:"priceAmount,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. Quantity is required. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // TaxAmount: The amount of tax to be refunded. Optional, but if filled, then - // priceAmount must be set. Calculated automatically if not provided. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersReturnRefundLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersReturnRefundLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersReturnRefundLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersReturnRefundLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersSetLineItemMetadataRequest struct { - Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` - // LineItemId: The ID of the line item to set metadata. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to set metadata. This is the REST ID used - // in the products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersSetLineItemMetadataRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersSetLineItemMetadataResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersSetLineItemMetadataResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersSetLineItemMetadataResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersShipLineItemsRequest struct { - // LineItems: Line items to ship. - LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ShipmentGroupId: ID of the shipment group. Required for orders that use the - // orderinvoices service. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ShipmentInfos: Shipment information. This field is repeated because a single - // line item can be shipped in several packages (and have several tracking - // IDs). - ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItems") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItems") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersShipLineItemsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersShipLineItemsResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersShipLineItemsResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersShipLineItemsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateLineItemShippingDetailsRequest struct { - // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not - // specified only ship by date is updated. Provided date should be within 1 - // year timeframe and can't be a date in the past. - DeliverByDate string `json:"deliverByDate,omitempty"` - // LineItemId: The ID of the line item to set metadata. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to set metadata. This is the REST ID used - // in the products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // ShipByDate: Updated ship by date, in ISO 8601 format. If not specified only - // deliver by date is updated. Provided date should be within 1 year timeframe - // and can't be a date in the past. - ShipByDate string `json:"shipByDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliverByDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeliverByDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateLineItemShippingDetailsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateLineItemShippingDetailsResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateLineItemShippingDetailsResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateLineItemShippingDetailsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateMerchantOrderIdRequest struct { - // MerchantOrderId: The merchant order id to be assigned to the order. Must be - // unique per merchant. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MerchantOrderId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateMerchantOrderIdRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateMerchantOrderIdResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateMerchantOrderIdResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateMerchantOrderIdResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateShipmentRequest struct { - // Carrier: The carrier handling the shipment. Not updated if missing. See - // `shipments[].carrier` in the Orders resource representation for a list of - // acceptable values. - Carrier string `json:"carrier,omitempty"` - // DeliveryDate: Date on which the shipment has been delivered, in ISO 8601 - // format. Optional and can be provided only if `status` is `delivered`. - DeliveryDate string `json:"deliveryDate,omitempty"` - // LastPickupDate: Date after which the pickup will expire, in ISO 8601 format. - // Required only when order is buy-online-pickup-in-store(BOPIS) and `status` - // is `ready for pickup`. - LastPickupDate string `json:"lastPickupDate,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ReadyPickupDate: Date on which the shipment has been ready for pickup, in - // ISO 8601 format. Optional and can be provided only if `status` is `ready for - // pickup`. - ReadyPickupDate string `json:"readyPickupDate,omitempty"` - // ScheduledDeliveryDetails: Delivery details of the shipment if scheduling is - // needed. - ScheduledDeliveryDetails *OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` - // ShipmentId: The ID of the shipment. - ShipmentId string `json:"shipmentId,omitempty"` - // Status: New status for the shipment. Not updated if missing. Acceptable - // values are: - "delivered" - "undeliverable" - "readyForPickup" - Status string `json:"status,omitempty"` - // TrackingId: The tracking ID for the shipment. Not updated if missing. - TrackingId string `json:"trackingId,omitempty"` - // UndeliveredDate: Date on which the shipment has been undeliverable, in ISO - // 8601 format. Optional and can be provided only if `status` is - // `undeliverable`. - UndeliveredDate string `json:"undeliveredDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateShipmentRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateShipmentResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateShipmentResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExecutionStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateShipmentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PauseBuyOnGoogleProgramRequest: Request message for the PauseProgram method. -type PauseBuyOnGoogleProgramRequest struct { -} - -// PaymentServiceProviderLinkInfo: Additional information required for -// PAYMENT_SERVICE_PROVIDER link type. -type PaymentServiceProviderLinkInfo struct { - // ExternalAccountBusinessCountry: The business country of the merchant account - // as identified by the third party service provider. - ExternalAccountBusinessCountry string `json:"externalAccountBusinessCountry,omitempty"` - // ExternalAccountId: The id used by the third party service provider to - // identify the merchant. - ExternalAccountId string `json:"externalAccountId,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExternalAccountBusinessCountry") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalAccountBusinessCountry") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PaymentServiceProviderLinkInfo) MarshalJSON() ([]byte, error) { - type NoMethod PaymentServiceProviderLinkInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PickupCarrierService struct { - // CarrierName: The name of the pickup carrier (for example, "UPS"). - // Required. - CarrierName string `json:"carrierName,omitempty"` - // ServiceName: The name of the pickup service (for example, "Access point"). - // Required. - ServiceName string `json:"serviceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PickupCarrierService) MarshalJSON() ([]byte, error) { - type NoMethod PickupCarrierService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PickupServicesPickupService struct { - // CarrierName: The name of the carrier (for example, "UPS"). Always present. - CarrierName string `json:"carrierName,omitempty"` - // Country: The CLDR country code of the carrier (for example, "US"). Always - // present. - Country string `json:"country,omitempty"` - // ServiceName: The name of the pickup service (for example, "Access point"). - // Always present. - ServiceName string `json:"serviceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PickupServicesPickupService) MarshalJSON() ([]byte, error) { - type NoMethod PickupServicesPickupService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // Inventory: The inventory to submit. This should be set only if the method is - // `inventory`. - Inventory *PosInventory `json:"inventory,omitempty"` - // MerchantId: The ID of the POS data provider. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "delete" - - // "get" - "insert" - "inventory" - "sale" - Method string `json:"method,omitempty"` - // Sale: The sale information to submit. This should be set only if the method - // is `sale`. - Sale *PosSale `json:"sale,omitempty"` - // Store: The store information to submit. This should be set only if the - // method is `insert`. - Store *PosStore `json:"store,omitempty"` - // StoreCode: The store code. This should be set only if the method is `delete` - // or `get`. - StoreCode string `json:"storeCode,omitempty"` - // TargetMerchantId: The ID of the account for which to get/submit data. - TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Inventory: The updated inventory information. - Inventory *PosInventory `json:"inventory,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // Sale: The updated sale information. - Sale *PosSale `json:"sale,omitempty"` - // Store: The retrieved or updated store information. - Store *PosStore `json:"store,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosDataProviders struct { - // Country: Country code. - Country string `json:"country,omitempty"` - // PosDataProviders: A list of POS data providers. - PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosDataProviders) MarshalJSON() ([]byte, error) { - type NoMethod PosDataProviders - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosDataProvidersPosDataProvider struct { - // DisplayName: The display name of Pos data Provider. - DisplayName string `json:"displayName,omitempty"` - // FullName: The full name of this POS data Provider. - FullName string `json:"fullName,omitempty"` - // ProviderId: The ID of the account. - ProviderId uint64 `json:"providerId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { - type NoMethod PosDataProvidersPosDataProvider - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosInventory: The absolute quantity of an item available at the given store. -type PosInventory struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posInventory" - Kind string `json:"kind,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosInventory) MarshalJSON() ([]byte, error) { - type NoMethod PosInventory - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosInventoryRequest struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosInventoryRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosInventoryRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosInventoryResponse struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posInventoryResponse". - Kind string `json:"kind,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosInventoryResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosInventoryResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posListResponse". - Kind string `json:"kind,omitempty"` - Resources []*PosStore `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosListResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosSale: The change of the available quantity of an item at the given store. -type PosSale struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posSale" - Kind string `json:"kind,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosSale) MarshalJSON() ([]byte, error) { - type NoMethod PosSale - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosSaleRequest struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosSaleRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosSaleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosSaleResponse struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posSaleResponse". - Kind string `json:"kind,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentLanguage") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosSaleResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosSaleResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosStore: Store resource. -type PosStore struct { - // GcidCategory: The business type of the store. - GcidCategory []string `json:"gcidCategory,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posStore" - Kind string `json:"kind,omitempty"` - // MatchingStatus: Output only. The matching status of POS store and Google - // Business Profile store. Possible values are: - "matched": The POS store is - // successfully matched with the Google Business Profile store. - "failed": - // The POS store is not matched with the Google Business Profile store. See - // matching_status_hint for further details. Note that there is up to 48 hours - // propagation delay for changes in Merchant Center (e.g. creation of new - // account, accounts linking) and Google Business Profile (e.g. store address - // update) which may affect the matching status. In such cases, after a delay - // call pos.list - // (https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) - // to retrieve the updated matching status. - MatchingStatus string `json:"matchingStatus,omitempty"` - // MatchingStatusHint: Output only. The hint of why the matching has failed. - // This is only set when matching_status=failed. Possible values are: - - // "linked-store-not-found": There aren't any Google Business Profile stores - // available for matching. Connect your Merchant Center account with the Google - // Business Profile account. Or add a new Google Business Profile store - // corresponding to the POS store. - "store-match-not-found": The provided - // POS store couldn't be matched to any of the connected Google Business - // Profile stores. Merchant Center account is connected correctly and stores - // are available on Google Business Profile, but POS store location address - // does not match with Google Business Profile stores' addresses. Update POS - // store address or Google Business Profile store address to match correctly. - - // "store-match-unverified": The provided POS store couldn't be matched to - // any of the connected Google Business Profile stores, as the matched Google - // Business Profile store is unverified. Go through the Google Business Profile - // verification process to match correctly. - MatchingStatusHint string `json:"matchingStatusHint,omitempty"` - // PhoneNumber: The store phone number. - PhoneNumber string `json:"phoneNumber,omitempty"` - // PlaceId: The Google Place Id of the store location. - PlaceId string `json:"placeId,omitempty"` - // StoreAddress: Required. The street address of the store. - StoreAddress string `json:"storeAddress,omitempty"` - // StoreCode: Required. A store identifier that is unique for the given - // merchant. - StoreCode string `json:"storeCode,omitempty"` - // StoreName: The merchant or store name. - StoreName string `json:"storeName,omitempty"` - // WebsiteUrl: The website url for the store or merchant. - WebsiteUrl string `json:"websiteUrl,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GcidCategory") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcidCategory") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PosStore) MarshalJSON() ([]byte, error) { - type NoMethod PosStore - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PostalCodeGroup struct { - // Country: The CLDR territory code of the country the postal code group - // applies to. Required. - Country string `json:"country,omitempty"` - // Name: The name of the postal code group, referred to in headers. Required. - Name string `json:"name,omitempty"` - // PostalCodeRanges: A range of postal codes. Required. - PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PostalCodeGroup) MarshalJSON() ([]byte, error) { - type NoMethod PostalCodeGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PostalCodeRange struct { - // PostalCodeRangeBegin: A postal code or a pattern of the form `prefix*` - // denoting the inclusive lower bound of the range defining the area. Examples - // values: "94108", "9410*", "9*". Required. - PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` - // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` - // denoting the inclusive upper bound of the range defining the area. It must - // have the same length as `postalCodeRangeBegin`: if `postalCodeRangeBegin` is - // a postal code then `postalCodeRangeEnd` must be a postal code too; if - // `postalCodeRangeBegin` is a pattern then `postalCodeRangeEnd` must be a - // pattern with the same prefix length. Optional: if not set, then the area is - // defined as being all the postal codes matching `postalCodeRangeBegin`. - PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodeRangeBegin") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PostalCodeRange) MarshalJSON() ([]byte, error) { - type NoMethod PostalCodeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Price struct { - // Currency: The currency of the price. - Currency string `json:"currency,omitempty"` - // Value: The price represented as a number. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Currency") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Currency") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Price) MarshalJSON() ([]byte, error) { - type NoMethod Price - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceAmount: The price represented as a number and currency. -type PriceAmount struct { - // Currency: The currency of the price. - Currency string `json:"currency,omitempty"` - // Value: The price represented as a number. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Currency") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Currency") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PriceAmount) MarshalJSON() ([]byte, error) { - type NoMethod PriceAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceCompetitiveness: Price competitiveness fields requested by the merchant -// in the query. Field values are only set if the merchant queries -// `PriceCompetitivenessProductView`. -// https://support.google.com/merchants/answer/9626903 -type PriceCompetitiveness struct { - // BenchmarkPriceCurrencyCode: The price benchmark currency (ISO 4217 code). - BenchmarkPriceCurrencyCode string `json:"benchmarkPriceCurrencyCode,omitempty"` - // BenchmarkPriceMicros: The latest available price benchmark in micros (1 - // millionth of a standard unit, 1 USD = 1000000 micros) for the product's - // catalog in the benchmark country. - BenchmarkPriceMicros int64 `json:"benchmarkPriceMicros,omitempty,string"` - // CountryCode: The country of the price benchmark (ISO 3166 code). - CountryCode string `json:"countryCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PriceCompetitiveness) MarshalJSON() ([]byte, error) { - type NoMethod PriceCompetitiveness - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceInsights: Price insights fields requested by the merchant in the query. -// Field values are only set if the merchant queries -// `PriceInsightsProductView`. -// https://support.google.com/merchants/answer/11916926 -type PriceInsights struct { - // Effectiveness: The predicted effectiveness of applying the price suggestion, - // bucketed. - // - // Possible values: - // "EFFECTIVENESS_UNSPECIFIED" - Effectiveness is unknown. - // "LOW" - Effectiveness is low. - // "MEDIUM" - Effectiveness is medium. - // "HIGH" - Effectiveness is high. - Effectiveness string `json:"effectiveness,omitempty"` - // PredictedClicksChangeFraction: The predicted change in clicks as a fraction - // after introducing the suggested price compared to current active price. For - // example, 0.05 is a 5% predicted increase in clicks. - PredictedClicksChangeFraction float64 `json:"predictedClicksChangeFraction,omitempty"` - // PredictedConversionsChangeFraction: The predicted change in conversions as a - // fraction after introducing the suggested price compared to current active - // price. For example, 0.05 is a 5% predicted increase in conversions). - PredictedConversionsChangeFraction float64 `json:"predictedConversionsChangeFraction,omitempty"` - // PredictedGrossProfitChangeFraction: *Deprecated*: This field is no longer - // supported and will start returning 0. The predicted change in gross profit - // as a fraction after introducing the suggested price compared to current - // active price. For example, 0.05 is a 5% predicted increase in gross profit. - PredictedGrossProfitChangeFraction float64 `json:"predictedGrossProfitChangeFraction,omitempty"` - // PredictedImpressionsChangeFraction: The predicted change in impressions as a - // fraction after introducing the suggested price compared to current active - // price. For example, 0.05 is a 5% predicted increase in impressions. - PredictedImpressionsChangeFraction float64 `json:"predictedImpressionsChangeFraction,omitempty"` - // PredictedMonthlyGrossProfitChangeCurrencyCode: *Deprecated*: This field is - // no longer supported and will start returning USD for all requests. The - // predicted monthly gross profit change currency (ISO 4217 code). - PredictedMonthlyGrossProfitChangeCurrencyCode string `json:"predictedMonthlyGrossProfitChangeCurrencyCode,omitempty"` - // PredictedMonthlyGrossProfitChangeMicros: *Deprecated*: This field is no - // longer supported and will start returning 0. The predicted change in gross - // profit in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - // after introducing the suggested price for a month compared to current active - // price. - PredictedMonthlyGrossProfitChangeMicros int64 `json:"predictedMonthlyGrossProfitChangeMicros,omitempty,string"` - // SuggestedPriceCurrencyCode: The suggested price currency (ISO 4217 code). - SuggestedPriceCurrencyCode string `json:"suggestedPriceCurrencyCode,omitempty"` - // SuggestedPriceMicros: The latest suggested price in micros (1 millionth of a - // standard unit, 1 USD = 1000000 micros) for the product. - SuggestedPriceMicros int64 `json:"suggestedPriceMicros,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Effectiveness") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Effectiveness") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PriceInsights) MarshalJSON() ([]byte, error) { - type NoMethod PriceInsights - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *PriceInsights) UnmarshalJSON(data []byte) error { - type NoMethod PriceInsights - var s1 struct { - PredictedClicksChangeFraction gensupport.JSONFloat64 `json:"predictedClicksChangeFraction"` - PredictedConversionsChangeFraction gensupport.JSONFloat64 `json:"predictedConversionsChangeFraction"` - PredictedGrossProfitChangeFraction gensupport.JSONFloat64 `json:"predictedGrossProfitChangeFraction"` - PredictedImpressionsChangeFraction gensupport.JSONFloat64 `json:"predictedImpressionsChangeFraction"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedClicksChangeFraction = float64(s1.PredictedClicksChangeFraction) - s.PredictedConversionsChangeFraction = float64(s1.PredictedConversionsChangeFraction) - s.PredictedGrossProfitChangeFraction = float64(s1.PredictedGrossProfitChangeFraction) - s.PredictedImpressionsChangeFraction = float64(s1.PredictedImpressionsChangeFraction) - return nil -} - -// Product: Required product attributes are primarily defined by the product -// data specification. See the Product Data Specification Help Center article -// for information. Product data. After inserting, updating, or deleting a -// product, it may take several minutes before changes take effect. -type Product struct { - // AdditionalImageLinks: Additional URLs of images of the item. - AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` - // AdditionalSizeType: Additional cut of the item. Used together with size_type - // to represent combined size types for apparel items. - AdditionalSizeType string `json:"additionalSizeType,omitempty"` - // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%, - // discouraged otherwise. - AdsGrouping string `json:"adsGrouping,omitempty"` - // AdsLabels: Similar to ads_grouping, but only works on CPC. - AdsLabels []string `json:"adsLabels,omitempty"` - // AdsRedirect: Allows advertisers to override the item URL when the product is - // shown within the context of Product Ads. - AdsRedirect string `json:"adsRedirect,omitempty"` - // Adult: Should be set to true if the item is targeted towards adults. - Adult bool `json:"adult,omitempty"` - // AgeGroup: Target age group of the item. - AgeGroup string `json:"ageGroup,omitempty"` - // AutoPricingMinPrice: A safeguard in the Automated Discounts - // (//support.google.com/merchants/answer/10295759) and Dynamic Promotions - // (//support.google.com/merchants/answer/13949249) projects, ensuring that - // discounts on merchants' offers do not fall below this value, thereby - // preserving the offer's value and profitability. - AutoPricingMinPrice *Price `json:"autoPricingMinPrice,omitempty"` - // Availability: Availability status of the item. - Availability string `json:"availability,omitempty"` - // AvailabilityDate: The day a pre-ordered product becomes available for - // delivery, in ISO 8601 format. - AvailabilityDate string `json:"availabilityDate,omitempty"` - // Brand: Brand of the item. - Brand string `json:"brand,omitempty"` - // CanonicalLink: URL for the canonical version of your item's landing page. - CanonicalLink string `json:"canonicalLink,omitempty"` - // Certifications: Product certification - // (https://support.google.com/merchants/answer/13528839), introduced for EU - // energy efficiency labeling compliance using the EU EPREL - // (https://eprel.ec.europa.eu/screen/home) database. - Certifications []*ProductCertification `json:"certifications,omitempty"` - // Channel: Required. The item's channel (online or local). Acceptable values - // are: - "local" - "online" - Channel string `json:"channel,omitempty"` - // CloudExportAdditionalProperties: Extra fields to export to the Cloud Retail - // program. - CloudExportAdditionalProperties []*CloudExportAdditionalProperties `json:"cloudExportAdditionalProperties,omitempty"` - // Color: Color of the item. - Color string `json:"color,omitempty"` - // Condition: Condition or state of the item. - Condition string `json:"condition,omitempty"` - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. - CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` - // CustomAttributes: A list of custom (merchant-provided) attributes. It can - // also be used for submitting any attribute of the feed specification in its - // generic form (for example, `{ "name": "size type", "value": "regular" }`). - // This is useful for submitting attributes not explicitly exposed by the API, - // such as additional attributes used for Buy on Google (formerly known as - // Shopping Actions). - CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` - // CustomLabel0: Custom label 0 for custom grouping of items in a Shopping - // campaign. - CustomLabel0 string `json:"customLabel0,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of items in a Shopping - // campaign. - CustomLabel1 string `json:"customLabel1,omitempty"` - // CustomLabel2: Custom label 2 for custom grouping of items in a Shopping - // campaign. - CustomLabel2 string `json:"customLabel2,omitempty"` - // CustomLabel3: Custom label 3 for custom grouping of items in a Shopping - // campaign. - CustomLabel3 string `json:"customLabel3,omitempty"` - // CustomLabel4: Custom label 4 for custom grouping of items in a Shopping - // campaign. - CustomLabel4 string `json:"customLabel4,omitempty"` - // Description: Description of the item. - Description string `json:"description,omitempty"` - // DisclosureDate: The date time when an offer becomes visible in search - // results across Google’s YouTube surfaces, in ISO 8601 - // (http://en.wikipedia.org/wiki/ISO_8601) format. See Disclosure date - // (https://support.google.com/merchants/answer/13034208) for more information. - DisclosureDate string `json:"disclosureDate,omitempty"` - // DisplayAdsId: An identifier for an item for dynamic remarketing campaigns. - DisplayAdsId string `json:"displayAdsId,omitempty"` - // DisplayAdsLink: URL directly to your item's landing page for dynamic - // remarketing campaigns. - DisplayAdsLink string `json:"displayAdsLink,omitempty"` - // DisplayAdsSimilarIds: Advertiser-specified recommendations. - DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` - // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. - DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` - // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. - DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` - // EnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` - // ExcludedDestinations: The list of destinations to exclude - // (//support.google.com/merchants/answer/6324486) for this target (corresponds - // to cleared check boxes in Merchant Center). Products that are excluded from - // all destinations for more than 7 days are automatically deleted. - ExcludedDestinations []string `json:"excludedDestinations,omitempty"` - // ExpirationDate: Date on which the item should expire, as specified upon - // insertion, in ISO 8601 format. The actual expiration date in Google Shopping - // is exposed in `productstatuses` as `googleExpirationDate` and might be - // earlier if `expirationDate` is too far in the future. - ExpirationDate string `json:"expirationDate,omitempty"` - // ExternalSellerId: Required for multi-seller accounts. Use this attribute if - // you're a marketplace uploading products for various sellers to your - // multi-seller account. - ExternalSellerId string `json:"externalSellerId,omitempty"` - // FeedLabel: Feed label for the item. Either `targetCountry` or `feedLabel` is - // required. Must be less than or equal to 20 uppercase letters (A-Z), numbers - // (0-9), and dashes (-). - FeedLabel string `json:"feedLabel,omitempty"` - // FreeShippingThreshold: Optional. Conditions to be met for a product to have - // free shipping. - FreeShippingThreshold []*FreeShippingThreshold `json:"freeShippingThreshold,omitempty"` - // Gender: Target gender of the item. - Gender string `json:"gender,omitempty"` - // GoogleProductCategory: Google's category of the item (see Google product - // taxonomy (https://support.google.com/merchants/answer/1705911)). When - // querying products, this field will contain the user provided value. There is - // currently no way to get back the auto assigned google product categories - // through the API. - GoogleProductCategory string `json:"googleProductCategory,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. - Gtin string `json:"gtin,omitempty"` - // Id: The REST ID of the product. Content API methods that operate on products - // take this as their `productId` parameter. The REST ID for a product has one - // of the 2 forms channel:contentLanguage: targetCountry: offerId or - // channel:contentLanguage:feedLabel: offerId. - Id string `json:"id,omitempty"` - // IdentifierExists: False when the item does not have unique product - // identifiers appropriate to its category, such as GTIN, MPN, and brand. - // Required according to the Unique Product Identifier Rules for all target - // countries except for Canada. - IdentifierExists bool `json:"identifierExists,omitempty"` - // ImageLink: URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // IncludedDestinations: The list of destinations to include - // (//support.google.com/merchants/answer/7501026) for this target (corresponds - // to checked check boxes in Merchant Center). Default destinations are always - // included unless provided in `excludedDestinations`. - IncludedDestinations []string `json:"includedDestinations,omitempty"` - // Installment: Number and amount of installments to pay for an item. - Installment *Installment `json:"installment,omitempty"` - // IsBundle: Whether the item is a merchant-defined bundle. A bundle is a - // custom grouping of different products sold by a merchant for a single price. - IsBundle bool `json:"isBundle,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#product" - Kind string `json:"kind,omitempty"` - // LifestyleImageLinks: Additional URLs of lifestyle images of the item. Used - // to explicitly identify images that showcase your item in a real-world - // context. See the Help Center article for more information. - LifestyleImageLinks []string `json:"lifestyleImageLinks,omitempty"` - // Link: URL directly linking to your item's page on your website. - Link string `json:"link,omitempty"` - // LinkTemplate: URL template for merchant hosted local storefront. - LinkTemplate string `json:"linkTemplate,omitempty"` - // LoyaltyProgram: Loyalty program information that is used to surface loyalty - // benefits ( for example, better pricing, points, etc) to the user of this - // item. This signular field points to the latest uploaded loyalty program - // info. This field will be deprecated in the coming weeks and should not be - // used in favor of the plural 'LoyaltyProgram' field below. - LoyaltyProgram *LoyaltyProgram `json:"loyaltyProgram,omitempty"` - // LoyaltyPrograms: Optional. A list of loyalty program information that is - // used to surface loyalty benefits (for example, better pricing, points, etc) - // to the user of this item. - LoyaltyPrograms []*LoyaltyProgram `json:"loyaltyPrograms,omitempty"` - // Material: The material of which the item is made. - Material string `json:"material,omitempty"` - // MaxEnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` - // MaxHandlingTime: Maximal product handling time (in business days). - MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` - // MinEnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` - // MinHandlingTime: Minimal product handling time (in business days). - MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` - // MobileLink: URL for the mobile-optimized version of your item's landing - // page. - MobileLink string `json:"mobileLink,omitempty"` - // MobileLinkTemplate: URL template for merchant hosted local storefront - // optimized for mobile devices. - MobileLinkTemplate string `json:"mobileLinkTemplate,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. - Mpn string `json:"mpn,omitempty"` - // Multipack: The number of identical products in a merchant-defined multipack. - Multipack int64 `json:"multipack,omitempty,string"` - // OfferId: Required. A unique identifier for the item. Leading and trailing - // whitespaces are stripped and multiple whitespaces are replaced by a single - // whitespace upon submission. Only valid unicode characters are accepted. See - // the products feed specification for details. *Note:* Content API methods - // that operate on products take the REST ID of the product, *not* this - // identifier. - OfferId string `json:"offerId,omitempty"` - // Pattern: The item's pattern (for example, polka dots). - Pattern string `json:"pattern,omitempty"` - // Pause: Publication of this item should be temporarily paused. Acceptable - // values are: - "ads" - Pause string `json:"pause,omitempty"` - // PickupMethod: The pick up option for the item. Acceptable values are: - - // "buy" - "reserve" - "ship to store" - "not supported" - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Item store pickup timeline. Acceptable values are: - "same day" - // - "next day" - "2-day" - "3-day" - "4-day" - "5-day" - "6-day" - - // "7-day" - "multi-week" - PickupSla string `json:"pickupSla,omitempty"` - // Price: Price of the item. - Price *Price `json:"price,omitempty"` - // ProductDetails: Technical specification or additional product details. - ProductDetails []*ProductProductDetail `json:"productDetails,omitempty"` - // ProductHeight: The height of the product in the units provided. The value - // must be between 0 (exclusive) and 3000 (inclusive). - ProductHeight *ProductDimension `json:"productHeight,omitempty"` - // ProductHighlights: Bullet points describing the most relevant highlights of - // a product. - ProductHighlights []string `json:"productHighlights,omitempty"` - // ProductLength: The length of the product in the units provided. The value - // must be between 0 (exclusive) and 3000 (inclusive). - ProductLength *ProductDimension `json:"productLength,omitempty"` - // ProductTypes: Categories of the item (formatted as in product data - // specification). - ProductTypes []string `json:"productTypes,omitempty"` - // ProductWeight: The weight of the product in the units provided. The value - // must be between 0 (exclusive) and 2000 (inclusive). - ProductWeight *ProductWeight `json:"productWeight,omitempty"` - // ProductWidth: The width of the product in the units provided. The value must - // be between 0 (exclusive) and 3000 (inclusive). - ProductWidth *ProductDimension `json:"productWidth,omitempty"` - // PromotionIds: The unique ID of a promotion. - PromotionIds []string `json:"promotionIds,omitempty"` - // SalePrice: Advertised sale price of the item. - SalePrice *Price `json:"salePrice,omitempty"` - // SalePriceEffectiveDate: Date range during which the item is on sale (see - // product data specification ). - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` - // SellOnGoogleQuantity: The quantity of the product that is available for - // selling on Google. Supported only for online products. - SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` - // Shipping: Shipping rules. - Shipping []*ProductShipping `json:"shipping,omitempty"` - // ShippingHeight: Height of the item for shipping. - ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` - // ShippingLabel: The shipping label of the product, used to group product in - // account-level shipping rules. - ShippingLabel string `json:"shippingLabel,omitempty"` - // ShippingLength: Length of the item for shipping. - ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` - // ShippingWeight: Weight of the item for shipping. - ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` - // ShippingWidth: Width of the item for shipping. - ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` - // ShoppingAdsExcludedCountries: List of country codes (ISO 3166-1 alpha-2) to - // exclude the offer from Shopping Ads destination. Countries from this list - // are removed from countries configured in MC feed settings. - ShoppingAdsExcludedCountries []string `json:"shoppingAdsExcludedCountries,omitempty"` - // SizeSystem: System in which the size is specified. Recommended for apparel - // items. - SizeSystem string `json:"sizeSystem,omitempty"` - // SizeType: The cut of the item. Recommended for apparel items. - SizeType string `json:"sizeType,omitempty"` - // Sizes: Size of the item. Only one value is allowed. For variants with - // different sizes, insert a separate product for each size with the same - // `itemGroupId` value (see size definition). - Sizes []string `json:"sizes,omitempty"` - // Source: Output only. The source of the offer, that is, how the offer was - // created. Acceptable values are: - "api" - "crawl" - "feed" - Source string `json:"source,omitempty"` - // StructuredDescription: Structured description, for algorithmically - // (AI)-generated descriptions. - StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` - // StructuredTitle: Structured title, for algorithmically (AI)-generated - // titles. - StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` - // SubscriptionCost: Number of periods (months or years) and amount of payment - // per period for an item with an associated subscription contract. - SubscriptionCost *ProductSubscriptionCost `json:"subscriptionCost,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item's country of - // sale. - TargetCountry string `json:"targetCountry,omitempty"` - // TaxCategory: The tax category of the product, used to configure detailed tax - // nexus in account-level tax settings. - TaxCategory string `json:"taxCategory,omitempty"` - // Taxes: Tax information. - Taxes []*ProductTax `json:"taxes,omitempty"` - // Title: Title of the item. - Title string `json:"title,omitempty"` - // TransitTimeLabel: The transit time label of the product, used to group - // product in account-level transit time tables. - TransitTimeLabel string `json:"transitTimeLabel,omitempty"` - // UnitPricingBaseMeasure: The preference of the denominator of the unit price. - UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` - // UnitPricingMeasure: The measure and dimension of an item. - UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` - // VirtualModelLink: URL of the 3D model of the item to provide more visuals. - VirtualModelLink string `json:"virtualModelLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdditionalImageLinks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalImageLinks") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Product) MarshalJSON() ([]byte, error) { - type NoMethod Product - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Product) UnmarshalJSON(data []byte) error { - type NoMethod Product - var s1 struct { - DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DisplayAdsValue = float64(s1.DisplayAdsValue) - return nil -} - -type ProductAmount struct { - // PriceAmount: The pre-tax or post-tax price depending on the location of the - // order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // RemittedTaxAmount: Remitted tax value. - RemittedTaxAmount *Price `json:"remittedTaxAmount,omitempty"` - // TaxAmount: Tax value. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PriceAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductAmount) MarshalJSON() ([]byte, error) { - type NoMethod ProductAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductCertification: Product certification -// (https://support.google.com/merchants/answer/13528839), introduced for EU -// energy efficiency labeling compliance using the EU EPREL -// (https://eprel.ec.europa.eu/screen/home) database. -type ProductCertification struct { - // CertificationAuthority: The certification authority, for example - // "European_Commission". Maximum length is 2000 characters. - CertificationAuthority string `json:"certificationAuthority,omitempty"` - // CertificationCode: The certification code, for eaxample "123456". Maximum - // length is 2000 characters. - CertificationCode string `json:"certificationCode,omitempty"` - // CertificationName: The name of the certification, for example "EPREL". - // Maximum length is 2000 characters. - CertificationName string `json:"certificationName,omitempty"` - // CertificationValue: The certification value (also known as class, level or - // grade), for example "A+", "C", "gold". Maximum length is 2000 characters. - CertificationValue string `json:"certificationValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificationAuthority") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificationAuthority") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductCertification) MarshalJSON() ([]byte, error) { - type NoMethod ProductCertification - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductCluster: Product cluster fields. A product cluster is a grouping for -// different offers that represent the same product. Values are only set for -// fields requested explicitly in the request's search query. -type ProductCluster struct { - // Brand: Brand of the product cluster. - Brand string `json:"brand,omitempty"` - // BrandInventoryStatus: Tells if there is at least one product of the brand - // currently `IN_STOCK` in your product feed across multiple countries, all - // products are `OUT_OF_STOCK` in your product feed, or `NOT_IN_INVENTORY`. The - // field doesn't take the Best Sellers report country filter into account. - // - // Possible values: - // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. - // "IN_STOCK" - Merchant has a product for this product cluster or brand in - // stock. - // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand - // in inventory but it is currently out of stock. - // "NOT_IN_INVENTORY" - Merchant does not have a product for this product - // cluster or brand in inventory. - BrandInventoryStatus string `json:"brandInventoryStatus,omitempty"` - // CategoryL1: Product category (1st level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Product category (2nd level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Product category (3rd level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Product category (4th level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Product category (5th level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL5 string `json:"categoryL5,omitempty"` - // InventoryStatus: Tells whether the product cluster is `IN_STOCK` in your - // product feed across multiple countries, `OUT_OF_STOCK` in your product feed, - // or `NOT_IN_INVENTORY` at all. The field doesn't take the Best Sellers report - // country filter into account. - // - // Possible values: - // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. - // "IN_STOCK" - Merchant has a product for this product cluster or brand in - // stock. - // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand - // in inventory but it is currently out of stock. - // "NOT_IN_INVENTORY" - Merchant does not have a product for this product - // cluster or brand in inventory. - InventoryStatus string `json:"inventoryStatus,omitempty"` - // Title: Title of the product cluster. - Title string `json:"title,omitempty"` - // VariantGtins: GTINs of example variants of the product cluster. - VariantGtins []string `json:"variantGtins,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductCluster) MarshalJSON() ([]byte, error) { - type NoMethod ProductCluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTime: The estimated days to deliver a product after an order -// is placed. Only authorized shipping signals partners working with a merchant -// can use this resource. Merchants should use the `products` -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#productshipping) -// resource instead. -type ProductDeliveryTime struct { - // AreaDeliveryTimes: Required. A set of associations between `DeliveryArea` - // and `DeliveryTime` entries. The total number of `areaDeliveryTimes` can be - // at most 100. - AreaDeliveryTimes []*ProductDeliveryTimeAreaDeliveryTime `json:"areaDeliveryTimes,omitempty"` - // ProductId: Required. The `id` of the product. - ProductId *ProductId `json:"productId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AreaDeliveryTimes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AreaDeliveryTimes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTimeAreaDeliveryTime: A pairing of `DeliveryArea` associated -// with a `DeliveryTime` for this product. -type ProductDeliveryTimeAreaDeliveryTime struct { - // DeliveryArea: Required. The delivery area associated with `deliveryTime` for - // this product. - DeliveryArea *DeliveryArea `json:"deliveryArea,omitempty"` - // DeliveryTime: Required. The delivery time associated with `deliveryArea` for - // this product. - DeliveryTime *ProductDeliveryTimeAreaDeliveryTimeDeliveryTime `json:"deliveryTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliveryArea") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeliveryArea") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductDeliveryTimeAreaDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTimeAreaDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTimeAreaDeliveryTimeDeliveryTime: A delivery time for this -// product. -type ProductDeliveryTimeAreaDeliveryTimeDeliveryTime struct { - // MaxHandlingTimeDays: Required. The maximum number of business days - // (inclusive) between when an order is placed and when the product ships. If a - // product ships in the same day, set this value to 0. - MaxHandlingTimeDays int64 `json:"maxHandlingTimeDays,omitempty"` - // MaxTransitTimeDays: Required. The maximum number of business days - // (inclusive) between when the product ships and when the product is - // delivered. - MaxTransitTimeDays int64 `json:"maxTransitTimeDays,omitempty"` - // MinHandlingTimeDays: Required. The minimum number of business days - // (inclusive) between when an order is placed and when the product ships. If a - // product ships in the same day, set this value to 0. - MinHandlingTimeDays int64 `json:"minHandlingTimeDays,omitempty"` - // MinTransitTimeDays: Required. The minimum number of business days - // (inclusive) between when the product ships and when the product is - // delivered. - MinTransitTimeDays int64 `json:"minTransitTimeDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxHandlingTimeDays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxHandlingTimeDays") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductDeliveryTimeAreaDeliveryTimeDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTimeAreaDeliveryTimeDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductDimension struct { - // Unit: Required. The length units. Acceptable values are: - "in" - "cm" - Unit string `json:"unit,omitempty"` - // Value: Required. The length value represented as a number. The value can - // have a maximum precision of four decimal places. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductDimension) MarshalJSON() ([]byte, error) { - type NoMethod ProductDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductDimension) UnmarshalJSON(data []byte) error { - type NoMethod ProductDimension - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductId: The Content API ID of the product. -type ProductId struct { - // ProductId: The Content API ID of the product, in the form - // `channel:contentLanguage:targetCountry:offerId`. - ProductId string `json:"productId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProductId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProductId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductId) MarshalJSON() ([]byte, error) { - type NoMethod ProductId - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductIssue: An issue affecting specific product. -type ProductIssue struct { - // Actions: A list of actionable steps that can be executed to solve the issue. - // An example is requesting a re-review or providing arguments when merchant - // disagrees with the issue. Actions that are supported in (your) third-party - // application can be rendered as buttons and should be available to merchant - // when they expand the issue. - Actions []*Action `json:"actions,omitempty"` - // Impact: Clarifies the severity of the issue. The summarizing message, if - // present, should be shown right under the title for each issue. It helps - // merchants to quickly understand the impact of the issue. The detailed - // breakdown helps the merchant to fully understand the impact of the issue. It - // can be rendered as dialog that opens when the merchant mouse over the - // summarized impact statement. Issues with different severity can be styled - // differently. They may use a different color or icon to signal the difference - // between `ERROR`, `WARNING` and `INFO`. - Impact *ProductIssueImpact `json:"impact,omitempty"` - // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML - // elements contain CSS classes that can be used to customize the style of the - // content. Always sanitize the HTML before embedding it directly to your - // application. The sanitizer needs to allow basic HTML tags, such as: `div`, - // `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use - // DOMPurify (https://www.npmjs.com/package/dompurify). CSS classes: * - // `issue-detail` - top level container for the detail of the issue * - // `callout-banners` - section of the `issue-detail` with callout banners * - // `callout-banner` - single callout banner, inside `callout-banners` * - // `callout-banner-info` - callout with important information (default) * - // `callout-banner-warning` - callout with a warning * `callout-banner-error` - - // callout informing about an error (most severe) * `issue-content` - section - // of the `issue-detail`, contains multiple `content-element` * - // `content-element` - content element such as a list, link or paragraph, - // inside `issue-content` * `root-causes` - unordered list with items - // describing root causes of the issue, inside `issue-content` * - // `root-causes-intro` - intro text before the `root-causes` list, inside - // `issue-content` * `segment` - section of the text, `span` inside paragraph * - // `segment-attribute` - section of the text that represents a product - // attribute, for example 'image\_link' * `segment-literal` - section of the - // text that contains a special value, for example '0-1000 kg' * `segment-bold` - // - section of the text that should be rendered as bold * `segment-italic` - - // section of the text that should be rendered as italic * `tooltip` - used on - // paragraphs that should be rendered with a tooltip. A section of the text in - // such a paragraph will have a class `tooltip-text` and is intended to be - // shown in a mouse over dialog. If the style is not used, the `tooltip-text` - // section would be shown on a new line, after the main part of the text. * - // `tooltip-text` - marks a section of the text within a `tooltip`, that is - // intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a - // section of the text within a `tooltip`, that can be replaced with a tooltip - // icon, for example '?' or 'i'. By default, this section contains a `br` tag, - // that is separating the main text and the tooltip text when the style is not - // used. * `tooltip-style-question` - the tooltip shows helpful information, - // can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds - // additional information fitting to the context, can use the 'i' as an icon. * - // `content-moderation` - marks the paragraph that explains how the issue was - // identified. * `list-intro` - marks the paragraph that contains an intro for - // a list. This paragraph will be always followed by a list. * `new-element` - - // Present for new elements added to the pre-rendered content in the future. To - // make sure that a new content element does not break your style, you can hide - // everything with this class. - PrerenderedContent string `json:"prerenderedContent,omitempty"` - // Title: Title of the issue. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductIssueImpact: Overall impact of product issue. -type ProductIssueImpact struct { - // Breakdowns: Detailed impact breakdown. Explains the types of restriction the - // issue has in different shopping destinations and territory. If present, it - // should be rendered to the merchant. Can be shown as a mouse over dropdown or - // a dialog. Each breakdown item represents a group of regions with the same - // impact details. - Breakdowns []*Breakdown `json:"breakdowns,omitempty"` - // Message: Optional. Message summarizing the overall impact of the issue. If - // present, it should be rendered to the merchant. For example: "Limits - // visibility in France" - Message string `json:"message,omitempty"` - // Severity: The severity of the issue. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by the API. - // "ERROR" - Causes either an account suspension or an item disapproval. - // Errors should be resolved as soon as possible to ensure items are eligible - // to appear in results again. - // "WARNING" - Warnings can negatively impact the performance of ads and can - // lead to item or account suspensions in the future unless the issue is - // resolved. - // "INFO" - Infos are suggested optimizations to increase data quality. - // Resolving these issues is recommended, but not required. - Severity string `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Breakdowns") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Breakdowns") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductIssueImpact) MarshalJSON() ([]byte, error) { - type NoMethod ProductIssueImpact - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductProductDetail struct { - // AttributeName: The name of the product detail. - AttributeName string `json:"attributeName,omitempty"` - // AttributeValue: The value of the product detail. - AttributeValue string `json:"attributeValue,omitempty"` - // SectionName: The section header used to group a set of product details. - SectionName string `json:"sectionName,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductProductDetail) MarshalJSON() ([]byte, error) { - type NoMethod ProductProductDetail - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductShipping struct { - // Country: The CLDR territory code of the country to which an item will ship. - Country string `json:"country,omitempty"` - // LocationGroupName: The location where the shipping is applicable, - // represented by a location group name. - LocationGroupName string `json:"locationGroupName,omitempty"` - // LocationId: The numeric ID of a location that the shipping rate applies to - // as defined in the Google Ads API. - LocationId int64 `json:"locationId,omitempty,string"` - // MaxHandlingTime: Maximum handling time (inclusive) between when the order is - // received and shipped in business days. 0 means that the order is shipped on - // the same day as it's received if it happens before the cut-off time. Both - // maxHandlingTime and maxTransitTime are required if providing shipping - // speeds. - MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` - // MaxTransitTime: Maximum transit time (inclusive) between when the order has - // shipped and when it's delivered in business days. 0 means that the order is - // delivered on the same day as it ships. Both maxHandlingTime and - // maxTransitTime are required if providing shipping speeds. - MaxTransitTime int64 `json:"maxTransitTime,omitempty,string"` - // MinHandlingTime: Minimum handling time (inclusive) between when the order is - // received and shipped in business days. 0 means that the order is shipped on - // the same day as it's received if it happens before the cut-off time. - // minHandlingTime can only be present together with maxHandlingTime; but it's - // not required if maxHandlingTime is present. - MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` - // MinTransitTime: Minimum transit time (inclusive) between when the order has - // shipped and when it's delivered in business days. 0 means that the order is - // delivered on the same day as it ships. minTransitTime can only be present - // together with maxTransitTime; but it's not required if maxTransitTime is - // present. - MinTransitTime int64 `json:"minTransitTime,omitempty,string"` - // PostalCode: The postal code range that the shipping rate applies to, - // represented by a postal code, a postal code prefix followed by a * wildcard, - // a range between two postal codes or two postal code prefixes of equal - // length. - PostalCode string `json:"postalCode,omitempty"` - // Price: Fixed shipping price, represented as a number. - Price *Price `json:"price,omitempty"` - // Region: The geographic region to which a shipping rate applies. - Region string `json:"region,omitempty"` - // Service: A free-form description of the service class or delivery speed. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductShipping) MarshalJSON() ([]byte, error) { - type NoMethod ProductShipping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductShippingDimension struct { - // Unit: The unit of value. - Unit string `json:"unit,omitempty"` - // Value: The dimension of the product used to calculate the shipping cost of - // the item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductShippingDimension) MarshalJSON() ([]byte, error) { - type NoMethod ProductShippingDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { - type NoMethod ProductShippingDimension - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type ProductShippingWeight struct { - // Unit: The unit of value. - Unit string `json:"unit,omitempty"` - // Value: The weight of the product used to calculate the shipping cost of the - // item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductShippingWeight) MarshalJSON() ([]byte, error) { - type NoMethod ProductShippingWeight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { - type NoMethod ProductShippingWeight - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductStatus: The status of a product, that is, information about a product -// computed asynchronously. -type ProductStatus struct { - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // DestinationStatuses: The intended destinations for the product. - DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` - // GoogleExpirationDate: Date on which the item expires in Google Shopping, in - // ISO 8601 format. - GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` - // ItemLevelIssues: A list of all issues associated with the product. - ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productStatus" - Kind string `json:"kind,omitempty"` - // LastUpdateDate: Date on which the item has been last updated, in ISO 8601 - // format. - LastUpdateDate string `json:"lastUpdateDate,omitempty"` - // Link: The link to the product. - Link string `json:"link,omitempty"` - // ProductId: The ID of the product for which status is reported. - ProductId string `json:"productId,omitempty"` - // Title: The title of the product. - Title string `json:"title,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductStatus) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductStatusDestinationStatus struct { - // ApprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the - // offer is approved. - ApprovedCountries []string `json:"approvedCountries,omitempty"` - // Destination: The name of the destination - Destination string `json:"destination,omitempty"` - // DisapprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the - // offer is disapproved. - DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` - // PendingCountries: List of country codes (ISO 3166-1 alpha-2) where the offer - // is pending approval. - PendingCountries []string `json:"pendingCountries,omitempty"` - // Status: Deprecated. Destination approval status in `targetCountry` of the - // offer. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApprovedCountries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApprovedCountries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatusDestinationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductStatusItemLevelIssue struct { - // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue - // applies to the offer. - ApplicableCountries []string `json:"applicableCountries,omitempty"` - // AttributeName: The attribute's name, if the issue is caused by a single - // attribute. - AttributeName string `json:"attributeName,omitempty"` - // Code: The error code of the issue. - Code string `json:"code,omitempty"` - // Description: A short issue description in English. - Description string `json:"description,omitempty"` - // Destination: The destination the issue applies to. - Destination string `json:"destination,omitempty"` - // Detail: A detailed issue description in English. - Detail string `json:"detail,omitempty"` - // Documentation: The URL of a web page to help with resolving this issue. - Documentation string `json:"documentation,omitempty"` - // Resolution: Whether the issue can be resolved by the merchant. - Resolution string `json:"resolution,omitempty"` - // Servability: How this issue affects serving of the offer. - Servability string `json:"servability,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableCountries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicableCountries") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatusItemLevelIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductStructuredDescription: Structured description, for algorithmically -// (AI)-generated descriptions. See description -// (https://support.google.com/merchants/answer/6324468#When_to_use) for more -// information. -type ProductStructuredDescription struct { - // Content: Required. The description text. Maximum length is 5000 characters. - Content string `json:"content,omitempty"` - // DigitalSourceType: Optional. The digital source type. Acceptable values are: - // - "trained_algorithmic_media" - "default" - DigitalSourceType string `json:"digitalSourceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductStructuredDescription) MarshalJSON() ([]byte, error) { - type NoMethod ProductStructuredDescription - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductStructuredTitle: Structured title, for algorithmically (AI)-generated -// titles. See title -// (https://support.google.com/merchants/answer/6324415#Whentouse) for more -// information. -type ProductStructuredTitle struct { - // Content: Required. The title text. Maximum length is 150 characters. - Content string `json:"content,omitempty"` - // DigitalSourceType: Optional. The digital source type. Acceptable values are: - // - "trained_algorithmic_media" - "default" - DigitalSourceType string `json:"digitalSourceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductStructuredTitle) MarshalJSON() ([]byte, error) { - type NoMethod ProductStructuredTitle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductSubscriptionCost struct { - // Amount: The amount the buyer has to pay per subscription period. - Amount *Price `json:"amount,omitempty"` - // Period: The type of subscription period. - "month" - "year" - Period string `json:"period,omitempty"` - // PeriodLength: The number of subscription periods the buyer has to pay. - PeriodLength int64 `json:"periodLength,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductSubscriptionCost) MarshalJSON() ([]byte, error) { - type NoMethod ProductSubscriptionCost - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductTax struct { - // Country: The country within which the item is taxed, specified as a CLDR - // territory code. - Country string `json:"country,omitempty"` - // LocationId: The numeric ID of a location that the tax rate applies to as - // defined in the Google Ads API. - LocationId int64 `json:"locationId,omitempty,string"` - // PostalCode: The postal code range that the tax rate applies to, represented - // by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP - // codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, - // 94002-95460, 94*-95*. - PostalCode string `json:"postalCode,omitempty"` - // Rate: The percentage of tax rate that applies to the item price. - Rate float64 `json:"rate,omitempty"` - // Region: The geographic region to which the tax rate applies. - Region string `json:"region,omitempty"` - // TaxShip: Should be set to true if tax is charged on shipping. - TaxShip bool `json:"taxShip,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductTax) MarshalJSON() ([]byte, error) { - type NoMethod ProductTax - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductTax) UnmarshalJSON(data []byte) error { - type NoMethod ProductTax - var s1 struct { - Rate gensupport.JSONFloat64 `json:"rate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Rate = float64(s1.Rate) - return nil -} - -type ProductUnitPricingBaseMeasure struct { - // Unit: The unit of the denominator. - Unit string `json:"unit,omitempty"` - // Value: The denominator of the unit price. - Value int64 `json:"value,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { - type NoMethod ProductUnitPricingBaseMeasure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductUnitPricingMeasure struct { - // Unit: The unit of the measure. - Unit string `json:"unit,omitempty"` - // Value: The measure of an item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { - type NoMethod ProductUnitPricingMeasure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { - type NoMethod ProductUnitPricingMeasure - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductView: Product fields. Values are only set for fields requested -// explicitly in the request's search query. -type ProductView struct { - // AggregatedDestinationStatus: Aggregated destination status. - // - // Possible values: - // "AGGREGATED_STATUS_UNSPECIFIED" - Undefined aggregated status. - // "NOT_ELIGIBLE_OR_DISAPPROVED" - Offer isn't eligible, or is disapproved - // for all destinations. - // "PENDING" - Offer's status is pending in all destinations. - // "ELIGIBLE_LIMITED" - Offer is eligible for some (but not all) - // destinations. - // "ELIGIBLE" - Offer is eligible for all destinations. - AggregatedDestinationStatus string `json:"aggregatedDestinationStatus,omitempty"` - // Availability: Availability of the product. - Availability string `json:"availability,omitempty"` - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // CategoryL1: First level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Second level of the product category in Google's product - // taxonomy (https://support.google.com/merchants/answer/6324436). - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Third level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Fourth level of the product category in Google's product - // taxonomy (https://support.google.com/merchants/answer/6324436). - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Fifth level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL5 string `json:"categoryL5,omitempty"` - // Channel: Channel of the product (online versus local). - // - // Possible values: - // "CHANNEL_UNSPECIFIED" - Indicates that the channel is unspecified. - // "LOCAL" - Indicates that the channel is local. - // "ONLINE" - Indicates that the channel is online. - Channel string `json:"channel,omitempty"` - // ClickPotential: Estimated performance potential compared to highest - // performing products of the merchant. - // - // Possible values: - // "CLICK_POTENTIAL_UNSPECIFIED" - Unknown predicted clicks impact. - // "LOW" - Potential to receive a low number of clicks compared to the - // highest performing products of the merchant. - // "MEDIUM" - Potential to receive a moderate number of clicks compared to - // the highest performing products of the merchant. - // "HIGH" - Potential to receive a similar number of clicks as the highest - // performing products of the merchant. - ClickPotential string `json:"clickPotential,omitempty"` - // ClickPotentialRank: Rank of the product based on its click potential. A - // product with `click_potential_rank` 1 has the highest click potential among - // the merchant's products that fulfill the search query conditions. - ClickPotentialRank int64 `json:"clickPotentialRank,omitempty,string"` - // Condition: Condition of the product. - Condition string `json:"condition,omitempty"` - // CreationTime: The time the merchant created the product in timestamp - // seconds. - CreationTime string `json:"creationTime,omitempty"` - // CurrencyCode: Product price currency code (for example, ISO 4217). Absent if - // product price is not available. - CurrencyCode string `json:"currencyCode,omitempty"` - // ExpirationDate: Expiration date for the product. Specified on insertion. - ExpirationDate *Date `json:"expirationDate,omitempty"` - // Gtin: GTIN of the product. - Gtin []string `json:"gtin,omitempty"` - // Id: The REST ID of the product, in the form of - // channel:contentLanguage:targetCountry:offerId. Content API methods that - // operate on products take this as their productId parameter. Should always be - // included in the SELECT clause. - Id string `json:"id,omitempty"` - // ItemGroupId: Item group ID provided by the merchant for grouping variants - // together. - ItemGroupId string `json:"itemGroupId,omitempty"` - // ItemIssues: List of item issues for the product. - ItemIssues []*ProductViewItemIssue `json:"itemIssues,omitempty"` - // LanguageCode: Language code of the product in BCP 47 format. - LanguageCode string `json:"languageCode,omitempty"` - // OfferId: Merchant-provided id of the product. - OfferId string `json:"offerId,omitempty"` - // PriceMicros: Product price specified as micros (1 millionth of a standard - // unit, 1 USD = 1000000 micros) in the product currency. Absent in case the - // information about the price of the product is not available. - PriceMicros int64 `json:"priceMicros,omitempty,string"` - // ProductTypeL1: First level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL1 string `json:"productTypeL1,omitempty"` - // ProductTypeL2: Second level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL2 string `json:"productTypeL2,omitempty"` - // ProductTypeL3: Third level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL3 string `json:"productTypeL3,omitempty"` - // ProductTypeL4: Fourth level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL4 string `json:"productTypeL4,omitempty"` - // ProductTypeL5: Fifth level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL5 string `json:"productTypeL5,omitempty"` - // ShippingLabel: The normalized shipping label specified in the feed - ShippingLabel string `json:"shippingLabel,omitempty"` - // Title: Title of the product. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AggregatedDestinationStatus") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregatedDestinationStatus") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductView) MarshalJSON() ([]byte, error) { - type NoMethod ProductView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssue: Item issue associated with the product. -type ProductViewItemIssue struct { - // IssueType: Item issue type. - IssueType *ProductViewItemIssueItemIssueType `json:"issueType,omitempty"` - // Resolution: Item issue resolution. - // - // Possible values: - // "UNKNOWN" - Unknown resolution type. - // "MERCHANT_ACTION" - The merchant has to fix the issue. - // "PENDING_PROCESSING" - The issue will be resolved automatically (for - // example, image crawl), or Google review. No merchant action is required now. - // Resolution might lead to another issue (for example, if crawl fails). - Resolution string `json:"resolution,omitempty"` - // Severity: Item issue severity. - Severity *ProductViewItemIssueItemIssueSeverity `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "IssueType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IssueType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductViewItemIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueIssueSeverityPerDestination: Issue severity for all -// affected regions in a destination. -type ProductViewItemIssueIssueSeverityPerDestination struct { - // DemotedCountries: List of demoted countries in the destination. - DemotedCountries []string `json:"demotedCountries,omitempty"` - // Destination: Issue destination. - Destination string `json:"destination,omitempty"` - // DisapprovedCountries: List of disapproved countries in the destination. - DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` - // ForceSendFields is a list of field names (e.g. "DemotedCountries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DemotedCountries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductViewItemIssueIssueSeverityPerDestination) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueIssueSeverityPerDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueItemIssueSeverity: Severity of an issue per destination -// in a region, and aggregated severity. -type ProductViewItemIssueItemIssueSeverity struct { - // AggregatedSeverity: Severity of an issue aggregated for destination. - // - // Possible values: - // "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" - Undefined Issue severity. - // "DISAPPROVED" - Issue disapproves the product in at least one of the - // selected destinations. - // "DEMOTED" - Issue demotes the product in all selected destinations it - // affects. - // "PENDING" - Issue resolution is `PENDING_PROCESSING`. - AggregatedSeverity string `json:"aggregatedSeverity,omitempty"` - // SeverityPerDestination: Item issue severity for every destination. - SeverityPerDestination []*ProductViewItemIssueIssueSeverityPerDestination `json:"severityPerDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregatedSeverity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregatedSeverity") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductViewItemIssueItemIssueSeverity) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueItemIssueSeverity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueItemIssueType: Type of the item issue. -type ProductViewItemIssueItemIssueType struct { - // CanonicalAttribute: Canonical attribute name for attribute-specific issues. - CanonicalAttribute string `json:"canonicalAttribute,omitempty"` - // Code: Error code of the issue. - Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalAttribute") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalAttribute") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductViewItemIssueItemIssueType) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueItemIssueType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductWeight struct { - // Unit: Required. The weight unit. Acceptable values are: - "g" - "kg" - - // "oz" - "lb" - Unit string `json:"unit,omitempty"` - // Value: Required. The weight represented as a number. The weight can have a - // maximum precision of four decimal places. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductWeight) MarshalJSON() ([]byte, error) { - type NoMethod ProductWeight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductWeight) UnmarshalJSON(data []byte) error { - type NoMethod ProductWeight - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type ProductsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductsCustomBatchRequestEntry: A batch entry encoding a single non-batch -// products request. -type ProductsCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // FeedId: The Content API Supplemental Feed ID. If present then product - // insertion or deletion applies to a supplemental feed instead of primary - // Content API feed. - FeedId uint64 `json:"feedId,omitempty,string"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "delete" - - // "get" - "insert" - "update" - Method string `json:"method,omitempty"` - // Product: The product to insert or update. Only required if the method is - // `insert` or `update`. If the `update` method is used with `updateMask` only - // to delete a field, then this isn't required. For example, setting - // `salePrice` on the `updateMask` and not providing a `product` will result in - // an existing sale price on the product specified by `productId` being - // deleted. - Product *Product `json:"product,omitempty"` - // ProductId: The ID of the product to get or mutate. Only defined if the - // method is `get`, `delete`, or `update`. - ProductId string `json:"productId,omitempty"` - // UpdateMask: The comma-separated list of product attributes to be updated. - // Example: "title,salePrice". Attributes specified in the update mask - // without a value specified in the body will be deleted from the product. *You - // must specify the update mask to delete attributes.* Only top-level product - // attributes can be updated. If not defined, product attributes with set - // values will be updated and other attributes will stay unchanged. Only - // defined if the method is `update`. - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductsCustomBatchResponseEntry: A batch entry encoding a single non-batch -// products response. -type ProductsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // Product: The inserted product. Only defined if the method is `insert` and if - // the request was successful. - Product *Product `json:"product,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of products. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*Product `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a single -// non-batch productstatuses request. -type ProductstatusesCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // Destinations: If set, only issues for the specified destinations are - // returned, otherwise only issues for the Shopping destination. - Destinations []string `json:"destinations,omitempty"` - // IncludeAttributes: Deprecated: Setting this field has no effect and - // attributes are never included. - IncludeAttributes bool `json:"includeAttributes,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "get" - Method string `json:"method,omitempty"` - // ProductId: The ID of the product whose status to get. - ProductId string `json:"productId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a single -// non-batch productstatuses response. -type ProductstatusesCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ProductStatus: The requested product status. Only defined if the request was - // successful. - ProductStatus *ProductStatus `json:"productStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of products - // statuses. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ProductStatus `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProductstatusesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Promotion: Represents a promotion. See the following articles for more -// details. * Promotions feed specification -// (https://support.google.com/merchants/answer/2906014) * Local promotions -// feed specification (https://support.google.com/merchants/answer/10146130) * -// Promotions on Buy on Google product data specification -// (https://support.google.com/merchants/answer/9173673) -type Promotion struct { - // Brand: Product filter by brand for the promotion. - Brand []string `json:"brand,omitempty"` - // BrandExclusion: Product filter by brand exclusion for the promotion. - BrandExclusion []string `json:"brandExclusion,omitempty"` - // ContentLanguage: Required. The content language used as part of the unique - // identifier. `en` content language is available for all target countries. - // `fr` content language is available for `CA` and `FR` target countries. `de` - // content language is available for `DE` target country. `nl` content language - // is available for `NL` target country. `it` content language is available for - // `IT` target country. `pt` content language is available for `BR` target - // country. `ja` content language is available for `JP` target country. `ko` - // content language is available for `KR` target country. - ContentLanguage string `json:"contentLanguage,omitempty"` - // CouponValueType: Required. Coupon value type for the promotion. - // - // Possible values: - // "COUPON_VALUE_TYPE_UNSPECIFIED" - Indicates that the coupon value type is - // unspecified. - // "MONEY_OFF" - Money off coupon value type. - // "PERCENT_OFF" - Percent off coupon value type. - // "BUY_M_GET_N_MONEY_OFF" - Buy M quantity, get N money off coupon value - // type. `buy_this_quantity` and `get_this_quantity` must be present. - // `money_off_amount` must also be present. - // "BUY_M_GET_N_PERCENT_OFF" - Buy M quantity, get N percent off coupon value - // type. `buy_this_quantity` and `get_this_quantity` must be present. - // `percent_off_percentage` must also be present. - // "BUY_M_GET_MONEY_OFF" - Buy M quantity, get money off. `buy_this_quantity` - // and `money_off_amount` must be present. - // "BUY_M_GET_PERCENT_OFF" - Buy M quantity, get money off. - // `buy_this_quantity` and `percent_off_percentage` must be present. - // "FREE_GIFT" - Free gift with description only. - // "FREE_GIFT_WITH_VALUE" - Free gift with value (description is optional). - // "FREE_GIFT_WITH_ITEM_ID" - Free gift with item ID (description is - // optional). - // "FREE_SHIPPING_STANDARD" - Standard free shipping coupon value type. - // "FREE_SHIPPING_OVERNIGHT" - Overnight free shipping coupon value type. - // "FREE_SHIPPING_TWO_DAY" - Two day free shipping coupon value type. - CouponValueType string `json:"couponValueType,omitempty"` - // FreeGiftDescription: Free gift description for the promotion. - FreeGiftDescription string `json:"freeGiftDescription,omitempty"` - // FreeGiftItemId: Free gift item ID for the promotion. - FreeGiftItemId string `json:"freeGiftItemId,omitempty"` - // FreeGiftValue: Free gift value for the promotion. - FreeGiftValue *PriceAmount `json:"freeGiftValue,omitempty"` - // GenericRedemptionCode: Generic redemption code for the promotion. To be used - // with the `offerType` field. - GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` - // GetThisQuantityDiscounted: The number of items discounted in the promotion. - GetThisQuantityDiscounted int64 `json:"getThisQuantityDiscounted,omitempty"` - // Id: Output only. The REST promotion ID to uniquely identify the promotion. - // Content API methods that operate on promotions take this as their - // `promotionId` parameter. The REST ID for a promotion is of the form - // channel:contentLanguage:targetCountry:promotionId The `channel` field has a - // value of "online", "in_store", or "online_in_store". - Id string `json:"id,omitempty"` - // ItemGroupId: Product filter by item group ID for the promotion. - ItemGroupId []string `json:"itemGroupId,omitempty"` - // ItemGroupIdExclusion: Product filter by item group ID exclusion for the - // promotion. - ItemGroupIdExclusion []string `json:"itemGroupIdExclusion,omitempty"` - // ItemId: Product filter by item ID for the promotion. - ItemId []string `json:"itemId,omitempty"` - // ItemIdExclusion: Product filter by item ID exclusion for the promotion. - ItemIdExclusion []string `json:"itemIdExclusion,omitempty"` - // LimitQuantity: Maximum purchase quantity for the promotion. - LimitQuantity int64 `json:"limitQuantity,omitempty"` - // LimitValue: Maximum purchase value for the promotion. - LimitValue *PriceAmount `json:"limitValue,omitempty"` - // LongTitle: Required. Long title for the promotion. - LongTitle string `json:"longTitle,omitempty"` - // MinimumPurchaseAmount: Minimum purchase amount for the promotion. - MinimumPurchaseAmount *PriceAmount `json:"minimumPurchaseAmount,omitempty"` - // MinimumPurchaseQuantity: Minimum purchase quantity for the promotion. - MinimumPurchaseQuantity int64 `json:"minimumPurchaseQuantity,omitempty"` - // MoneyBudget: Cost cap for the promotion. - MoneyBudget *PriceAmount `json:"moneyBudget,omitempty"` - // MoneyOffAmount: The money off amount offered in the promotion. - MoneyOffAmount *PriceAmount `json:"moneyOffAmount,omitempty"` - // OfferType: Required. Type of the promotion. - // - // Possible values: - // "OFFER_TYPE_UNSPECIFIED" - Unknown offer type. - // "NO_CODE" - Offer type without a code. - // "GENERIC_CODE" - Offer type with a code. - OfferType string `json:"offerType,omitempty"` - // OrderLimit: Order limit for the promotion. - OrderLimit int64 `json:"orderLimit,omitempty"` - // PercentOff: The percentage discount offered in the promotion. - PercentOff int64 `json:"percentOff,omitempty"` - // ProductApplicability: Required. Applicability of the promotion to either all - // products or only specific products. - // - // Possible values: - // "PRODUCT_APPLICABILITY_UNSPECIFIED" - Which products the promotion applies - // to is unknown. - // "ALL_PRODUCTS" - Applicable to all products. - // "SPECIFIC_PRODUCTS" - Applicable to only a single product or list of - // products. - ProductApplicability string `json:"productApplicability,omitempty"` - // ProductType: Product filter by product type for the promotion. - ProductType []string `json:"productType,omitempty"` - // ProductTypeExclusion: Product filter by product type exclusion for the - // promotion. - ProductTypeExclusion []string `json:"productTypeExclusion,omitempty"` - // PromotionDestinationIds: Destination ID for the promotion. - PromotionDestinationIds []string `json:"promotionDestinationIds,omitempty"` - // PromotionDisplayDates: String representation of the promotion display dates. - // Deprecated. Use `promotion_display_time_period` instead. - PromotionDisplayDates string `json:"promotionDisplayDates,omitempty"` - // PromotionDisplayTimePeriod: `TimePeriod` representation of the promotion's - // display dates. - PromotionDisplayTimePeriod *TimePeriod `json:"promotionDisplayTimePeriod,omitempty"` - // PromotionEffectiveDates: String representation of the promotion effective - // dates. Deprecated. Use `promotion_effective_time_period` instead. - PromotionEffectiveDates string `json:"promotionEffectiveDates,omitempty"` - // PromotionEffectiveTimePeriod: Required. `TimePeriod` representation of the - // promotion's effective dates. - PromotionEffectiveTimePeriod *TimePeriod `json:"promotionEffectiveTimePeriod,omitempty"` - // PromotionId: Required. The user provided promotion ID to uniquely identify - // the promotion. - PromotionId string `json:"promotionId,omitempty"` - // PromotionStatus: Output only. The current status of the promotion. - PromotionStatus *PromotionPromotionStatus `json:"promotionStatus,omitempty"` - // PromotionUrl: URL to the page on the merchant's site where the promotion - // shows. Local Inventory ads promotions throw an error if no promo url is - // included. URL is used to confirm that the promotion is valid and can be - // redeemed. - PromotionUrl string `json:"promotionUrl,omitempty"` - // RedemptionChannel: Required. Redemption channel for the promotion. At least - // one channel is required. - // - // Possible values: - // "REDEMPTION_CHANNEL_UNSPECIFIED" - Indicates that the channel is - // unspecified. - // "IN_STORE" - Indicates that the channel is in store. - // "ONLINE" - Indicates that the channel is online. - RedemptionChannel []string `json:"redemptionChannel,omitempty"` - // ShippingServiceNames: Shipping service names for the promotion. - ShippingServiceNames []string `json:"shippingServiceNames,omitempty"` - // StoreApplicability: Whether the promotion applies to all stores, or only - // specified stores. Local Inventory ads promotions throw an error if no store - // applicability is included. An INVALID_ARGUMENT error is thrown if - // store_applicability is set to ALL_STORES and store_code or - // score_code_exclusion is set to a value. - // - // Possible values: - // "STORE_APPLICABILITY_UNSPECIFIED" - Which store codes the promotion - // applies to is unknown. - // "ALL_STORES" - Promotion applies to all stores. - // "SPECIFIC_STORES" - Promotion applies to only the specified stores. - StoreApplicability string `json:"storeApplicability,omitempty"` - // StoreCode: Store codes to include for the promotion. - StoreCode []string `json:"storeCode,omitempty"` - // StoreCodeExclusion: Store codes to exclude for the promotion. - StoreCodeExclusion []string `json:"storeCodeExclusion,omitempty"` - // TargetCountry: Required. The target country used as part of the unique - // identifier. Can be `AU`, `CA`, `DE`, `FR`, `GB`, `IN`, `US`, `BR`, `ES`, - // `NL`, `JP`, `IT` or `KR`. - TargetCountry string `json:"targetCountry,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Promotion) MarshalJSON() ([]byte, error) { - type NoMethod Promotion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatus: The status of the promotion. -type PromotionPromotionStatus struct { - // CreationDate: Date on which the promotion has been created in ISO 8601 - // (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for - // example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" - CreationDate string `json:"creationDate,omitempty"` - // DestinationStatuses: The intended destinations for the promotion. - DestinationStatuses []*PromotionPromotionStatusDestinationStatus `json:"destinationStatuses,omitempty"` - // LastUpdateDate: Date on which the promotion status has been last updated in - // ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and - // offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" - LastUpdateDate string `json:"lastUpdateDate,omitempty"` - // PromotionIssue: A list of issues associated with the promotion. - PromotionIssue []*PromotionPromotionStatusPromotionIssue `json:"promotionIssue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PromotionPromotionStatus) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatusDestinationStatus: The destination status of the -// promotion. -type PromotionPromotionStatusDestinationStatus struct { - // Destination: The name of the destination. - Destination string `json:"destination,omitempty"` - // Status: The status for the specified destination. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unknown promotion state. - // "IN_REVIEW" - The promotion is under review. - // "REJECTED" - The promotion is disapproved - // "LIVE" - The promotion is approved and active. - // "STOPPED" - The promotion is stopped by merchant. - // "EXPIRED" - The promotion is no longer active. - // "PENDING" - The promotion is not stopped, and all reviews are approved, - // but the active date is in the future. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destination") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PromotionPromotionStatusDestinationStatus) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatusDestinationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatusPromotionIssue: The issue associated with the -// promotion. -type PromotionPromotionStatusPromotionIssue struct { - // Code: Code of the issue. - Code string `json:"code,omitempty"` - // Detail: Explanation of the issue. - Detail string `json:"detail,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PromotionPromotionStatusPromotionIssue) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatusPromotionIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PubsubNotificationSettings: Settings for Pub/Sub notifications, all methods -// require that the caller is a direct user of the merchant center account. -type PubsubNotificationSettings struct { - // CloudTopicName: Cloud pub/sub topic to which notifications are sent - // (read-only). - CloudTopicName string `json:"cloudTopicName,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#pubsubNotificationSettings" - Kind string `json:"kind,omitempty"` - // RegisteredEvents: List of event types. Acceptable values are: - - // "orderPendingShipment" - RegisteredEvents []string `json:"registeredEvents,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudTopicName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudTopicName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PubsubNotificationSettings) MarshalJSON() ([]byte, error) { - type NoMethod PubsubNotificationSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RateGroup struct { - // ApplicableShippingLabels: A list of shipping labels defining the products to - // which this rate group applies to. This is a disjunction: only one of the - // labels has to match for the rate group to apply. May only be empty for the - // last rate group of a service. Required. - ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` - // CarrierRates: A list of carrier rates that can be referred to by `mainTable` - // or `singleValue`. - CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` - // MainTable: A table defining the rate group, when `singleValue` is not - // expressive enough. Can only be set if `singleValue` is not set. - MainTable *Table `json:"mainTable,omitempty"` - // Name: Name of the rate group. Optional. If set has to be unique within - // shipping service. - Name string `json:"name,omitempty"` - // SingleValue: The value of the rate group (for example, flat rate $10). Can - // only be set if `mainTable` and `subtables` are not set. - SingleValue *Value `json:"singleValue,omitempty"` - // Subtables: A list of subtables referred to by `mainTable`. Can only be set - // if `mainTable` is set. - Subtables []*Table `json:"subtables,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableShippingLabels") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicableShippingLabels") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RateGroup) MarshalJSON() ([]byte, error) { - type NoMethod RateGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Recommendation: Recommendations are suggested ways to improve your merchant -// account's performance. For example, to engage with a feature, or start using -// a new Google product. -type Recommendation struct { - // AdditionalCallToAction: Output only. CTAs of this recommendation. Repeated. - AdditionalCallToAction []*RecommendationCallToAction `json:"additionalCallToAction,omitempty"` - // AdditionalDescriptions: Output only. List of additional localized - // descriptions for a recommendation. Localication uses the `languageCode` - // field in `GenerateRecommendations` requests. Not all description types are - // guaranteed to be present and we recommend to rely on default description. - AdditionalDescriptions []*RecommendationDescription `json:"additionalDescriptions,omitempty"` - // Creative: Output only. Any creatives attached to the recommendation. - // Repeated. - Creative []*RecommendationCreative `json:"creative,omitempty"` - // DefaultCallToAction: Optional. Default CTA of the recommendation. - DefaultCallToAction *RecommendationCallToAction `json:"defaultCallToAction,omitempty"` - // DefaultDescription: Optional. Localized recommendation description. The - // localization the {@link `GenerateRecommendationsRequest.language_code`} - // field in {@link `GenerateRecommendationsRequest`} requests. - DefaultDescription string `json:"defaultDescription,omitempty"` - // NumericalImpact: Optional. A numerical score of the impact from the - // recommendation's description. For example, a recommendation might suggest an - // upward trend in sales for a certain product. Higher number means larger - // impact. - NumericalImpact int64 `json:"numericalImpact,omitempty"` - // Paid: Optional. Indicates whether a user needs to pay when they complete the - // user journey suggested by the recommendation. - Paid bool `json:"paid,omitempty"` - // RecommendationName: Optional. Localized recommendation name. The - // localization uses the {@link `GenerateRecommendationsRequest.language_code`} - // field in {@link `GenerateRecommendationsRequest`} requests. - RecommendationName string `json:"recommendationName,omitempty"` - // SubType: Optional. Subtype of the recommendations. Only applicable when - // multiple recommendations can be generated per type, and is used as an - // identifier of recommendation under the same recommendation type. - SubType string `json:"subType,omitempty"` - // Title: Optional. Localized Recommendation Title. Localization uses the - // {@link `GenerateRecommendationsRequest.language_code`} field in {@link - // `GenerateRecommendationsRequest`} requests. - Title string `json:"title,omitempty"` - // Type: Output only. Type of the recommendation. List of currently available - // recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - - // OPPORTUNITY_CREATE_EMAIL_CAMPAIGN - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalCallToAction") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalCallToAction") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Recommendation) MarshalJSON() ([]byte, error) { - type NoMethod Recommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationCallToAction: Call to action (CTA) that explains how a -// merchant can implement this recommendation -type RecommendationCallToAction struct { - // Intent: Output only. Intent of the action. This value describes the intent - // (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from - // recommendation to recommendation. This value can change over time for the - // same recommendation. Currently available intent values: - - // OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create - // a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: - // Opens a user journey where they can create a collection - // (https://support.google.com/merchants/answer/9703228) for their Merchant - // account. (No default URL) - Intent string `json:"intent,omitempty"` - // LocalizedText: Output only. Localized text of the CTA. Optional. - LocalizedText string `json:"localizedText,omitempty"` - // Uri: Optional. URL of the CTA. This field will only be set for some - // recommendations where there is a suggested landing URL. Otherwise it will be - // set to an empty string. We recommend developers to use their own custom - // landing page according to the description of the intent field above when - // this uri field is empty. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Intent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Intent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecommendationCallToAction) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationCallToAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationCreative: Creative is a multimedia attachment to -// recommendation that can be used on the frontend. -type RecommendationCreative struct { - // Type: Type of the creative. - // - // Possible values: - // "CREATIVE_TYPE_UNSPECIFIED" - Default value. If provided, shall be - // considered invalid. - // "VIDEO" - Video creatives. - // "PHOTO" - Photo creatives. - Type string `json:"type,omitempty"` - // Uri: URL of the creative. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecommendationCreative) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationCreative - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationDescription: Google-provided description for the -// recommendation. -type RecommendationDescription struct { - // Text: Output only. Text of the description. - Text string `json:"text,omitempty"` - // Type: Output only. Type of the description. - // - // Possible values: - // "DESCRIPTION_TYPE_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "SHORT" - Short description. - // "LONG" - Long description. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Text") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Text") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecommendationDescription) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationDescription - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RefundReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the refund reason. Acceptable values are: - - // "adjustment" - "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - ReasonCode string `json:"reasonCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RefundReason) MarshalJSON() ([]byte, error) { - type NoMethod RefundReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Region: Represents a geographic region that you can use as a target with -// both the `RegionalInventory` and `ShippingSettings` services. You can define -// regions as collections of either postal codes or, in some countries, using -// predefined geotargets. -type Region struct { - // DisplayName: The display name of the region. - DisplayName string `json:"displayName,omitempty"` - // GeotargetArea: A list of geotargets that defines the region area. - GeotargetArea *RegionGeoTargetArea `json:"geotargetArea,omitempty"` - // MerchantId: Output only. Immutable. Merchant that owns the region. - MerchantId int64 `json:"merchantId,omitempty,string"` - // PostalCodeArea: A list of postal codes that defines the region area. - PostalCodeArea *RegionPostalCodeArea `json:"postalCodeArea,omitempty"` - // RegionId: Output only. Immutable. The ID uniquely identifying each region. - RegionId string `json:"regionId,omitempty"` - // RegionalInventoryEligible: Output only. Indicates if the region is eligible - // to use in the Regional Inventory configuration. - RegionalInventoryEligible bool `json:"regionalInventoryEligible,omitempty"` - // ShippingEligible: Output only. Indicates if the region is eligible to use in - // the Shipping Services configuration. - ShippingEligible bool `json:"shippingEligible,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Region) MarshalJSON() ([]byte, error) { - type NoMethod Region - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionGeoTargetArea: A list of geotargets that defines the region area. -type RegionGeoTargetArea struct { - // GeotargetCriteriaIds: Required. A non-empty list of location IDs - // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). They - // must all be of the same location type (e.g., state). - GeotargetCriteriaIds googleapi.Int64s `json:"geotargetCriteriaIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeotargetCriteriaIds") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GeotargetCriteriaIds") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionGeoTargetArea) MarshalJSON() ([]byte, error) { - type NoMethod RegionGeoTargetArea - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionPostalCodeArea: A list of postal codes that defines the region area. -// Note: All regions defined using postal codes are accessible via the -// account's `ShippingSettings.postalCodeGroups` resource. -type RegionPostalCodeArea struct { - // PostalCodes: Required. A range of postal codes. - PostalCodes []*RegionPostalCodeAreaPostalCodeRange `json:"postalCodes,omitempty"` - // RegionCode: Required. CLDR territory code or the country the postal code - // group applies to. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PostalCodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionPostalCodeArea) MarshalJSON() ([]byte, error) { - type NoMethod RegionPostalCodeArea - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionPostalCodeAreaPostalCodeRange: A range of postal codes that defines -// the region area. -type RegionPostalCodeAreaPostalCodeRange struct { - // Begin: Required. A postal code or a pattern of the form prefix* denoting the - // inclusive lower bound of the range defining the area. Examples values: - // "94108", "9410*", "9*". - Begin string `json:"begin,omitempty"` - // End: Optional. A postal code or a pattern of the form prefix* denoting the - // inclusive upper bound of the range defining the area. It must have the same - // length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code - // then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin - // is a pattern then postalCodeRangeEnd must be a pattern with the same prefix - // length. Optional: if not set, then the area is defined as being all the - // postal codes matching postalCodeRangeBegin. - End string `json:"end,omitempty"` - // ForceSendFields is a list of field names (e.g. "Begin") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Begin") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionPostalCodeAreaPostalCodeRange) MarshalJSON() ([]byte, error) { - type NoMethod RegionPostalCodeAreaPostalCodeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalInventory: Regional inventory resource. contains the regional name -// and all attributes which are overridden for the specified region. -type RegionalInventory struct { - // Availability: The availability of the product. - Availability string `json:"availability,omitempty"` - // CustomAttributes: A list of custom (merchant-provided) attributes. It can - // also be used for submitting any attribute of the feed specification in its - // generic form. - CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalInventory". - Kind string `json:"kind,omitempty"` - // Price: The price of the product. - Price *Price `json:"price,omitempty"` - // RegionId: The ID uniquely identifying each region. - RegionId string `json:"regionId,omitempty"` - // SalePrice: The sale price of the product. Mandatory if - // `sale_price_effective_date` is defined. - SalePrice *Price `json:"salePrice,omitempty"` - // SalePriceEffectiveDate: A date range represented by a pair of ISO 8601 dates - // separated by a space, comma, or slash. Both dates might be specified as - // 'null' if undecided. - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Availability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Availability") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalInventory) MarshalJSON() ([]byte, error) { - type NoMethod RegionalInventory - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionalinventoryCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*RegionalinventoryCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalinventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalinventoryCustomBatchRequestEntry: A batch entry encoding a single -// non-batch regional inventory request. -type RegionalinventoryCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "insert" - Method string `json:"method,omitempty"` - // ProductId: The ID of the product for which to update price and availability. - ProductId string `json:"productId,omitempty"` - // RegionalInventory: Price and availability of the product. - RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalinventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionalinventoryCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*RegionalinventoryCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalinventoryCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalinventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalinventoryCustomBatchResponseEntry: A batch entry encoding a single -// non-batch regional inventory response. -type RegionalinventoryCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalinventoryCustomBatchResponseEntry". - Kind string `json:"kind,omitempty"` - // RegionalInventory: Price and availability of the product. - RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalinventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderAccountIssuesRequestPayload: The payload for configuring how the -// content should be rendered. -type RenderAccountIssuesRequestPayload struct { - // ContentOption: Optional. How the detailed content should be returned. - // Default option is to return the content as a pre-rendered HTML text. - // - // Possible values: - // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered - // HTML text. - ContentOption string `json:"contentOption,omitempty"` - // UserInputActionOption: Optional. How actions with user input form should be - // handled. If not provided, actions will be returned as links that points - // merchant to Merchant Center where they can request the action. - // - // Possible values: - // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will - // never be provided by the API. - // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are - // represented only as links that points merchant to Merchant Center where they - // can request the action. Provides easier to implement alternative to - // `BUILT_IN_USER_INPUT_ACTIONS`. - // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition - // for each complex action. Your application needs to display this content and - // input form to the merchant before they can request processing of the action. - // To start the action, your application needs to call the `triggeraction` - // method. - UserInputActionOption string `json:"userInputActionOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentOption") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentOption") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RenderAccountIssuesRequestPayload) MarshalJSON() ([]byte, error) { - type NoMethod RenderAccountIssuesRequestPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderAccountIssuesResponse: Response containing support content and actions -// for listed account issues. -type RenderAccountIssuesResponse struct { - // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains - // a link to a page where merchant can bring their appeal to an external body - // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). - // If the ADR is present, it MUST be available to the merchant on the page that - // shows the list with their account issues. - AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` - // Issues: List of account issues for a given account. This list can be shown - // with compressed, expandable items. In the compressed form, the title and - // impact should be shown for each issue. Once the issue is expanded, the - // detailed content and available actions should be rendered. - Issues []*AccountIssue `json:"issues,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AlternateDisputeResolution") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RenderAccountIssuesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RenderAccountIssuesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderProductIssuesRequestPayload: The payload for configuring how the -// content should be rendered. -type RenderProductIssuesRequestPayload struct { - // ContentOption: Optional. How the detailed content should be returned. - // Default option is to return the content as a pre-rendered HTML text. - // - // Possible values: - // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered - // HTML text. - ContentOption string `json:"contentOption,omitempty"` - // UserInputActionOption: Optional. How actions with user input form should be - // handled. If not provided, actions will be returned as links that points - // merchant to Merchant Center where they can request the action. - // - // Possible values: - // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will - // never be provided by the API. - // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are - // represented only as links that points merchant to Merchant Center where they - // can request the action. Provides easier to implement alternative to - // `BUILT_IN_USER_INPUT_ACTIONS`. - // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition - // for each complex action. Your application needs to display this content and - // input form to the merchant before they can request processing of the action. - // To start the action, your application needs to call the `triggeraction` - // method. - UserInputActionOption string `json:"userInputActionOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentOption") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentOption") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RenderProductIssuesRequestPayload) MarshalJSON() ([]byte, error) { - type NoMethod RenderProductIssuesRequestPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderProductIssuesResponse: Response containing support content and actions -// for listed product issues. -type RenderProductIssuesResponse struct { - // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains - // a link to a page where merchant can bring their appeal to an external body - // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). - // If present, the link should be shown on the same page as the list of issues. - AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` - // Issues: List of issues for a given product. This list can be shown with - // compressed, expandable items. In the compressed form, the title and impact - // should be shown for each issue. Once the issue is expanded, the detailed - // content and available actions should be rendered. - Issues []*ProductIssue `json:"issues,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AlternateDisputeResolution") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RenderProductIssuesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RenderProductIssuesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReportInteractionRequest: Request to report interactions on a -// recommendation. -type ReportInteractionRequest struct { - // InteractionType: Required. Type of the interaction that is reported, for - // example INTERACTION_CLICK. - // - // Possible values: - // "INTERACTION_TYPE_UNSPECIFIED" - Default value. If provided, the service - // will throw ApiError with description "Required parameter: interactionType". - // "INTERACTION_DISMISS" - When a recommendation is dismissed. - // "INTERACTION_CLICK" - When a recommendation is clicked. - InteractionType string `json:"interactionType,omitempty"` - // ResponseToken: Required. Token of the response when recommendation was - // returned. - ResponseToken string `json:"responseToken,omitempty"` - // Subtype: Optional. Subtype of the recommendations this interaction happened - // on. This field must be set only to the value that is returned by {@link - // `RecommendationsService.GenerateRecommendations`} call. - Subtype string `json:"subtype,omitempty"` - // Type: Required. Type of the recommendations on which this interaction - // happened. This field must be set only to the value that is returned by - // {@link `GenerateRecommendationsResponse`} call. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "InteractionType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InteractionType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReportInteractionRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReportInteractionRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReportRow: Result row returned from the search query. -type ReportRow struct { - // BestSellers: Best sellers fields requested by the merchant in the query. - // Field values are only set if the merchant queries - // `BestSellersProductClusterView` or `BestSellersBrandView`. - BestSellers *BestSellers `json:"bestSellers,omitempty"` - // Brand: Brand fields requested by the merchant in the query. Field values are - // only set if the merchant queries `BestSellersBrandView`. - Brand *Brand `json:"brand,omitempty"` - // CompetitiveVisibility: Competitive visibility fields requested by the - // merchant in the query. Field values are only set if the merchant queries - // `CompetitiveVisibilityTopMerchantView`, `CompetitiveVisibilityBenchmarkView` - // or `CompetitiveVisibilityCompetitorView`. - CompetitiveVisibility *CompetitiveVisibility `json:"competitiveVisibility,omitempty"` - // Metrics: Metrics requested by the merchant in the query. Metric values are - // only set for metrics requested explicitly in the query. - Metrics *Metrics `json:"metrics,omitempty"` - // PriceCompetitiveness: Price competitiveness fields requested by the merchant - // in the query. Field values are only set if the merchant queries - // `PriceCompetitivenessProductView`. - PriceCompetitiveness *PriceCompetitiveness `json:"priceCompetitiveness,omitempty"` - // PriceInsights: Price insights fields requested by the merchant in the query. - // Field values are only set if the merchant queries - // `PriceInsightsProductView`. - PriceInsights *PriceInsights `json:"priceInsights,omitempty"` - // ProductCluster: Product cluster fields requested by the merchant in the - // query. Field values are only set if the merchant queries - // `BestSellersProductClusterView`. - ProductCluster *ProductCluster `json:"productCluster,omitempty"` - // ProductView: Product fields requested by the merchant in the query. Field - // values are only set if the merchant queries `ProductView`. - ProductView *ProductView `json:"productView,omitempty"` - // Segments: Segmentation dimensions requested by the merchant in the query. - // Dimension values are only set for dimensions requested explicitly in the - // query. - Segments *Segments `json:"segments,omitempty"` - // TopicTrends: Topic trends - // (https://support.google.com/merchants/answer/13542370) fields requested by - // the merchant in the query. Field values are only set if the merchant queries - // `TopicTrendsView`. - TopicTrends *TopicTrends `json:"topicTrends,omitempty"` - // ForceSendFields is a list of field names (e.g. "BestSellers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BestSellers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReportRow) MarshalJSON() ([]byte, error) { - type NoMethod ReportRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestPhoneVerificationRequest: Request message for the -// RequestPhoneVerification method. -type RequestPhoneVerificationRequest struct { - // LanguageCode: Language code IETF BCP 47 syntax - // (https://tools.ietf.org/html/bcp47) (for example, en-US). Language code is - // used to provide localized `SMS` and `PHONE_CALL`. Default language used is - // en-US if not provided. - LanguageCode string `json:"languageCode,omitempty"` - // PhoneNumber: Phone number to be verified. - PhoneNumber string `json:"phoneNumber,omitempty"` - // PhoneRegionCode: Required. Two letter country code for the phone number, for - // example `CA` for Canadian numbers. See the ISO 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. - PhoneRegionCode string `json:"phoneRegionCode,omitempty"` - // PhoneVerificationMethod: Verification method to receive verification code. - // - // Possible values: - // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. - // "SMS" - Receive verification code by SMS. - // "PHONE_CALL" - Receive verification code by phone call. - PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` - // ForceSendFields is a list of field names (e.g. "LanguageCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LanguageCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestPhoneVerificationRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestPhoneVerificationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestPhoneVerificationResponse: Response message for the -// RequestPhoneVerification method. -type RequestPhoneVerificationResponse struct { - // VerificationId: The verification ID to use in subsequent calls to - // `verifyphonenumber`. - VerificationId string `json:"verificationId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VerificationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VerificationId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestPhoneVerificationResponse) MarshalJSON() ([]byte, error) { - type NoMethod RequestPhoneVerificationResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestReviewBuyOnGoogleProgramRequest: Request message for the -// RequestReviewProgram method. -type RequestReviewBuyOnGoogleProgramRequest struct { -} - -// RequestReviewFreeListingsRequest: Request message for the -// RequestReviewFreeListings Program method. -type RequestReviewFreeListingsRequest struct { - // RegionCode: The code ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which - // review is to be requested. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "RegionCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RegionCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestReviewFreeListingsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestReviewFreeListingsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestReviewShoppingAdsRequest: Request message for the -// RequestReviewShoppingAds program method. -type RequestReviewShoppingAdsRequest struct { - // RegionCode: The code ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which - // review is to be requested. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "RegionCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RegionCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestReviewShoppingAdsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestReviewShoppingAdsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnAddress: Return address resource. -type ReturnAddress struct { - // Address: Required. The address. - Address *ReturnAddressAddress `json:"address,omitempty"` - // Country: Required. The country of sale where the return address is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnAddress" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return address. For the - // default address, use the label "default". - Label string `json:"label,omitempty"` - // PhoneNumber: Required. The merchant's contact phone number regarding the - // return. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ReturnAddressId: Return address ID generated by Google. - ReturnAddressId string `json:"returnAddressId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnAddressAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient to address returns to. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. May be up to two lines, - // each line specified as an array element. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnAddressAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddressAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicy: Return policy resource. -type ReturnPolicy struct { - // Country: Required. The country of sale where the return policy is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnPolicy" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return policy. For the - // default policy, use the label "default". - Label string `json:"label,omitempty"` - // Name: Required. The name of the policy as shown in Merchant Center. - Name string `json:"name,omitempty"` - // NonFreeReturnReasons: Return reasons that will incur return fees. - NonFreeReturnReasons []string `json:"nonFreeReturnReasons,omitempty"` - // Policy: Required. The policy. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // ReturnPolicyId: Return policy ID generated by Google. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ReturnShippingFee: The return shipping fee that will apply to non free - // return reasons. - ReturnShippingFee *Price `json:"returnShippingFee,omitempty"` - // SeasonalOverrides: An optional list of seasonal overrides. - SeasonalOverrides []*ReturnPolicySeasonalOverride `json:"seasonalOverrides,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnline: Return policy online object. This is currently used to -// represent return policies for ads and free listings programs. -type ReturnPolicyOnline struct { - // Countries: The countries of sale where the return policy is applicable. The - // values must be a valid 2 letter ISO 3166 code, e.g. "US". - Countries []string `json:"countries,omitempty"` - // ItemConditions: The item conditions that are accepted for returns. This is - // required to not be empty unless the type of return policy is noReturns. - // - // Possible values: - // "ITEM_CONDITION_UNSPECIFIED" - Default value. This value is unused. - // "NEW" - New. - // "USED" - Used. - ItemConditions []string `json:"itemConditions,omitempty"` - // Label: The unique user-defined label of the return policy. The same label - // cannot be used in different return policies for the same country. Policies - // with the label 'default' will apply to all products, unless a product - // specifies a return_policy_label attribute. - Label string `json:"label,omitempty"` - // Name: The name of the policy as shown in Merchant Center. - Name string `json:"name,omitempty"` - // Policy: The return policy. - Policy *ReturnPolicyOnlinePolicy `json:"policy,omitempty"` - // RestockingFee: The restocking fee that applies to all return reason - // categories. This would be treated as a free restocking fee if the value is - // not set. - RestockingFee *ReturnPolicyOnlineRestockingFee `json:"restockingFee,omitempty"` - // ReturnMethods: The return methods of how customers can return an item. This - // value is required to not be empty unless the type of return policy is - // noReturns. - // - // Possible values: - // "RETURN_METHOD_UNSPECIFIED" - Default value. This value is unused. - // "BY_MAIL" - By mail. - // "IN_STORE" - In store. - // "AT_A_KIOSK" - At a kiosk. - ReturnMethods []string `json:"returnMethods,omitempty"` - // ReturnPolicyId: Output only. Return policy ID generated by Google. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ReturnPolicyUri: The return policy uri. This can used by Google to do a - // sanity check for the policy. - ReturnPolicyUri string `json:"returnPolicyUri,omitempty"` - // ReturnReasonCategoryInfo: The return reason category information. This - // required to not be empty unless the type of return policy is noReturns. - ReturnReasonCategoryInfo []*ReturnPolicyOnlineReturnReasonCategoryInfo `json:"returnReasonCategoryInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Countries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Countries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyOnline) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnline - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlinePolicy: The available policies. -type ReturnPolicyOnlinePolicy struct { - // Days: The number of days items can be returned after delivery, where one day - // is defined to be 24 hours after the delivery timestamp. Required for - // `numberOfDaysAfterDelivery` returns. - Days int64 `json:"days,omitempty,string"` - // Type: Policy type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Default value. This value is unused. - // "NUMBER_OF_DAYS_AFTER_DELIVERY" - Number of days after a return is - // delivered. - // "NO_RETURNS" - No returns. - // "LIFETIME_RETURNS" - Life time returns. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Days") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Days") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyOnlinePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlinePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineRestockingFee: The restocking fee. This can either be a -// fixed fee or a micro percent. -type ReturnPolicyOnlineRestockingFee struct { - // FixedFee: Fixed restocking fee. - FixedFee *PriceAmount `json:"fixedFee,omitempty"` - // MicroPercent: Percent of total price in micros. 15,000,000 means 15% of the - // total price would be charged. - MicroPercent int64 `json:"microPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedFee") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedFee") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyOnlineRestockingFee) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineRestockingFee - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineReturnReasonCategoryInfo: The return reason category info -// wrapper. -type ReturnPolicyOnlineReturnReasonCategoryInfo struct { - // ReturnLabelSource: The corresponding return label source. - // - // Possible values: - // "RETURN_LABEL_SOURCE_UNSPECIFIED" - Default value. This value is unused. - // "DOWNLOAD_AND_PRINT" - Download and print the label. - // "IN_THE_BOX" - Label in the box. - // "CUSTOMER_RESPONSIBILITY" - Customers' responsibility to get the label. - ReturnLabelSource string `json:"returnLabelSource,omitempty"` - // ReturnReasonCategory: The return reason category. - // - // Possible values: - // "RETURN_REASON_CATEGORY_UNSPECIFIED" - Default value. This value is - // unused. - // "BUYER_REMORSE" - Buyer remorse. - // "ITEM_DEFECT" - Item defect. - ReturnReasonCategory string `json:"returnReasonCategory,omitempty"` - // ReturnShippingFee: The corresponding return shipping fee. This is only - // applicable when returnLabelSource is not the customer's responsibility. - ReturnShippingFee *ReturnPolicyOnlineReturnShippingFee `json:"returnShippingFee,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReturnLabelSource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReturnLabelSource") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyOnlineReturnReasonCategoryInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineReturnReasonCategoryInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineReturnShippingFee: The return shipping fee. This can -// either be a fixed fee or a boolean to indicate that the customer pays the -// actual shipping cost. -type ReturnPolicyOnlineReturnShippingFee struct { - // FixedFee: Fixed return shipping fee amount. This value is only applicable - // when type is FIXED. We will treat the return shipping fee as free if type is - // FIXED and this value is not set. - FixedFee *PriceAmount `json:"fixedFee,omitempty"` - // Type: Type of return shipping fee. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Default value. This value is unused. - // "FIXED" - The return shipping fee is a fixed value. - // "CUSTOMER_PAYING_ACTUAL_FEE" - Customer will pay the actual return - // shipping fee. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedFee") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedFee") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyOnlineReturnShippingFee) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineReturnShippingFee - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPolicyPolicy struct { - // LastReturnDate: Required. Last day for returning the items. In ISO 8601 - // format. When specifying the return window like this, set the policy type to - // "lastReturnDate". Use this for seasonal overrides only. - LastReturnDate string `json:"lastReturnDate,omitempty"` - // NumberOfDays: The number of days items can be returned after delivery, where - // one day is defined to be 24 hours after the delivery timestamp. When - // specifying the return window like this, set the policy type to - // "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, - // 270 and 365 for the default policy. Additional policies further allow 14, - // 15, 21 and 28 days, but note that for most items a minimum of 30 days is - // required for returns. Exceptions may be made for electronics. A policy of - // less than 30 days can only be applied to those items. - NumberOfDays int64 `json:"numberOfDays,omitempty,string"` - // Type: Policy type. Use "lastReturnDate" for seasonal overrides only. Note - // that for most items a minimum of 30 days is required for returns. Exceptions - // may be made for electronics or non-returnable items such as food, - // perishables, and living things. A policy of less than 30 days can only be - // applied to those items. Acceptable values are: - "lastReturnDate" - - // "lifetimeReturns" - "noReturns" - "numberOfDaysAfterDelivery" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastReturnDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastReturnDate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPolicySeasonalOverride struct { - // EndDate: Required. Last day on which the override applies. In ISO 8601 - // format. - EndDate string `json:"endDate,omitempty"` - // Name: Required. The name of the seasonal override as shown in Merchant - // Center. - Name string `json:"name,omitempty"` - // Policy: Required. The policy which is in effect during that time. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // StartDate: Required. First day on which the override applies. In ISO 8601 - // format. - StartDate string `json:"startDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPolicySeasonalOverride) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicySeasonalOverride - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPricingInfo struct { - // ChargeReturnShippingFee: Default option for whether merchant should charge - // the customer for return shipping costs, based on customer selected return - // reason and merchant's return policy for the items being returned. - ChargeReturnShippingFee bool `json:"chargeReturnShippingFee,omitempty"` - // MaxReturnShippingFee: Maximum return shipping costs that may be charged to - // the customer depending on merchant's assessment of the return reason and the - // merchant's return policy for the items being returned. - MaxReturnShippingFee *MonetaryAmount `json:"maxReturnShippingFee,omitempty"` - // RefundableItemsTotalAmount: Total amount that can be refunded for the items - // in this return. It represents the total amount received by the merchant for - // the items, after applying merchant coupons. - RefundableItemsTotalAmount *MonetaryAmount `json:"refundableItemsTotalAmount,omitempty"` - // RefundableShippingAmount: Maximum amount that can be refunded for the - // original shipping fee. - RefundableShippingAmount *MonetaryAmount `json:"refundableShippingAmount,omitempty"` - // TotalRefundedAmount: Total amount already refunded by the merchant. It - // includes all types of refunds (items, shipping, etc.) Not provided if no - // refund has been applied yet. - TotalRefundedAmount *MonetaryAmount `json:"totalRefundedAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChargeReturnShippingFee") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChargeReturnShippingFee") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnPricingInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPricingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnShipment struct { - // CreationDate: The date of creation of the shipment, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // DeliveryDate: The date of delivery of the shipment, in ISO 8601 format. - DeliveryDate string `json:"deliveryDate,omitempty"` - // ReturnMethodType: Type of the return method. Acceptable values are: - - // "byMail" - "contactCustomerSupport" - "returnless" - "inStore" - ReturnMethodType string `json:"returnMethodType,omitempty"` - // ShipmentId: Shipment ID generated by Google. - ShipmentId string `json:"shipmentId,omitempty"` - // ShipmentTrackingInfos: Tracking information of the shipment. One return - // shipment might be handled by several shipping carriers sequentially. - ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` - // ShippingDate: The date of shipping of the shipment, in ISO 8601 format. - ShippingDate string `json:"shippingDate,omitempty"` - // State: State of the shipment. Acceptable values are: - "completed" - - // "new" - "shipped" - "undeliverable" - "pending" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnShipment) MarshalJSON() ([]byte, error) { - type NoMethod ReturnShipment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnShippingLabel: Return shipping label for a Buy on Google -// merchant-managed return. -type ReturnShippingLabel struct { - // Carrier: Name of the carrier. - Carrier string `json:"carrier,omitempty"` - // LabelUri: The URL for the return shipping label in PDF format - LabelUri string `json:"labelUri,omitempty"` - // TrackingId: The tracking id of this return label. - TrackingId string `json:"trackingId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnShippingLabel) MarshalJSON() ([]byte, error) { - type NoMethod ReturnShippingLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ReturnaddressCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnaddressCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" - Method string `json:"method,omitempty"` - // ReturnAddress: The return address to submit. This should be set only if the - // method is `insert`. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ReturnAddressId: The return address ID. This should be set only if the - // method is `delete` or `get`. - ReturnAddressId string `json:"returnAddressId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnaddressCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ReturnaddressCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnaddressCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ReturnAddress: The retrieved return address. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnaddressCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of addresses. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ReturnAddress `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnaddressListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ReturnpolicyCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnpolicyCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" - Method string `json:"method,omitempty"` - // ReturnPolicy: The return policy to submit. This should be set only if the - // method is `insert`. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` - // ReturnPolicyId: The return policy ID. This should be set only if the method - // is `delete` or `get`. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnpolicyCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ReturnpolicyCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnpolicyCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ReturnPolicy: The retrieved return policy. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnpolicyCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyListResponse". - Kind string `json:"kind,omitempty"` - Resources []*ReturnPolicy `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReturnpolicyListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Row struct { - // Cells: The list of cells that constitute the row. Must have the same length - // as `columnHeaders` for two-dimensional tables, a length of 1 for - // one-dimensional tables. Required. - Cells []*Value `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Row) MarshalJSON() ([]byte, error) { - type NoMethod Row - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SearchRequest: Request message for the ReportService.Search method. -type SearchRequest struct { - // PageSize: Number of ReportRows to retrieve in a single page. Defaults to - // 1000. Values above 5000 are coerced to 5000. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: Token of the page to retrieve. If not specified, the first page - // of results is returned. In order to request the next page of results, the - // value obtained from `next_page_token` in the previous response should be - // used. - PageToken string `json:"pageToken,omitempty"` - // Query: Required. Query that defines performance metrics to retrieve and - // dimensions according to which the metrics are to be segmented. For details - // on how to construct your query, see the Query Language guide - // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). - Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSize") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSize") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod SearchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SearchResponse: Response message for the ReportService.Search method. -type SearchResponse struct { - // NextPageToken: Token which can be sent as `page_token` to retrieve the next - // page. If omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Results: Rows that matched the search query. - Results []*ReportRow `json:"results,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod SearchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Segments: Dimensions according to which metrics are segmented in the -// response. Values of product dimensions, such as `offer_id`, reflect the -// state of a product at the time of the corresponding event, for example, -// impression or order. Segment fields cannot be selected in queries without -// also selecting at least one metric field. Values are only set for dimensions -// requested explicitly in the request's search query. -type Segments struct { - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // CategoryL1: Product category (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Product category (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Product category (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Product category (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Product category (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL5 string `json:"categoryL5,omitempty"` - // CurrencyCode: Currency in which price metrics are represented, for example, - // if you select `ordered_item_sales_micros`, the returned value will be - // represented by this currency. - CurrencyCode string `json:"currencyCode,omitempty"` - // CustomLabel0: Custom label 0 for custom grouping of products. - CustomLabel0 string `json:"customLabel0,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of products. - CustomLabel1 string `json:"customLabel1,omitempty"` - // CustomLabel2: Custom label 2 for custom grouping of products. - CustomLabel2 string `json:"customLabel2,omitempty"` - // CustomLabel3: Custom label 3 for custom grouping of products. - CustomLabel3 string `json:"customLabel3,omitempty"` - // CustomLabel4: Custom label 4 for custom grouping of products. - CustomLabel4 string `json:"customLabel4,omitempty"` - // CustomerCountryCode: Code of the country where the customer is located at - // the time of the event. Represented in the ISO 3166 format. If the customer - // country cannot be determined, a special 'ZZ' code is returned. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date in the merchant timezone to which metrics apply. - Date *Date `json:"date,omitempty"` - // OfferId: Merchant-provided id of the product. - OfferId string `json:"offerId,omitempty"` - // ProductTypeL1: Product type (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL1 string `json:"productTypeL1,omitempty"` - // ProductTypeL2: Product type (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL2 string `json:"productTypeL2,omitempty"` - // ProductTypeL3: Product type (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL3 string `json:"productTypeL3,omitempty"` - // ProductTypeL4: Product type (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL4 string `json:"productTypeL4,omitempty"` - // ProductTypeL5: Product type (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL5 string `json:"productTypeL5,omitempty"` - // Program: Program to which metrics apply, for example, Free Product Listing. - // - // Possible values: - // "PROGRAM_UNSPECIFIED" - Not specified. - // "SHOPPING_ADS" - Shopping Ads. - // "FREE_PRODUCT_LISTING" - Free Product Listing. - // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. - // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. - // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 - // starting from May 2024. Buy on Google Listing. - Program string `json:"program,omitempty"` - // Title: Title of the product. - Title string `json:"title,omitempty"` - // Week: First day of the week (Monday) of the metrics date in the merchant - // timezone. - Week *Date `json:"week,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Segments) MarshalJSON() ([]byte, error) { - type NoMethod Segments - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Service struct { - // Active: A boolean exposing the active status of the shipping service. - // Required. - Active bool `json:"active,omitempty"` - // Currency: The CLDR code of the currency to which this service applies. Must - // match that of the prices in rate groups. - Currency string `json:"currency,omitempty"` - // DeliveryCountry: The CLDR territory code of the country to which the service - // applies. Required. - DeliveryCountry string `json:"deliveryCountry,omitempty"` - // DeliveryTime: Time spent in various aspects from order to the delivery of - // the product. Required. - DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` - // Eligibility: Eligibility for this service. Acceptable values are: - "All - // scenarios" - "All scenarios except Shopping Actions" - "Shopping - // Actions" - Eligibility string `json:"eligibility,omitempty"` - // MinimumOrderValue: Minimum order value for this service. If set, indicates - // that customers will have to spend at least this amount. All prices within a - // service must have the same currency. Cannot be set together with - // minimum_order_value_table. - MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` - // MinimumOrderValueTable: Table of per store minimum order values for the - // pickup fulfillment type. Cannot be set together with minimum_order_value. - MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` - // Name: Free-form name of the service. Must be unique within target account. - // Required. - Name string `json:"name,omitempty"` - // PickupService: The carrier-service pair delivering items to collection - // points. The list of supported pickup services can be retrieved through the - // `getSupportedPickupServices` method. Required if and only if the service - // delivery type is `pickup`. - PickupService *PickupCarrierService `json:"pickupService,omitempty"` - // RateGroups: Shipping rate group definitions. Only the last one is allowed to - // have an empty `applicableShippingLabels`, which means "everything else". The - // other `applicableShippingLabels` must not overlap. - RateGroups []*RateGroup `json:"rateGroups,omitempty"` - // ShipmentType: Type of locations this service ships orders to. Acceptable - // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - - // "collection_point" - ShipmentType string `json:"shipmentType,omitempty"` - // StoreConfig: A list of stores your products are delivered from. This is only - // available for the local delivery shipment type. - StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Active") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Active") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Service) MarshalJSON() ([]byte, error) { - type NoMethod Service - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfig: Stores that provide local delivery. Only valid with -// local delivery fulfillment. -type ServiceStoreConfig struct { - // CutoffConfig: Time local delivery ends for the day. This can be either - // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an - // error is thrown. - CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` - // ServiceRadius: Maximum delivery radius. Only needed for local delivery - // fulfillment type. - ServiceRadius *Distance `json:"serviceRadius,omitempty"` - // StoreCodes: A list of store codes that provide local delivery. If empty, - // then `store_service_type` must be `all_stores`, or an error is thrown. If - // not empty, then `store_service_type` must be `selected_stores`, or an error - // is thrown. - StoreCodes []string `json:"storeCodes,omitempty"` - // StoreServiceType: Indicates whether all stores listed by this merchant - // provide local delivery or not. Acceptable values are `all stores` and - // `selected stores` - StoreServiceType string `json:"storeServiceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CutoffConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CutoffConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceStoreConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based -// on the local timezone of the store. `local_cutoff_time` and -// `store_close_offset_hours` are mutually exclusive. -type ServiceStoreConfigCutoffConfig struct { - // LocalCutoffTime: Time in hours and minutes in the local timezone when local - // delivery ends. - LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` - // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local - // delivery when they have a shipping service configured to n day local - // delivery. For example, if the shipping service defines same-day delivery, - // and it's past the cut-off, setting this field to `true` results in the - // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - // same example, setting this field to `false` results in the calculated - // shipping time being one day. This is only for local delivery. - NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` - // StoreCloseOffsetHours: Represents cutoff time as the number of hours before - // store closing. Mutually exclusive with other fields (hour and minute). - StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalCutoffTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in -// the local timezone when local delivery ends. -type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { - // Hour: Hour local delivery orders must be placed by to process the same day. - Hour int64 `json:"hour,omitempty,string"` - // Minute: Minute local delivery orders must be placed by to process the same - // day. - Minute int64 `json:"minute,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hour") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SettlementReport: Settlement reports detail order-level and item-level -// credits and debits between you and Google. -type SettlementReport struct { - // EndDate: The end date on which all transactions are included in the report, - // in ISO 8601 format. - EndDate string `json:"endDate,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementReport" - Kind string `json:"kind,omitempty"` - // PreviousBalance: The residual amount from the previous invoice. This is set - // only if the previous invoices are not paid because of negative balance. - PreviousBalance *Price `json:"previousBalance,omitempty"` - // SettlementId: The ID of the settlement report. - SettlementId string `json:"settlementId,omitempty"` - // StartDate: The start date on which all transactions are included in the - // report, in ISO 8601 format. - StartDate string `json:"startDate,omitempty"` - // TransferAmount: The money due to the merchant. - TransferAmount *Price `json:"transferAmount,omitempty"` - // TransferDate: Date on which transfer for this payment was initiated by - // Google, in ISO 8601 format. - TransferDate string `json:"transferDate,omitempty"` - // TransferIds: The list of bank identifiers used for the transfer. For - // example, Trace ID for Federal Automated Clearing House (ACH). This may also - // be known as the Wire ID. - TransferIds []string `json:"transferIds,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementReport) MarshalJSON() ([]byte, error) { - type NoMethod SettlementReport - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SettlementTransaction: Settlement transactions give a detailed breakdown of -// the settlement report. -type SettlementTransaction struct { - // Amount: The amount for the transaction. - Amount *SettlementTransactionAmount `json:"amount,omitempty"` - // Identifiers: Identifiers of the transaction. - Identifiers *SettlementTransactionIdentifiers `json:"identifiers,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementTransaction" - Kind string `json:"kind,omitempty"` - // Transaction: Details of the transaction. - Transaction *SettlementTransactionTransaction `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementTransaction) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransaction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionAmount struct { - Commission *SettlementTransactionAmountCommission `json:"commission,omitempty"` - // Description: The description of the event. Acceptable values are: - - // "taxWithhold" - "principal" - "principalAdjustment" - "shippingFee" - // - "merchantRemittedSalesTax" - "googleRemittedSalesTax" - - // "merchantCoupon" - "merchantCouponTax" - "merchantRemittedDisposalTax" - // - "googleRemittedDisposalTax" - "merchantRemittedRedemptionFee" - - // "googleRemittedRedemptionFee" - "eeeEcoFee" - "furnitureEcoFee" - - // "copyPrivateFee" - "eeeEcoFeeCommission" - "furnitureEcoFeeCommission" - // - "copyPrivateFeeCommission" - "principalRefund" - - // "principalRefundTax" - "itemCommission" - "adjustmentCommission" - - // "shippingFeeCommission" - "commissionRefund" - "damaged" - - // "damagedOrDefectiveItem" - "expiredItem" - "faultyItem" - - // "incorrectItemReceived" - "itemMissing" - "qualityNotExpected" - - // "receivedTooLate" - "storePackageMissing" - "transitPackageMissing" - - // "unsuccessfulDeliveryUndeliverable" - "wrongChargeInStore" - - // "wrongItem" - "returns" - "undeliverable" - - // "issueRelatedRefundAndReplacementAmountDescription" - - // "refundFromMerchant" - "returnLabelShippingFee" - "lumpSumCorrection" - // - "pspFee" - "principalRefundDoesNotFit" - - // "principalRefundOrderedWrongItem" - "principalRefundQualityNotExpected" - // - "principalRefundBetterPriceFound" - "principalRefundNoLongerNeeded" - - // "principalRefundChangedMind" - "principalRefundReceivedTooLate" - - // "principalRefundIncorrectItemReceived" - - // "principalRefundDamagedOrDefectiveItem" - - // "principalRefundDidNotMatchDescription" - "principalRefundExpiredItem" - Description string `json:"description,omitempty"` - // TransactionAmount: The amount that contributes to the line item price. - TransactionAmount *Price `json:"transactionAmount,omitempty"` - // Type: The type of the amount. Acceptable values are: - "itemPrice" - - // "orderPrice" - "refund" - "earlyRefund" - "courtesyRefund" - - // "returnRefund" - "returnLabelShippingFeeAmount" - - // "lumpSumCorrectionAmount" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Commission") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Commission") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementTransactionAmount) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionAmountCommission struct { - // Category: The category of the commission. Acceptable values are: - - // "animalsAndPetSupplies" - "dogCatFoodAndCatLitter" - - // "apparelAndAccessories" - "shoesHandbagsAndSunglasses" - - // "costumesAndAccessories" - "jewelry" - "watches" - - // "hobbiesArtsAndCrafts" - "homeAndGarden" - "entertainmentCollectibles" - // - "collectibleCoins" - "sportsCollectibles" - "sportingGoods" - - // "toysAndGames" - "musicalInstruments" - "giftCards" - - // "babyAndToddler" - "babyFoodWipesAndDiapers" - "businessAndIndustrial" - // - "camerasOpticsAndPhotography" - "consumerElectronics" - - // "electronicsAccessories" - "personalComputers" - "videoGameConsoles" - - // "foodAndGrocery" - "beverages" - "tobaccoProducts" - "furniture" - - // "hardware" - "buildingMaterials" - "tools" - "healthAndPersonalCare" - // - "beauty" - "householdSupplies" - "kitchenAndDining" - - // "majorAppliances" - "luggageAndBags" - "media" - "officeSupplies" - - // "softwareAndVideoGames" - "vehiclePartsAndAccessories" - - // "vehicleTiresAndWheels" - "vehicles" - "everythingElse" - Category string `json:"category,omitempty"` - // Rate: Rate of the commission in percentage. - Rate string `json:"rate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Category") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Category") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementTransactionAmountCommission) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionAmountCommission - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionIdentifiers struct { - // AdjustmentId: The identifier of the adjustments, if it's available. - AdjustmentId string `json:"adjustmentId,omitempty"` - // MerchantOrderId: The merchant provided order ID. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderItemId: The identifier of the item. - OrderItemId string `json:"orderItemId,omitempty"` - // SettlementEntryId: The unique ID of the settlement transaction entry. - SettlementEntryId string `json:"settlementEntryId,omitempty"` - // ShipmentIds: The shipment ids for the item. - ShipmentIds []string `json:"shipmentIds,omitempty"` - // TransactionId: The Google transaction ID. - TransactionId string `json:"transactionId,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdjustmentId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdjustmentId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementTransactionIdentifiers) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionIdentifiers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionTransaction struct { - // PostDate: The time on which the event occurred in ISO 8601 format. - PostDate string `json:"postDate,omitempty"` - // Type: The type of the transaction that occurred. Acceptable values are: - - // "order" - "reversal" - "orderRefund" - "reversalRefund" - - // "issueRelatedRefundAndReplacement" - "returnLabelShippingFeeTransaction" - // - "reversalIssueRelatedRefundAndReplacement" - - // "reversalReturnLabelShippingFeeTransaction" - - // "lumpSumCorrectionTransaction" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PostDate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementTransactionTransaction) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionTransaction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementreportsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementreportsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*SettlementReport `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementreportsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SettlementreportsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementtransactionsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementtransactionsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*SettlementTransaction `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SettlementtransactionsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SettlementtransactionsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentInvoice struct { - // InvoiceSummary: [required] Invoice summary. - InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` - // LineItemInvoices: [required] Invoice details per line item. - LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` - // ShipmentGroupId: [required] ID of the shipment group. It is assigned by the - // merchant in the `shipLineItems` method and is used to group multiple line - // items that have the same kind of shipping charges. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InvoiceSummary") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShipmentInvoice) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentInvoiceLineItemInvoice struct { - // LineItemId: ID of the line item. Either lineItemId or productId must be set. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: ID of the product. This is the REST ID used in the products - // service. Either lineItemId or productId must be set. - ProductId string `json:"productId,omitempty"` - // ShipmentUnitIds: [required] The shipment unit ID is assigned by the merchant - // and defines individual quantities within a line item. The same ID can be - // assigned to units that are the same while units that differ must be assigned - // a different ID (for example: free or promotional units). - ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` - // UnitInvoice: [required] Invoice details for a single unit. - UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LineItemId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentInvoiceLineItemInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentTrackingInfo struct { - // Carrier: The shipping carrier that handles the package. Acceptable values - // are: - "boxtal" - "bpost" - "chronopost" - "colisPrive" - - // "colissimo" - "cxt" - "deliv" - "dhl" - "dpd" - "dynamex" - - // "eCourier" - "easypost" - "efw" - "fedex" - "fedexSmartpost" - - // "geodis" - "gls" - "googleCourier" - "gsx" - "jdLogistics" - - // "laPoste" - "lasership" - "manual" - "mpx" - "onTrac" - "other" - // - "tnt" - "uds" - "ups" - "usps" - Carrier string `json:"carrier,omitempty"` - // TrackingNumber: The tracking number for the package. - TrackingNumber string `json:"trackingNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentTrackingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingSettings: The merchant account's shipping settings. All methods -// except getsupportedcarriers and getsupportedholidays require the admin role. -type ShippingSettings struct { - // AccountId: The ID of the account to which these account shipping settings - // belong. Ignored upon update, always present in get request responses. - AccountId uint64 `json:"accountId,omitempty,string"` - // PostalCodeGroups: A list of postal code groups that can be referred to in - // `services`. Optional. - PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` - // Services: The target account's list of services. Optional. - Services []*Service `json:"services,omitempty"` - // Warehouses: Optional. A list of warehouses which can be referred to in - // `services`. - Warehouses []*Warehouse `json:"warehouses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShippingSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single -// non-batch shippingsettings request. -type ShippingsettingsCustomBatchRequestEntry struct { - // AccountId: The ID of the account for which to get/update account shipping - // settings. - AccountId uint64 `json:"accountId,omitempty,string"` - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "get" - - // "update" - Method string `json:"method,omitempty"` - // ShippingSettings: The account shipping settings to update. Only defined if - // the method is `update`. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single -// non-batch shipping settings response. -type ShippingsettingsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ShippingSettings: The retrieved or updated account shipping settings. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedCarriersResponse struct { - // Carriers: A list of supported carriers. May be empty. - Carriers []*CarriersCarrier `json:"carriers,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedCarriersResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Carriers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carriers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedCarriersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedHolidaysResponse struct { - // Holidays: A list of holidays applicable for delivery guarantees. May be - // empty. - Holidays []*HolidaysHoliday `json:"holidays,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedHolidaysResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Holidays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Holidays") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedHolidaysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedPickupServicesResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedPickupServicesResponse". - Kind string `json:"kind,omitempty"` - // PickupServices: A list of supported pickup services. May be empty. - PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedPickupServicesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of shipping - // settings. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ShippingSettings `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. -type ShoppingAdsProgramStatus struct { - // GlobalState: State of the program. `ENABLED` if there are offers for at - // least one region. - // - // Possible values: - // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. - // "NOT_ENABLED" - Program is not enabled for any country. - // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. - // Upload products to Merchant Center. - // "ENABLED" - Program is enabled and offers are uploaded for at least one - // country. - GlobalState string `json:"globalState,omitempty"` - // RegionStatuses: Status of the program in each region. Regions with the same - // status and review eligibility are grouped together in `regionCodes`. - RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GlobalState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GlobalState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatusRegionStatus: Status of program and region. -type ShoppingAdsProgramStatusRegionStatus struct { - // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to - // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO - // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. - DisapprovalDate string `json:"disapprovalDate,omitempty"` - // EligibilityStatus: Eligibility status of the Shopping Ads program. - // - // Possible values: - // "STATE_UNSPECIFIED" - State is not known. - // "APPROVED" - If the account has no issues and review is completed - // successfully. - // "DISAPPROVED" - There are one or more issues that needs to be resolved for - // account to be active for the program. Detailed list of account issues are - // available in - // [accountstatuses](https://developers.google.com/shopping-content/reference/re - // st/v2.1/accountstatuses) API. - // "WARNING" - If account has issues but offers are servable. Some of the - // issue can make account DISAPPROVED after a certain deadline. - // "UNDER_REVIEW" - Account is under review. - // "PENDING_REVIEW" - Account is waiting for review to start. - // "ONBOARDING" - Program is currently onboarding. Upload valid offers to - // complete onboarding. - EligibilityStatus string `json:"eligibilityStatus,omitempty"` - // OnboardingIssues: Issues that must be fixed to be eligible for review. - OnboardingIssues []string `json:"onboardingIssues,omitempty"` - // RegionCodes: The two-letter ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions - // with the same `eligibilityStatus` and `reviewEligibility`. - RegionCodes []string `json:"regionCodes,omitempty"` - // ReviewEligibilityStatus: If a program is eligible for review in a specific - // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. - // - // Possible values: - // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. - // "ELIGIBLE" - Account is eligible for review for a specified region code. - // "INELIGIBLE" - Account is not eligible for review for a specified region - // code. - ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` - // ReviewIneligibilityReason: Review ineligibility reason if account is not - // eligible for review. - // - // Possible values: - // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from - // Google is not possible. - // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. - // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. - // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period - // ends. - // "ALREADY_UNDER_REVIEW" - Account is already under review. - // "NO_REVIEW_REQUIRED" - No issues available to review. - // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed - // at the end of the grace period. - // "IS_RETIRED" - Account is retired. Should not appear in MC. - // "ALREADY_REVIEWED" - Account was already reviewd. - ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` - // ReviewIneligibilityReasonDescription: Reason a program in a specific region - // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is - // `INELIGIBLE`. - ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` - // ReviewIneligibilityReasonDetails: Additional information for ineligibility. - // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the - // end of the cooldown period is provided. - ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` - // ReviewIssues: Issues evaluated in the review process. Fix all issues before - // requesting a review. - ReviewIssues []string `json:"reviewIssues,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisapprovalDate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusRegionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details -// for review ineligibility reasons. -type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { - // CooldownTime: This timestamp represents end of cooldown period for review - // ineligbility reason `IN_COOLDOWN_PERIOD`. - CooldownTime string `json:"cooldownTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CooldownTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CooldownTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Table struct { - // ColumnHeaders: Headers of the table's columns. Optional: if not set then the - // table has only one dimension. - ColumnHeaders *Headers `json:"columnHeaders,omitempty"` - // Name: Name of the table. Required for subtables, ignored for the main table. - Name string `json:"name,omitempty"` - // RowHeaders: Headers of the table's rows. Required. - RowHeaders *Headers `json:"rowHeaders,omitempty"` - // Rows: The list of rows that constitute the table. Must have the same length - // as `rowHeaders`. Required. - Rows []*Row `json:"rows,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColumnHeaders") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Table) MarshalJSON() ([]byte, error) { - type NoMethod Table - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrder struct { - // DeliveryDetails: Overrides the predefined delivery details if provided. - DeliveryDetails *TestOrderDeliveryDetails `json:"deliveryDetails,omitempty"` - // EnableOrderinvoices: Whether the orderinvoices service should support this - // order. - EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#testOrder" - Kind string `json:"kind,omitempty"` - // LineItems: Required. Line items that are ordered. At least one line item - // must be provided. - LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` - // NotificationMode: Restricted. Do not use. - NotificationMode string `json:"notificationMode,omitempty"` - // PickupDetails: Overrides the predefined pickup details if provided. - PickupDetails *TestOrderPickupDetails `json:"pickupDetails,omitempty"` - // PredefinedBillingAddress: Required. The billing address. Acceptable values - // are: - "dwight" - "jim" - "pam" - PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` - // PredefinedDeliveryAddress: Required. Identifier of one of the predefined - // delivery addresses for the delivery. Acceptable values are: - "dwight" - - // "jim" - "pam" - PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` - // PredefinedEmail: Required. Email address of the customer. Acceptable values - // are: - "pog.dwight.schrute@gmail.com" - "pog.jim.halpert@gmail.com" - - // "penpog.pam.beesly@gmail.comding" - PredefinedEmail string `json:"predefinedEmail,omitempty"` - // PredefinedPickupDetails: Identifier of one of the predefined pickup details. - // Required for orders containing line items with shipping type `pickup`. - // Acceptable values are: - "dwight" - "jim" - "pam" - PredefinedPickupDetails string `json:"predefinedPickupDetails,omitempty"` - // Promotions: Promotions associated with the order. - Promotions []*OrderPromotion `json:"promotions,omitempty"` - // ShippingCost: Required. The price of shipping for all items. Shipping tax is - // automatically calculated for orders where marketplace facilitator tax laws - // are applicable. Otherwise, tax settings from Merchant Center are applied. - // Note that shipping is not taxed in certain states. - ShippingCost *Price `json:"shippingCost,omitempty"` - // ShippingOption: Required. The requested shipping option. Acceptable values - // are: - "economy" - "expedited" - "oneDay" - "sameDay" - "standard" - // - "twoDay" - ShippingOption string `json:"shippingOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliveryDetails") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeliveryDetails") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrder) MarshalJSON() ([]byte, error) { - type NoMethod TestOrder - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // FullAddress: Strings representing the lines of the printed label for mailing - // the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, - // CA, 94043 United States - FullAddress []string `json:"fullAddress,omitempty"` - // IsPostOfficeBox: Whether the address is a post office box. - IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal Code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. Use `\n` to add a second - // line. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Country") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderAddress) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderDeliveryDetails struct { - // Address: The delivery address - Address *TestOrderAddress `json:"address,omitempty"` - // IsScheduledDelivery: Whether the order is scheduled delivery order. - IsScheduledDelivery bool `json:"isScheduledDelivery,omitempty"` - // PhoneNumber: The phone number of the person receiving the delivery. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderDeliveryDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderLineItem struct { - // Product: Required. Product data from the time of the order placement. - Product *TestOrderLineItemProduct `json:"product,omitempty"` - // QuantityOrdered: Required. Number of items ordered. - QuantityOrdered int64 `json:"quantityOrdered,omitempty"` - // ReturnInfo: Required. Details of the return policy for the line item. - ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` - // ShippingDetails: Required. Details of the requested shipping for the line - // item. - ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "Product") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Product") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderLineItem) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderLineItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderLineItemProduct struct { - // Brand: Required. Brand of the item. - Brand string `json:"brand,omitempty"` - // Condition: Required. Condition or state of the item. Acceptable values are: - // - "new" - Condition string `json:"condition,omitempty"` - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. Acceptable values are: - "en" - "fr" - ContentLanguage string `json:"contentLanguage,omitempty"` - // Fees: Fees for the item. Optional. - Fees []*OrderLineItemProductFee `json:"fees,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. Optional. - Gtin string `json:"gtin,omitempty"` - // ImageLink: Required. URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - // Optional. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. Optional. - Mpn string `json:"mpn,omitempty"` - // OfferId: Required. An identifier of the item. - OfferId string `json:"offerId,omitempty"` - // Price: Required. The price for the product. Tax is automatically calculated - // for orders where marketplace facilitator tax laws are applicable. Otherwise, - // tax settings from Merchant Center are applied. - Price *Price `json:"price,omitempty"` - // TargetCountry: Required. The CLDR territory code of the target country of - // the product. - TargetCountry string `json:"targetCountry,omitempty"` - // Title: Required. The title of the product. - Title string `json:"title,omitempty"` - // VariantAttributes: Variant attributes for the item. Optional. - VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Brand") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderLineItemProduct - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderPickupDetails struct { - // LocationCode: Required. Code of the location defined by provider or - // merchant. - LocationCode string `json:"locationCode,omitempty"` - // PickupLocationAddress: Required. Pickup location address. - PickupLocationAddress *TestOrderAddress `json:"pickupLocationAddress,omitempty"` - // PickupLocationType: Pickup location type. Acceptable values are: - - // "locker" - "store" - "curbside" - PickupLocationType string `json:"pickupLocationType,omitempty"` - // PickupPersons: Required. all pickup persons set by users. - PickupPersons []*TestOrderPickupDetailsPickupPerson `json:"pickupPersons,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocationCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocationCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderPickupDetails) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderPickupDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderPickupDetailsPickupPerson struct { - // Name: Required. Full name of the pickup person. - Name string `json:"name,omitempty"` - // PhoneNumber: Required. The phone number of the person picking up the items. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestOrderPickupDetailsPickupPerson) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderPickupDetailsPickupPerson - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TextWithTooltip: Block of text that may contain a tooltip with more -// information. -type TextWithTooltip struct { - // SimpleTooltipValue: Value of the tooltip as a simple text. - SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` - // SimpleValue: Value of the message as a simple text. - SimpleValue string `json:"simpleValue,omitempty"` - // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is - // present. - // - // Possible values: - // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided - // by the API. - // "INFO" - Used when the tooltip adds additional information to the context, - // the 'i' can be used as an icon. - // "QUESTION" - Used when the tooltip shows helpful information, the '?' can - // be used as an icon. - TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SimpleTooltipValue") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TextWithTooltip) MarshalJSON() ([]byte, error) { - type NoMethod TextWithTooltip - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimePeriod: A message that represents a time period. -type TimePeriod struct { - // EndTime: The ending timestamp. - EndTime string `json:"endTime,omitempty"` - // StartTime: The starting timestamp. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TimePeriod) MarshalJSON() ([]byte, error) { - type NoMethod TimePeriod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimeZone: Represents a time zone from the IANA Time Zone Database -// (https://www.iana.org/time-zones). -type TimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". - Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TimeZone) MarshalJSON() ([]byte, error) { - type NoMethod TimeZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TopicTrends: Topic trends fields requested by the merchant in the query. -// Field values are only set if the merchant queries `TopicTrendsView`. -// Forecast data can be queried up to 13 weeks by passing a future date in the -// `date` field. Historical data is measured daily, and forecasted data is -// projected weekly. All data points are normalized based on the highest data -// points returned in the response. If you make separate queries with different -// date ranges, you might see different values for the same date in each -// response. The recommended way to get a trend score of a topic is -// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can -// view trends for up to eight topics at a time. -type TopicTrends struct { - // CustomerCountryCode: Country trends are calculated for. Must be a two-letter - // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date the trend score was retrieved. - Date *Date `json:"date,omitempty"` - // Last120DaysSearchInterest: Search interest in the last 120 days, with the - // same normalization as search_interest. This field is only present for a past - // date. - Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` - // Last30DaysSearchInterest: Search interest in the last 30 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` - // Last7DaysSearchInterest: Search interest in the last 7 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` - // Last90DaysSearchInterest: Search interest in the last 90 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` - // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with - // the same normalization as search_interest. This field is only present for a - // future date. - Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` - // SearchInterest: Daily search interest, normalized to the time and country to - // make comparisons easier, with 100 representing peak popularity (from 0 to - // 100) for the requested time period and location. - SearchInterest float64 `json:"searchInterest,omitempty"` - // Topic: Google-provided topic trends are calculated for. Only top eight - // topics are returned. Topic is what shoppers are searching for on Google, - // grouped by the same concept. - Topic string `json:"topic,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerCountryCode") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TopicTrends) MarshalJSON() ([]byte, error) { - type NoMethod TopicTrends - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TopicTrends) UnmarshalJSON(data []byte) error { - type NoMethod TopicTrends - var s1 struct { - Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` - Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` - Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` - Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` - Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` - SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) - s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) - s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) - s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) - s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) - s.SearchInterest = float64(s1.SearchInterest) - return nil -} - -type TransitTable struct { - // PostalCodeGroupNames: A list of postal group names. The last value can be - // "all other locations". Example: `["zone 1", "zone 2", "all other - // locations"]`. The referred postal code groups must match the delivery - // country of the service. - PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` - Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` - // TransitTimeLabels: A list of transit time labels. The last value can be - // "all other labels". Example: `["food", "electronics", "all other - // labels"]`. - TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TransitTable) MarshalJSON() ([]byte, error) { - type NoMethod TransitTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TransitTableTransitTimeRow struct { - Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TransitTableTransitTimeRowTransitTimeValue struct { - // MaxTransitTimeInDays: Must be greater than or equal to - // `minTransitTimeInDays`. - MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` - // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means - // same day delivery, 1 means next day delivery. - MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRowTransitTimeValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TriggerActionPayload: The payload for the triggered action. -type TriggerActionPayload struct { - // ActionContext: Required. The context from the selected action. The value is - // obtained from rendered issues and needs to be sent back to identify the - // action that is being triggered. - ActionContext string `json:"actionContext,omitempty"` - // ActionInput: Required. Input provided by the merchant. - ActionInput *ActionInput `json:"actionInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TriggerActionPayload) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TriggerActionResponse: Response informing about the started action. -type TriggerActionResponse struct { - // Message: The message for merchant. - Message string `json:"message,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TriggerActionResponse) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteConversionSourceRequest: Request message for the -// UndeleteConversionSource method. -type UndeleteConversionSourceRequest struct { -} - -type UnitInvoice struct { - // AdditionalCharges: Additional charges for a unit, for example, shipping - // costs. - AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` - // UnitPrice: [required] Pre-tax or post-tax price of one unit depending on the - // locality of the order. *Note:* Invoicing works on a per unit basis. The - // `unitPrice` is the price of a single unit, and will be multiplied by the - // number of entries in `shipmentUnitId`. - UnitPrice *Price `json:"unitPrice,omitempty"` - // UnitPriceTaxes: Tax amounts to apply to the unit price. - UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalCharges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalCharges") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UnitInvoice) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UnitInvoiceAdditionalCharge struct { - // AdditionalChargeAmount: [required] Amount of the additional charge per unit. - // *Note:* Invoicing works on a per unit bases. The `additionalChargeAmount` is - // the amount charged per unit, and will be multiplied by the number of entries - // in `shipmentUnitID`. - AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` - // Type: [required] Type of the additional charge. Acceptable values are: - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalChargeAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalChargeAmount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoiceAdditionalCharge - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UnitInvoiceTaxLine struct { - // TaxAmount: [required] Tax amount for the tax type. - TaxAmount *Price `json:"taxAmount,omitempty"` - // TaxName: Optional name of the tax type. This should only be provided if - // `taxType` is `otherFeeTax`. - TaxName string `json:"taxName,omitempty"` - // TaxType: [required] Type of the tax. Acceptable values are: - "otherFee" - - // "otherFeeTax" - "sales" - TaxType string `json:"taxType,omitempty"` - // ForceSendFields is a list of field names (e.g. "TaxAmount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TaxAmount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoiceTaxLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` -// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` -// will be automatically replaced with data from the merchant account with this -// attribute offer_id -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) -type UrlSettings struct { - // CartUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the cart page on the merchant website with the - // selected item in cart. - CartUriTemplate string `json:"cartUriTemplate,omitempty"` - // CheckoutUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the merchant checkout page with the item in the cart. - CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CartUriTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CartUriTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlSettings) MarshalJSON() ([]byte, error) { - type NoMethod UrlSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Value: The single value of a rate group or the value of a rate group table's -// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, -// `carrierRateName`, `subtableName` must be set. -type Value struct { - // CarrierRateName: The name of a carrier rate referring to a carrier rate - // defined in the same rate group. Can only be set if all other fields are not - // set. - CarrierRateName string `json:"carrierRateName,omitempty"` - // FlatRate: A flat rate. Can only be set if all other fields are not set. - FlatRate *Price `json:"flatRate,omitempty"` - // NoShipping: If true, then the product can't ship. Must be true when set, can - // only be set if all other fields are not set. - NoShipping bool `json:"noShipping,omitempty"` - // PricePercentage: A percentage of the price represented as a number in - // decimal notation (for example, "5.4"). Can only be set if all other fields - // are not set. - PricePercentage string `json:"pricePercentage,omitempty"` - // SubtableName: The name of a subtable. Can only be set in table cells (not - // for single values), and only if all other fields are not set. - SubtableName string `json:"subtableName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierRateName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CarrierRateName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Value) MarshalJSON() ([]byte, error) { - type NoMethod Value - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. -type VerifyPhoneNumberRequest struct { - // PhoneVerificationMethod: Verification method used to receive verification - // code. - // - // Possible values: - // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. - // "SMS" - Receive verification code by SMS. - // "PHONE_CALL" - Receive verification code by phone call. - PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` - // VerificationCode: The verification code that was sent to the phone number - // for validation. - VerificationCode string `json:"verificationCode,omitempty"` - // VerificationId: The verification ID returned by `requestphoneverification`. - VerificationId string `json:"verificationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PhoneVerificationMethod") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber -// method. -type VerifyPhoneNumberResponse struct { - // VerifiedPhoneNumber: Verified phone number if verification is successful. - // This phone number can only be replaced by another verified phone number. - VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VerifiedPhoneNumber") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Warehouse: A fulfillment warehouse, which stores and handles inventory. -type Warehouse struct { - // BusinessDayConfig: Business days of the warehouse. If not set, will be - // Monday to Friday by default. - BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` - // CutoffTime: Required. The latest time of day that an order can be accepted - // and begin processing. Later orders will be processed in the next day. The - // time is based on the warehouse postal code. - CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` - // HandlingDays: Required. The number of days it takes for this warehouse to - // pack up and ship an item. This is on the warehouse level, but can be - // overridden on the offer level based on the attributes of an item. - HandlingDays int64 `json:"handlingDays,omitempty,string"` - // Name: Required. The name of the warehouse. Must be unique within account. - Name string `json:"name,omitempty"` - // ShippingAddress: Required. Shipping address of the warehouse. - ShippingAddress *Address `json:"shippingAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BusinessDayConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Warehouse) MarshalJSON() ([]byte, error) { - type NoMethod Warehouse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseBasedDeliveryTime struct { - // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of - // supported carriers can be retrieved through the `listSupportedCarriers` - // method. - Carrier string `json:"carrier,omitempty"` - // CarrierService: Required. Carrier service, such as "ground" or "2 days". - // The list of supported services for a carrier can be retrieved through the - // `listSupportedCarriers` method. The name of the service must be in the - // eddSupportedServices list. - CarrierService string `json:"carrierService,omitempty"` - // OriginAdministrativeArea: Shipping origin's state. - OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` - // OriginCity: Shipping origin's city. - OriginCity string `json:"originCity,omitempty"` - // OriginCountry: Shipping origin's country represented as a CLDR territory - // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - OriginCountry string `json:"originCountry,omitempty"` - // OriginPostalCode: Shipping origin. - OriginPostalCode string `json:"originPostalCode,omitempty"` - // OriginStreetAddress: Shipping origin's street address. - OriginStreetAddress string `json:"originStreetAddress,omitempty"` - // WarehouseName: The name of the warehouse. Warehouse name need to be matched - // with name. If warehouseName is set, the below fields will be ignored. The - // warehouse info will be read from warehouse. - WarehouseName string `json:"warehouseName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Carrier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseBasedDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseCutoffTime struct { - // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order - // has to be placed to be processed in the same day by the warehouse. Hour is - // based on the timezone of warehouse. - Hour int64 `json:"hour,omitempty"` - // Minute: Required. Minute of the cutoff time until which an order has to be - // placed to be processed in the same day by the warehouse. Minute is based on - // the timezone of warehouse. - Minute int64 `json:"minute,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hour") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WarehouseCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseCutoffTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Weight struct { - // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" - Unit string `json:"unit,omitempty"` - // Value: Required. The weight represented as a number. The weight can have a - // maximum precision of four decimal places. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Unit") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Weight) MarshalJSON() ([]byte, error) { - type NoMethod Weight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AccountsAuthinfoCall struct { - s *APIService - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Authinfo: Returns information about the authenticated user. -func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { - c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsAuthinfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.authinfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsAuthInfoResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsClaimwebsiteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant -// accounts with approved third-party CSSs aren't required to claim a website. -// -// - accountId: The ID of the account whose website is claimed. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { - c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Overwrite sets the optional parameter "overwrite": Only available to -// selected merchants, for example multi-client accounts (MCAs) and their -// sub-accounts. When set to `True`, this option removes any existing claim on -// the requested website and replaces it with a claim from the account that -// makes the request. -func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { - c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsClaimwebsiteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.claimwebsite" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsClaimWebsiteResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsCustombatchCall struct { - s *APIService - accountscustombatchrequest *AccountsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant -// Center (sub-)accounts in a single request. -func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { - c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountscustombatchrequest = accountscustombatchrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsDeleteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Merchant Center sub-account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. This must be a multi-client -// account, and accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { - c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Force sets the optional parameter "force": Option to delete sub-accounts -// with products. The default value is false. -func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { - c.ctx_ = ctx - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AdditionalImageLinks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalImageLinks") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Product) MarshalJSON() ([]byte, error) { + type NoMethod Product + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err +func (s *Product) UnmarshalJSON(data []byte) error { + type NoMethod Product + var s1 struct { + DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` + *NoMethod } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.delete" call. -func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { return err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } + s.DisplayAdsValue = float64(s1.DisplayAdsValue) return nil } -type AccountsGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a Merchant Center account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { - c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsGetCall) View(view string) *AccountsGetCall { - c.urlParams_.Set("view", view) - return c +// ProductCertification: Product certification +// (https://support.google.com/merchants/answer/13528839), introduced for EU +// energy efficiency labeling compliance using the EU EPREL +// (https://eprel.ec.europa.eu/screen/home) database. +type ProductCertification struct { + // CertificationAuthority: The certification authority, for example + // "European_Commission". Maximum length is 2000 characters. + CertificationAuthority string `json:"certificationAuthority,omitempty"` + // CertificationCode: The certification code, for eaxample "123456". Maximum + // length is 2000 characters. + CertificationCode string `json:"certificationCode,omitempty"` + // CertificationName: The name of the certification, for example "EPREL". + // Maximum length is 2000 characters. + CertificationName string `json:"certificationName,omitempty"` + // CertificationValue: The certification value (also known as class, level or + // grade), for example "A+", "C", "gold". Maximum length is 2000 characters. + CertificationValue string `json:"certificationValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "CertificationAuthority") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CertificationAuthority") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductCertification) MarshalJSON() ([]byte, error) { + type NoMethod ProductCertification + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { - c.ifNoneMatch_ = entityTag - return c +// ProductCluster: Product cluster fields. A product cluster is a grouping for +// different offers that represent the same product. Values are only set for +// fields requested explicitly in the request's search query. +type ProductCluster struct { + // Brand: Brand of the product cluster. + Brand string `json:"brand,omitempty"` + // BrandInventoryStatus: Tells if there is at least one product of the brand + // currently `IN_STOCK` in your product feed across multiple countries, all + // products are `OUT_OF_STOCK` in your product feed, or `NOT_IN_INVENTORY`. The + // field doesn't take the Best Sellers report country filter into account. + // + // Possible values: + // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. + // "IN_STOCK" - Merchant has a product for this product cluster or brand in + // stock. + // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand + // in inventory but it is currently out of stock. + // "NOT_IN_INVENTORY" - Merchant does not have a product for this product + // cluster or brand in inventory. + BrandInventoryStatus string `json:"brandInventoryStatus,omitempty"` + // CategoryL1: Product category (1st level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Product category (2nd level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Product category (3rd level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Product category (4th level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Product category (5th level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL5 string `json:"categoryL5,omitempty"` + // InventoryStatus: Tells whether the product cluster is `IN_STOCK` in your + // product feed across multiple countries, `OUT_OF_STOCK` in your product feed, + // or `NOT_IN_INVENTORY` at all. The field doesn't take the Best Sellers report + // country filter into account. + // + // Possible values: + // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. + // "IN_STOCK" - Merchant has a product for this product cluster or brand in + // stock. + // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand + // in inventory but it is currently out of stock. + // "NOT_IN_INVENTORY" - Merchant does not have a product for this product + // cluster or brand in inventory. + InventoryStatus string `json:"inventoryStatus,omitempty"` + // Title: Title of the product cluster. + Title string `json:"title,omitempty"` + // VariantGtins: GTINs of example variants of the product cluster. + VariantGtins []string `json:"variantGtins,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Brand") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { - c.ctx_ = ctx - return c +func (s ProductCluster) MarshalJSON() ([]byte, error) { + type NoMethod ProductCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} +// ProductDeliveryTime: The estimated days to deliver a product after an order +// is placed. Only authorized shipping signals partners working with a merchant +// can use this resource. Merchants should use the `products` +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#productshipping) +// resource instead. +type ProductDeliveryTime struct { + // AreaDeliveryTimes: Required. A set of associations between `DeliveryArea` + // and `DeliveryTime` entries. The total number of `areaDeliveryTimes` can be + // at most 100. + AreaDeliveryTimes []*ProductDeliveryTimeAreaDeliveryTime `json:"areaDeliveryTimes,omitempty"` + // ProductId: Required. The `id` of the product. + ProductId *ProductId `json:"productId,omitempty"` -func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AreaDeliveryTimes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AreaDeliveryTimes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsInsertCall struct { - s *APIService - merchantId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ProductDeliveryTimeAreaDeliveryTime: A pairing of `DeliveryArea` associated +// with a `DeliveryTime` for this product. +type ProductDeliveryTimeAreaDeliveryTime struct { + // DeliveryArea: Required. The delivery area associated with `deliveryTime` for + // this product. + DeliveryArea *DeliveryArea `json:"deliveryArea,omitempty"` + // DeliveryTime: Required. The delivery time associated with `deliveryArea` for + // this product. + DeliveryTime *ProductDeliveryTimeAreaDeliveryTimeDeliveryTime `json:"deliveryTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeliveryArea") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DeliveryArea") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Insert: Creates a Merchant Center sub-account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { - c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.account = account - return c +func (s ProductDeliveryTimeAreaDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTimeAreaDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductDeliveryTimeAreaDeliveryTimeDeliveryTime: A delivery time for this +// product. +type ProductDeliveryTimeAreaDeliveryTimeDeliveryTime struct { + // MaxHandlingTimeDays: Required. The maximum number of business days + // (inclusive) between when an order is placed and when the product ships. If a + // product ships in the same day, set this value to 0. + MaxHandlingTimeDays int64 `json:"maxHandlingTimeDays,omitempty"` + // MaxTransitTimeDays: Required. The maximum number of business days + // (inclusive) between when the product ships and when the product is + // delivered. + MaxTransitTimeDays int64 `json:"maxTransitTimeDays,omitempty"` + // MinHandlingTimeDays: Required. The minimum number of business days + // (inclusive) between when an order is placed and when the product ships. If a + // product ships in the same day, set this value to 0. + MinHandlingTimeDays int64 `json:"minHandlingTimeDays,omitempty"` + // MinTransitTimeDays: Required. The minimum number of business days + // (inclusive) between when the product ships and when the product is + // delivered. + MinTransitTimeDays int64 `json:"minTransitTimeDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxHandlingTimeDays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxHandlingTimeDays") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { - c.ctx_ = ctx - return c +func (s ProductDeliveryTimeAreaDeliveryTimeDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTimeAreaDeliveryTimeDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductDimension struct { + // Unit: Required. The length units. Acceptable values are: - "in" - "cm" + Unit string `json:"unit,omitempty"` + // Value: Required. The length value represented as a number. The value can + // have a maximum precision of four decimal places. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsInsertCall) 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.account) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductDimension) MarshalJSON() ([]byte, error) { + type NoMethod ProductDimension + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *ProductDimension) UnmarshalJSON(data []byte) error { + type NoMethod ProductDimension + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil -} - -type AccountsLinkCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountslinkrequest *AccountsLinkRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Link: Performs an action on a link between two Merchant Center accounts, -// namely accountId and linkedAccountId. -// -// - accountId: The ID of the account that should be linked. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { - c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountslinkrequest = accountslinkrequest - return c + s.Value = float64(s1.Value) + return nil } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductId: The Content API ID of the product. +type ProductId struct { + // ProductId: The Content API ID of the product, in the form + // `channel:contentLanguage:targetCountry:offerId`. + ProductId string `json:"productId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { - c.ctx_ = ctx - return c +func (s ProductId) MarshalJSON() ([]byte, error) { + type NoMethod ProductId + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLinkCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// ProductIssue: An issue affecting specific product. +type ProductIssue struct { + // Actions: A list of actionable steps that can be executed to solve the issue. + // An example is requesting a re-review or providing arguments when merchant + // disagrees with the issue. Actions that are supported in (your) third-party + // application can be rendered as buttons and should be available to merchant + // when they expand the issue. + Actions []*Action `json:"actions,omitempty"` + // Impact: Clarifies the severity of the issue. The summarizing message, if + // present, should be shown right under the title for each issue. It helps + // merchants to quickly understand the impact of the issue. The detailed + // breakdown helps the merchant to fully understand the impact of the issue. It + // can be rendered as dialog that opens when the merchant mouse over the + // summarized impact statement. Issues with different severity can be styled + // differently. They may use a different color or icon to signal the difference + // between `ERROR`, `WARNING` and `INFO`. + Impact *ProductIssueImpact `json:"impact,omitempty"` + // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML + // elements contain CSS classes that can be used to customize the style of the + // content. Always sanitize the HTML before embedding it directly to your + // application. The sanitizer needs to allow basic HTML tags, such as: `div`, + // `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use + // DOMPurify (https://www.npmjs.com/package/dompurify). CSS classes: * + // `issue-detail` - top level container for the detail of the issue * + // `callout-banners` - section of the `issue-detail` with callout banners * + // `callout-banner` - single callout banner, inside `callout-banners` * + // `callout-banner-info` - callout with important information (default) * + // `callout-banner-warning` - callout with a warning * `callout-banner-error` - + // callout informing about an error (most severe) * `issue-content` - section + // of the `issue-detail`, contains multiple `content-element` * + // `content-element` - content element such as a list, link or paragraph, + // inside `issue-content` * `root-causes` - unordered list with items + // describing root causes of the issue, inside `issue-content` * + // `root-causes-intro` - intro text before the `root-causes` list, inside + // `issue-content` * `segment` - section of the text, `span` inside paragraph * + // `segment-attribute` - section of the text that represents a product + // attribute, for example 'image\_link' * `segment-literal` - section of the + // text that contains a special value, for example '0-1000 kg' * `segment-bold` + // - section of the text that should be rendered as bold * `segment-italic` - + // section of the text that should be rendered as italic * `tooltip` - used on + // paragraphs that should be rendered with a tooltip. A section of the text in + // such a paragraph will have a class `tooltip-text` and is intended to be + // shown in a mouse over dialog. If the style is not used, the `tooltip-text` + // section would be shown on a new line, after the main part of the text. * + // `tooltip-text` - marks a section of the text within a `tooltip`, that is + // intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a + // section of the text within a `tooltip`, that can be replaced with a tooltip + // icon, for example '?' or 'i'. By default, this section contains a `br` tag, + // that is separating the main text and the tooltip text when the style is not + // used. * `tooltip-style-question` - the tooltip shows helpful information, + // can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds + // additional information fitting to the context, can use the 'i' as an icon. * + // `content-moderation` - marks the paragraph that explains how the issue was + // identified. * `list-intro` - marks the paragraph that contains an intro for + // a list. This paragraph will be always followed by a list. * `new-element` - + // Present for new elements added to the pre-rendered content in the future. To + // make sure that a new content element does not break your style, you can hide + // everything with this class. + PrerenderedContent string `json:"prerenderedContent,omitempty"` + // Title: Title of the issue. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Actions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsLinkCall) 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.accountslinkrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.link" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsLinkResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsLinkResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// ProductIssueImpact: Overall impact of product issue. +type ProductIssueImpact struct { + // Breakdowns: Detailed impact breakdown. Explains the types of restriction the + // issue has in different shopping destinations and territory. If present, it + // should be rendered to the merchant. Can be shown as a mouse over dropdown or + // a dialog. Each breakdown item represents a group of regions with the same + // impact details. + Breakdowns []*Breakdown `json:"breakdowns,omitempty"` + // Message: Optional. Message summarizing the overall impact of the issue. If + // present, it should be rendered to the merchant. For example: "Limits + // visibility in France" + Message string `json:"message,omitempty"` + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by the API. + // "ERROR" - Causes either an account suspension or an item disapproval. + // Errors should be resolved as soon as possible to ensure items are eligible + // to appear in results again. + // "WARNING" - Warnings can negatively impact the performance of ads and can + // lead to item or account suspensions in the future unless the issue is + // resolved. + // "INFO" - Infos are suggested optimizations to increase data quality. + // Resolving these issues is recommended, but not required. + Severity string `json:"severity,omitempty"` + // ForceSendFields is a list of field names (e.g. "Breakdowns") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Breakdowns") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s ProductIssueImpact) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssueImpact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the sub-accounts in your Merchant Center account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) List(merchantId uint64) *AccountsListCall { - c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +type ProductProductDetail struct { + // AttributeName: The name of the product detail. + AttributeName string `json:"attributeName,omitempty"` + // AttributeValue: The value of the product detail. + AttributeValue string `json:"attributeValue,omitempty"` + // SectionName: The section header used to group a set of product details. + SectionName string `json:"sectionName,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AttributeName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Label sets the optional parameter "label": If view is set to "css", only -// return accounts that are assigned label with given ID. -func (c *AccountsListCall) Label(label uint64) *AccountsListCall { - c.urlParams_.Set("label", fmt.Sprint(label)) - return c +func (s ProductProductDetail) MarshalJSON() ([]byte, error) { + type NoMethod ProductProductDetail + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// accounts to return in the response, used for paging. -func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type ProductShipping struct { + // Country: The CLDR territory code of the country to which an item will ship. + Country string `json:"country,omitempty"` + // LocationGroupName: The location where the shipping is applicable, + // represented by a location group name. + LocationGroupName string `json:"locationGroupName,omitempty"` + // LocationId: The numeric ID of a location that the shipping rate applies to + // as defined in the Google Ads API. + LocationId int64 `json:"locationId,omitempty,string"` + // MaxHandlingTime: Maximum handling time (inclusive) between when the order is + // received and shipped in business days. 0 means that the order is shipped on + // the same day as it's received if it happens before the cut-off time. Both + // maxHandlingTime and maxTransitTime are required if providing shipping + // speeds. + MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` + // MaxTransitTime: Maximum transit time (inclusive) between when the order has + // shipped and when it's delivered in business days. 0 means that the order is + // delivered on the same day as it ships. Both maxHandlingTime and + // maxTransitTime are required if providing shipping speeds. + MaxTransitTime int64 `json:"maxTransitTime,omitempty,string"` + // MinHandlingTime: Minimum handling time (inclusive) between when the order is + // received and shipped in business days. 0 means that the order is shipped on + // the same day as it's received if it happens before the cut-off time. + // minHandlingTime can only be present together with maxHandlingTime; but it's + // not required if maxHandlingTime is present. + MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` + // MinTransitTime: Minimum transit time (inclusive) between when the order has + // shipped and when it's delivered in business days. 0 means that the order is + // delivered on the same day as it ships. minTransitTime can only be present + // together with maxTransitTime; but it's not required if maxTransitTime is + // present. + MinTransitTime int64 `json:"minTransitTime,omitempty,string"` + // PostalCode: The postal code range that the shipping rate applies to, + // represented by a postal code, a postal code prefix followed by a * wildcard, + // a range between two postal codes or two postal code prefixes of equal + // length. + PostalCode string `json:"postalCode,omitempty"` + // Price: Fixed shipping price, represented as a number. + Price *Price `json:"price,omitempty"` + // Region: The geographic region to which a shipping rate applies. + Region string `json:"region,omitempty"` + // Service: A free-form description of the service class or delivery speed. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Country") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountsListCall) Name(name string) *AccountsListCall { - c.urlParams_.Set("name", name) - return c +func (s ProductShipping) MarshalJSON() ([]byte, error) { + type NoMethod ProductShipping + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProductShippingDimension struct { + // Unit: The unit of value. + Unit string `json:"unit,omitempty"` + // Value: The dimension of the product used to calculate the shipping cost of + // the item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsListCall) View(view string) *AccountsListCall { - c.urlParams_.Set("view", view) - return c +func (s ProductShippingDimension) MarshalJSON() ([]byte, error) { + type NoMethod ProductShippingDimension + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { + type NoMethod ProductShippingDimension + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { - c.ifNoneMatch_ = entityTag - return c +type ProductShippingWeight struct { + // Unit: The unit of value. + Unit string `json:"unit,omitempty"` + // Value: The weight of the product used to calculate the shipping cost of the + // item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { - c.ctx_ = ctx - return c +func (s ProductShippingWeight) MarshalJSON() ([]byte, error) { + type NoMethod ProductShippingWeight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) +func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { + type NoMethod ProductShippingWeight + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - return c.header_ + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductStatus: The status of a product, that is, information about a product +// computed asynchronously. +type ProductStatus struct { + // CreationDate: Date on which the item has been created, in ISO 8601 format. + CreationDate string `json:"creationDate,omitempty"` + // DestinationStatuses: The intended destinations for the product. + DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` + // GoogleExpirationDate: Date on which the item expires in Google Shopping, in + // ISO 8601 format. + GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` + // ItemLevelIssues: A list of all issues associated with the product. + ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productStatus" + Kind string `json:"kind,omitempty"` + // LastUpdateDate: Date on which the item has been last updated, in ISO 8601 + // format. + LastUpdateDate string `json:"lastUpdateDate,omitempty"` + // Link: The link to the product. + Link string `json:"link,omitempty"` + // ProductId: The ID of the product for which status is reported. + ProductId string `json:"productId,omitempty"` + // Title: The title of the product. + Title string `json:"title,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationDate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreationDate") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductStatus) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProductStatusDestinationStatus struct { + // ApprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the + // offer is approved. + ApprovedCountries []string `json:"approvedCountries,omitempty"` + // Destination: The name of the destination + Destination string `json:"destination,omitempty"` + // DisapprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the + // offer is disapproved. + DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` + // PendingCountries: List of country codes (ISO 3166-1 alpha-2) where the offer + // is pending approval. + PendingCountries []string `json:"pendingCountries,omitempty"` + // Status: Deprecated. Destination approval status in `targetCountry` of the + // offer. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApprovedCountries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApprovedCountries") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsListlinksCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatusDestinationStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Listlinks: Returns the list of accounts linked to your Merchant Center -// account. -// -// - accountId: The ID of the account for which to list links. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { - c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +type ProductStatusItemLevelIssue struct { + // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue + // applies to the offer. + ApplicableCountries []string `json:"applicableCountries,omitempty"` + // AttributeName: The attribute's name, if the issue is caused by a single + // attribute. + AttributeName string `json:"attributeName,omitempty"` + // Code: The error code of the issue. + Code string `json:"code,omitempty"` + // Description: A short issue description in English. + Description string `json:"description,omitempty"` + // Destination: The destination the issue applies to. + Destination string `json:"destination,omitempty"` + // Detail: A detailed issue description in English. + Detail string `json:"detail,omitempty"` + // Documentation: The URL of a web page to help with resolving this issue. + Documentation string `json:"documentation,omitempty"` + // Resolution: Whether the issue can be resolved by the merchant. + Resolution string `json:"resolution,omitempty"` + // Servability: How this issue affects serving of the offer. + Servability string `json:"servability,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicableCountries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApplicableCountries") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// links to return in the response, used for pagination. The minimum allowed -// value is 5 results per page. If provided value is lower than 5, it will be -// automatically increased to 5. -func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatusItemLevelIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ProductStructuredDescription: Structured description, for algorithmically +// (AI)-generated descriptions. See description +// (https://support.google.com/merchants/answer/6324468#When_to_use) for more +// information. +type ProductStructuredDescription struct { + // Content: Required. The description text. Maximum length is 5000 characters. + Content string `json:"content,omitempty"` + // DigitalSourceType: Optional. The digital source type. Acceptable values are: + // - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s ProductStructuredDescription) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredDescription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductStructuredTitle: Structured title, for algorithmically (AI)-generated +// titles. See title +// (https://support.google.com/merchants/answer/6324415#Whentouse) for more +// information. +type ProductStructuredTitle struct { + // Content: Required. The title text. Maximum length is 150 characters. + Content string `json:"content,omitempty"` + // DigitalSourceType: Optional. The digital source type. Acceptable values are: + // - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { - c.ifNoneMatch_ = entityTag - return c +func (s ProductStructuredTitle) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredTitle + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { - c.ctx_ = ctx - return c +type ProductSubscriptionCost struct { + // Amount: The amount the buyer has to pay per subscription period. + Amount *Price `json:"amount,omitempty"` + // Period: The type of subscription period. - "month" - "year" + Period string `json:"period,omitempty"` + // PeriodLength: The number of subscription periods the buyer has to pay. + PeriodLength int64 `json:"periodLength,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListlinksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductSubscriptionCost) MarshalJSON() ([]byte, error) { + type NoMethod ProductSubscriptionCost + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ProductTax struct { + // Country: The country within which the item is taxed, specified as a CLDR + // territory code. + Country string `json:"country,omitempty"` + // LocationId: The numeric ID of a location that the tax rate applies to as + // defined in the Google Ads API. + LocationId int64 `json:"locationId,omitempty,string"` + // PostalCode: The postal code range that the tax rate applies to, represented + // by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP + // codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, + // 94002-95460, 94*-95*. + PostalCode string `json:"postalCode,omitempty"` + // Rate: The percentage of tax rate that applies to the item price. + Rate float64 `json:"rate,omitempty"` + // Region: The geographic region to which the tax rate applies. + Region string `json:"region,omitempty"` + // TaxShip: Should be set to true if tax is charged on shipping. + TaxShip bool `json:"taxShip,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Country") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.listlinks" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListLinksResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsListLinksResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductTax) MarshalJSON() ([]byte, error) { + type NoMethod ProductTax + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) +func (s *ProductTax) UnmarshalJSON(data []byte) error { + type NoMethod ProductTax + var s1 struct { + Rate gensupport.JSONFloat64 `json:"rate"` + *NoMethod } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Rate = float64(s1.Rate) + return nil } -type AccountsRequestphoneverificationCall struct { - s *APIService - merchantId int64 - accountId int64 - requestphoneverificationrequest *RequestPhoneVerificationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Requestphoneverification: Request verification code to start phone -// verification. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { - c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.requestphoneverificationrequest = requestphoneverificationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { - c.ctx_ = ctx - return c +type ProductUnitPricingBaseMeasure struct { + // Unit: The unit of the denominator. + Unit string `json:"unit,omitempty"` + // Value: The denominator of the unit price. + Value int64 `json:"value,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsRequestphoneverificationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { + type NoMethod ProductUnitPricingBaseMeasure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsRequestphoneverificationCall) 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.requestphoneverificationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ProductUnitPricingMeasure struct { + // Unit: The unit of the measure. + Unit string `json:"unit,omitempty"` + // Value: The measure of an item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.requestphoneverification" call. -// Any non-2xx status code is an error. Response headers are in either -// *RequestPhoneVerificationResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - 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 := &RequestPhoneVerificationResponse{ - 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 +func (s ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { + type NoMethod ProductUnitPricingMeasure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { + type NoMethod ProductUnitPricingMeasure + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -// Update: Updates a Merchant Center account. Any fields that are not provided -// are deleted from the resource. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { - c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.account = account - return c +// ProductView: Product fields. Values are only set for fields requested +// explicitly in the request's search query. +type ProductView struct { + // AggregatedDestinationStatus: Aggregated destination status. + // + // Possible values: + // "AGGREGATED_STATUS_UNSPECIFIED" - Undefined aggregated status. + // "NOT_ELIGIBLE_OR_DISAPPROVED" - Offer isn't eligible, or is disapproved + // for all destinations. + // "PENDING" - Offer's status is pending in all destinations. + // "ELIGIBLE_LIMITED" - Offer is eligible for some (but not all) + // destinations. + // "ELIGIBLE" - Offer is eligible for all destinations. + AggregatedDestinationStatus string `json:"aggregatedDestinationStatus,omitempty"` + // Availability: Availability of the product. + Availability string `json:"availability,omitempty"` + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // CategoryL1: First level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Second level of the product category in Google's product + // taxonomy (https://support.google.com/merchants/answer/6324436). + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Third level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Fourth level of the product category in Google's product + // taxonomy (https://support.google.com/merchants/answer/6324436). + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Fifth level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL5 string `json:"categoryL5,omitempty"` + // Channel: Channel of the product (online versus local). + // + // Possible values: + // "CHANNEL_UNSPECIFIED" - Indicates that the channel is unspecified. + // "LOCAL" - Indicates that the channel is local. + // "ONLINE" - Indicates that the channel is online. + Channel string `json:"channel,omitempty"` + // ClickPotential: Estimated performance potential compared to highest + // performing products of the merchant. + // + // Possible values: + // "CLICK_POTENTIAL_UNSPECIFIED" - Unknown predicted clicks impact. + // "LOW" - Potential to receive a low number of clicks compared to the + // highest performing products of the merchant. + // "MEDIUM" - Potential to receive a moderate number of clicks compared to + // the highest performing products of the merchant. + // "HIGH" - Potential to receive a similar number of clicks as the highest + // performing products of the merchant. + ClickPotential string `json:"clickPotential,omitempty"` + // ClickPotentialRank: Rank of the product based on its click potential. A + // product with `click_potential_rank` 1 has the highest click potential among + // the merchant's products that fulfill the search query conditions. + ClickPotentialRank int64 `json:"clickPotentialRank,omitempty,string"` + // Condition: Condition of the product. + Condition string `json:"condition,omitempty"` + // CreationTime: The time the merchant created the product in timestamp + // seconds. + CreationTime string `json:"creationTime,omitempty"` + // CurrencyCode: Product price currency code (for example, ISO 4217). Absent if + // product price is not available. + CurrencyCode string `json:"currencyCode,omitempty"` + // ExpirationDate: Expiration date for the product. Specified on insertion. + ExpirationDate *Date `json:"expirationDate,omitempty"` + // Gtin: GTIN of the product. + Gtin []string `json:"gtin,omitempty"` + // Id: The REST ID of the product, in the form of + // channel:contentLanguage:targetCountry:offerId. Content API methods that + // operate on products take this as their productId parameter. Should always be + // included in the SELECT clause. + Id string `json:"id,omitempty"` + // ItemGroupId: Item group ID provided by the merchant for grouping variants + // together. + ItemGroupId string `json:"itemGroupId,omitempty"` + // ItemIssues: List of item issues for the product. + ItemIssues []*ProductViewItemIssue `json:"itemIssues,omitempty"` + // LanguageCode: Language code of the product in BCP 47 format. + LanguageCode string `json:"languageCode,omitempty"` + // OfferId: Merchant-provided id of the product. + OfferId string `json:"offerId,omitempty"` + // PriceMicros: Product price specified as micros (1 millionth of a standard + // unit, 1 USD = 1000000 micros) in the product currency. Absent in case the + // information about the price of the product is not available. + PriceMicros int64 `json:"priceMicros,omitempty,string"` + // ProductTypeL1: First level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL1 string `json:"productTypeL1,omitempty"` + // ProductTypeL2: Second level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL2 string `json:"productTypeL2,omitempty"` + // ProductTypeL3: Third level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL3 string `json:"productTypeL3,omitempty"` + // ProductTypeL4: Fourth level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL4 string `json:"productTypeL4,omitempty"` + // ProductTypeL5: Fifth level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL5 string `json:"productTypeL5,omitempty"` + // ShippingLabel: The normalized shipping label specified in the feed + ShippingLabel string `json:"shippingLabel,omitempty"` + // Title: Title of the product. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AggregatedDestinationStatus") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregatedDestinationStatus") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductView) MarshalJSON() ([]byte, error) { + type NoMethod ProductView + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { - c.ctx_ = ctx - return c +// ProductViewItemIssue: Item issue associated with the product. +type ProductViewItemIssue struct { + // IssueType: Item issue type. + IssueType *ProductViewItemIssueItemIssueType `json:"issueType,omitempty"` + // Resolution: Item issue resolution. + // + // Possible values: + // "UNKNOWN" - Unknown resolution type. + // "MERCHANT_ACTION" - The merchant has to fix the issue. + // "PENDING_PROCESSING" - The issue will be resolved automatically (for + // example, image crawl), or Google review. No merchant action is required now. + // Resolution might lead to another issue (for example, if crawl fails). + Resolution string `json:"resolution,omitempty"` + // Severity: Item issue severity. + Severity *ProductViewItemIssueItemIssueSeverity `json:"severity,omitempty"` + // ForceSendFields is a list of field names (e.g. "IssueType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IssueType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductViewItemIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsUpdateCall) 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.account) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductViewItemIssueIssueSeverityPerDestination: Issue severity for all +// affected regions in a destination. +type ProductViewItemIssueIssueSeverityPerDestination struct { + // DemotedCountries: List of demoted countries in the destination. + DemotedCountries []string `json:"demotedCountries,omitempty"` + // Destination: Issue destination. + Destination string `json:"destination,omitempty"` + // DisapprovedCountries: List of disapproved countries in the destination. + DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` + // ForceSendFields is a list of field names (e.g. "DemotedCountries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DemotedCountries") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductViewItemIssueIssueSeverityPerDestination) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueIssueSeverityPerDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsUpdatelabelsCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountsupdatelabelsrequest *AccountsUpdateLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ProductViewItemIssueItemIssueSeverity: Severity of an issue per destination +// in a region, and aggregated severity. +type ProductViewItemIssueItemIssueSeverity struct { + // AggregatedSeverity: Severity of an issue aggregated for destination. + // + // Possible values: + // "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" - Undefined Issue severity. + // "DISAPPROVED" - Issue disapproves the product in at least one of the + // selected destinations. + // "DEMOTED" - Issue demotes the product in all selected destinations it + // affects. + // "PENDING" - Issue resolution is `PENDING_PROCESSING`. + AggregatedSeverity string `json:"aggregatedSeverity,omitempty"` + // SeverityPerDestination: Item issue severity for every destination. + SeverityPerDestination []*ProductViewItemIssueIssueSeverityPerDestination `json:"severityPerDestination,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregatedSeverity") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregatedSeverity") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Updatelabels: Updates labels that are assigned to the Merchant Center -// account by CSS user. -// -// - accountId: The ID of the account whose labels are updated. -// - merchantId: The ID of the managing account. -func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { - c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountsupdatelabelsrequest = accountsupdatelabelsrequest - return c +func (s ProductViewItemIssueItemIssueSeverity) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueItemIssueSeverity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductViewItemIssueItemIssueType: Type of the item issue. +type ProductViewItemIssueItemIssueType struct { + // CanonicalAttribute: Canonical attribute name for attribute-specific issues. + CanonicalAttribute string `json:"canonicalAttribute,omitempty"` + // Code: Error code of the issue. + Code string `json:"code,omitempty"` + // ForceSendFields is a list of field names (e.g. "CanonicalAttribute") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CanonicalAttribute") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { - c.ctx_ = ctx - return c +func (s ProductViewItemIssueItemIssueType) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueItemIssueType + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsUpdatelabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductWeight struct { + // Unit: Required. The weight unit. Acceptable values are: - "g" - "kg" - + // "oz" - "lb" + Unit string `json:"unit,omitempty"` + // Value: Required. The weight represented as a number. The weight can have a + // maximum precision of four decimal places. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsUpdatelabelsCall) 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.accountsupdatelabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductWeight) MarshalJSON() ([]byte, error) { + type NoMethod ProductWeight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.updatelabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsUpdateLabelsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountsUpdateLabelsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *ProductWeight) UnmarshalJSON(data []byte) error { + type NoMethod ProductWeight + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil + s.Value = float64(s1.Value) + return nil } -type AccountsVerifyphonenumberCall struct { - s *APIService - merchantId int64 - accountId int64 - verifyphonenumberrequest *VerifyPhoneNumberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductsCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Verifyphonenumber: Validates verification code to verify phone number for -// the account. If successful this will overwrite the value of -// `accounts.businessinformation.phoneNumber`. Only verified phone number will -// replace an existing verified phone number. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { - c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.verifyphonenumberrequest = verifyphonenumberrequest - return c +func (s ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductsCustomBatchRequestEntry: A batch entry encoding a single non-batch +// products request. +type ProductsCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // FeedId: The Content API Supplemental Feed ID. If present then product + // insertion or deletion applies to a supplemental feed instead of primary + // Content API feed. + FeedId uint64 `json:"feedId,omitempty,string"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "delete" - + // "get" - "insert" - "update" + Method string `json:"method,omitempty"` + // Product: The product to insert or update. Only required if the method is + // `insert` or `update`. If the `update` method is used with `updateMask` only + // to delete a field, then this isn't required. For example, setting + // `salePrice` on the `updateMask` and not providing a `product` will result in + // an existing sale price on the product specified by `productId` being + // deleted. + Product *Product `json:"product,omitempty"` + // ProductId: The ID of the product to get or mutate. Only defined if the + // method is `get`, `delete`, or `update`. + ProductId string `json:"productId,omitempty"` + // UpdateMask: The comma-separated list of product attributes to be updated. + // Example: "title,salePrice". Attributes specified in the update mask + // without a value specified in the body will be deleted from the product. *You + // must specify the update mask to delete attributes.* Only top-level product + // attributes can be updated. If not defined, product attributes with set + // values will be updated and other attributes will stay unchanged. Only + // defined if the method is `update`. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { - c.ctx_ = ctx - return c +func (s ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsVerifyphonenumberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductsCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsVerifyphonenumberCall) 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.verifyphonenumberrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.verifyphonenumber" call. -// Any non-2xx status code is an error. Response headers are in either -// *VerifyPhoneNumberResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, error) { - 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 := &VerifyPhoneNumberResponse{ - 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 +// ProductsCustomBatchResponseEntry: A batch entry encoding a single non-batch +// products response. +type ProductsCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // Product: The inserted product. Only defined if the method is `insert` and if + // the request was successful. + Product *Product `json:"product,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsCredentialsCreateCall struct { - s *APIService - accountId int64 - accountcredentials *AccountCredentials - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Create: Uploads credentials for the Merchant Center account. If credentials -// already exist for this Merchant Center account and purpose, this method -// updates them. -// -// - accountId: The merchant id of the account these credentials belong to. -func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { - c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountcredentials = accountcredentials - return c +type ProductsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of products. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*Product `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { - c.ctx_ = ctx - return c +type ProductstatusesCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsCredentialsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsCredentialsCreateCall) 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.accountcredentials) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a single +// non-batch productstatuses request. +type ProductstatusesCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // Destinations: If set, only issues for the specified destinations are + // returned, otherwise only issues for the Shopping destination. + Destinations []string `json:"destinations,omitempty"` + // IncludeAttributes: Deprecated: Setting this field has no effect and + // attributes are never included. + IncludeAttributes bool `json:"includeAttributes,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "get" + Method string `json:"method,omitempty"` + // ProductId: The ID of the product whose status to get. + ProductId string `json:"productId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.credentials.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountCredentials.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, error) { - 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 := &AccountCredentials{ - 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 +func (s ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsLabelsCreateCall struct { - s *APIService - accountId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductstatusesCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Create: Creates a new label, not assigned to any account. -// -// - accountId: The id of the account this label belongs to. -func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { - c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountlabel = accountlabel - return c +func (s ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a single +// non-batch productstatuses response. +type ProductstatusesCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ProductStatus: The requested product status. Only defined if the request was + // successful. + ProductStatus *ProductStatus `json:"productStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { - c.ctx_ = ctx - return c +func (s ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductstatusesListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of products + // statuses. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ProductStatus `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsLabelsCreateCall) 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.accountlabel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") - urls += "?" + 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductstatusesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { - 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 := &AccountLabel{ - 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 -} +// Promotion: Represents a promotion. See the following articles for more +// details. * Promotions feed specification +// (https://support.google.com/merchants/answer/2906014) * Local promotions +// feed specification (https://support.google.com/merchants/answer/10146130) * +// Promotions on Buy on Google product data specification +// (https://support.google.com/merchants/answer/9173673) +type Promotion struct { + // Brand: Product filter by brand for the promotion. + Brand []string `json:"brand,omitempty"` + // BrandExclusion: Product filter by brand exclusion for the promotion. + BrandExclusion []string `json:"brandExclusion,omitempty"` + // ContentLanguage: Required. The content language used as part of the unique + // identifier. `en` content language is available for all target countries. + // `fr` content language is available for `CA` and `FR` target countries. `de` + // content language is available for `DE` target country. `nl` content language + // is available for `NL` target country. `it` content language is available for + // `IT` target country. `pt` content language is available for `BR` target + // country. `ja` content language is available for `JP` target country. `ko` + // content language is available for `KR` target country. + ContentLanguage string `json:"contentLanguage,omitempty"` + // CouponValueType: Required. Coupon value type for the promotion. + // + // Possible values: + // "COUPON_VALUE_TYPE_UNSPECIFIED" - Indicates that the coupon value type is + // unspecified. + // "MONEY_OFF" - Money off coupon value type. + // "PERCENT_OFF" - Percent off coupon value type. + // "BUY_M_GET_N_MONEY_OFF" - Buy M quantity, get N money off coupon value + // type. `buy_this_quantity` and `get_this_quantity` must be present. + // `money_off_amount` must also be present. + // "BUY_M_GET_N_PERCENT_OFF" - Buy M quantity, get N percent off coupon value + // type. `buy_this_quantity` and `get_this_quantity` must be present. + // `percent_off_percentage` must also be present. + // "BUY_M_GET_MONEY_OFF" - Buy M quantity, get money off. `buy_this_quantity` + // and `money_off_amount` must be present. + // "BUY_M_GET_PERCENT_OFF" - Buy M quantity, get money off. + // `buy_this_quantity` and `percent_off_percentage` must be present. + // "FREE_GIFT" - Free gift with description only. + // "FREE_GIFT_WITH_VALUE" - Free gift with value (description is optional). + // "FREE_GIFT_WITH_ITEM_ID" - Free gift with item ID (description is + // optional). + // "FREE_SHIPPING_STANDARD" - Standard free shipping coupon value type. + // "FREE_SHIPPING_OVERNIGHT" - Overnight free shipping coupon value type. + // "FREE_SHIPPING_TWO_DAY" - Two day free shipping coupon value type. + CouponValueType string `json:"couponValueType,omitempty"` + // FreeGiftDescription: Free gift description for the promotion. + FreeGiftDescription string `json:"freeGiftDescription,omitempty"` + // FreeGiftItemId: Free gift item ID for the promotion. + FreeGiftItemId string `json:"freeGiftItemId,omitempty"` + // FreeGiftValue: Free gift value for the promotion. + FreeGiftValue *PriceAmount `json:"freeGiftValue,omitempty"` + // GenericRedemptionCode: Generic redemption code for the promotion. To be used + // with the `offerType` field. + GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` + // GetThisQuantityDiscounted: The number of items discounted in the promotion. + GetThisQuantityDiscounted int64 `json:"getThisQuantityDiscounted,omitempty"` + // Id: Output only. The REST promotion ID to uniquely identify the promotion. + // Content API methods that operate on promotions take this as their + // `promotionId` parameter. The REST ID for a promotion is of the form + // channel:contentLanguage:targetCountry:promotionId The `channel` field has a + // value of "online", "in_store", or "online_in_store". + Id string `json:"id,omitempty"` + // ItemGroupId: Product filter by item group ID for the promotion. + ItemGroupId []string `json:"itemGroupId,omitempty"` + // ItemGroupIdExclusion: Product filter by item group ID exclusion for the + // promotion. + ItemGroupIdExclusion []string `json:"itemGroupIdExclusion,omitempty"` + // ItemId: Product filter by item ID for the promotion. + ItemId []string `json:"itemId,omitempty"` + // ItemIdExclusion: Product filter by item ID exclusion for the promotion. + ItemIdExclusion []string `json:"itemIdExclusion,omitempty"` + // LimitQuantity: Maximum purchase quantity for the promotion. + LimitQuantity int64 `json:"limitQuantity,omitempty"` + // LimitValue: Maximum purchase value for the promotion. + LimitValue *PriceAmount `json:"limitValue,omitempty"` + // LongTitle: Required. Long title for the promotion. + LongTitle string `json:"longTitle,omitempty"` + // MinimumPurchaseAmount: Minimum purchase amount for the promotion. + MinimumPurchaseAmount *PriceAmount `json:"minimumPurchaseAmount,omitempty"` + // MinimumPurchaseQuantity: Minimum purchase quantity for the promotion. + MinimumPurchaseQuantity int64 `json:"minimumPurchaseQuantity,omitempty"` + // MoneyBudget: Cost cap for the promotion. + MoneyBudget *PriceAmount `json:"moneyBudget,omitempty"` + // MoneyOffAmount: The money off amount offered in the promotion. + MoneyOffAmount *PriceAmount `json:"moneyOffAmount,omitempty"` + // OfferType: Required. Type of the promotion. + // + // Possible values: + // "OFFER_TYPE_UNSPECIFIED" - Unknown offer type. + // "NO_CODE" - Offer type without a code. + // "GENERIC_CODE" - Offer type with a code. + OfferType string `json:"offerType,omitempty"` + // OrderLimit: Order limit for the promotion. + OrderLimit int64 `json:"orderLimit,omitempty"` + // PercentOff: The percentage discount offered in the promotion. + PercentOff int64 `json:"percentOff,omitempty"` + // ProductApplicability: Required. Applicability of the promotion to either all + // products or only specific products. + // + // Possible values: + // "PRODUCT_APPLICABILITY_UNSPECIFIED" - Which products the promotion applies + // to is unknown. + // "ALL_PRODUCTS" - Applicable to all products. + // "SPECIFIC_PRODUCTS" - Applicable to only a single product or list of + // products. + ProductApplicability string `json:"productApplicability,omitempty"` + // ProductType: Product filter by product type for the promotion. + ProductType []string `json:"productType,omitempty"` + // ProductTypeExclusion: Product filter by product type exclusion for the + // promotion. + ProductTypeExclusion []string `json:"productTypeExclusion,omitempty"` + // PromotionDestinationIds: Destination ID for the promotion. + PromotionDestinationIds []string `json:"promotionDestinationIds,omitempty"` + // PromotionDisplayDates: String representation of the promotion display dates. + // Deprecated. Use `promotion_display_time_period` instead. + PromotionDisplayDates string `json:"promotionDisplayDates,omitempty"` + // PromotionDisplayTimePeriod: `TimePeriod` representation of the promotion's + // display dates. + PromotionDisplayTimePeriod *TimePeriod `json:"promotionDisplayTimePeriod,omitempty"` + // PromotionEffectiveDates: String representation of the promotion effective + // dates. Deprecated. Use `promotion_effective_time_period` instead. + PromotionEffectiveDates string `json:"promotionEffectiveDates,omitempty"` + // PromotionEffectiveTimePeriod: Required. `TimePeriod` representation of the + // promotion's effective dates. + PromotionEffectiveTimePeriod *TimePeriod `json:"promotionEffectiveTimePeriod,omitempty"` + // PromotionId: Required. The user provided promotion ID to uniquely identify + // the promotion. + PromotionId string `json:"promotionId,omitempty"` + // PromotionStatus: Output only. The current status of the promotion. + PromotionStatus *PromotionPromotionStatus `json:"promotionStatus,omitempty"` + // PromotionUrl: URL to the page on the merchant's site where the promotion + // shows. Local Inventory ads promotions throw an error if no promo url is + // included. URL is used to confirm that the promotion is valid and can be + // redeemed. + PromotionUrl string `json:"promotionUrl,omitempty"` + // RedemptionChannel: Required. Redemption channel for the promotion. At least + // one channel is required. + // + // Possible values: + // "REDEMPTION_CHANNEL_UNSPECIFIED" - Indicates that the channel is + // unspecified. + // "IN_STORE" - Indicates that the channel is in store. + // "ONLINE" - Indicates that the channel is online. + RedemptionChannel []string `json:"redemptionChannel,omitempty"` + // ShippingServiceNames: Shipping service names for the promotion. + ShippingServiceNames []string `json:"shippingServiceNames,omitempty"` + // StoreApplicability: Whether the promotion applies to all stores, or only + // specified stores. Local Inventory ads promotions throw an error if no store + // applicability is included. An INVALID_ARGUMENT error is thrown if + // store_applicability is set to ALL_STORES and store_code or + // score_code_exclusion is set to a value. + // + // Possible values: + // "STORE_APPLICABILITY_UNSPECIFIED" - Which store codes the promotion + // applies to is unknown. + // "ALL_STORES" - Promotion applies to all stores. + // "SPECIFIC_STORES" - Promotion applies to only the specified stores. + StoreApplicability string `json:"storeApplicability,omitempty"` + // StoreCode: Store codes to include for the promotion. + StoreCode []string `json:"storeCode,omitempty"` + // StoreCodeExclusion: Store codes to exclude for the promotion. + StoreCodeExclusion []string `json:"storeCodeExclusion,omitempty"` + // TargetCountry: Required. The target country used as part of the unique + // identifier. Can be `AU`, `CA`, `DE`, `FR`, `GB`, `IN`, `US`, `BR`, `ES`, + // `NL`, `JP`, `IT` or `KR`. + TargetCountry string `json:"targetCountry,omitempty"` -type AccountsLabelsDeleteCall struct { - s *APIService - accountId int64 - labelId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Brand") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Delete: Deletes a label and removes it from all accounts to which it was -// assigned. -// -// - accountId: The id of the account that owns the label. -// - labelId: The id of the label to delete. -func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { - c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.labelId = labelId - return c +func (s Promotion) MarshalJSON() ([]byte, error) { + type NoMethod Promotion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// PromotionPromotionStatus: The status of the promotion. +type PromotionPromotionStatus struct { + // CreationDate: Date on which the promotion has been created in ISO 8601 + // (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for + // example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" + CreationDate string `json:"creationDate,omitempty"` + // DestinationStatuses: The intended destinations for the promotion. + DestinationStatuses []*PromotionPromotionStatusDestinationStatus `json:"destinationStatuses,omitempty"` + // LastUpdateDate: Date on which the promotion status has been last updated in + // ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and + // offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" + LastUpdateDate string `json:"lastUpdateDate,omitempty"` + // PromotionIssue: A list of issues associated with the promotion. + PromotionIssue []*PromotionPromotionStatusPromotionIssue `json:"promotionIssue,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreationDate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreationDate") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { - c.ctx_ = ctx - return c +func (s PromotionPromotionStatus) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// PromotionPromotionStatusDestinationStatus: The destination status of the +// promotion. +type PromotionPromotionStatusDestinationStatus struct { + // Destination: The name of the destination. + Destination string `json:"destination,omitempty"` + // Status: The status for the specified destination. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown promotion state. + // "IN_REVIEW" - The promotion is under review. + // "REJECTED" - The promotion is disapproved + // "LIVE" - The promotion is approved and active. + // "STOPPED" - The promotion is stopped by merchant. + // "EXPIRED" - The promotion is no longer active. + // "PENDING" - The promotion is not stopped, and all reviews are approved, + // but the active date is in the future. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destination") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Destination") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s PromotionPromotionStatusDestinationStatus) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatusDestinationStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.delete" call. -func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// PromotionPromotionStatusPromotionIssue: The issue associated with the +// promotion. +type PromotionPromotionStatusPromotionIssue struct { + // Code: Code of the issue. + Code string `json:"code,omitempty"` + // Detail: Explanation of the issue. + Detail string `json:"detail,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsLabelsListCall struct { - s *APIService - accountId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s PromotionPromotionStatusPromotionIssue) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatusPromotionIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the labels assigned to an account. -// -// - accountId: The account id for whose labels are to be listed. -func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { - c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - return c -} +// PubsubNotificationSettings: Settings for Pub/Sub notifications, all methods +// require that the caller is a direct user of the merchant center account. +type PubsubNotificationSettings struct { + // CloudTopicName: Cloud pub/sub topic to which notifications are sent + // (read-only). + CloudTopicName string `json:"cloudTopicName,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#pubsubNotificationSettings" + Kind string `json:"kind,omitempty"` + // RegisteredEvents: List of event types. Acceptable values are: - + // "orderPendingShipment" + RegisteredEvents []string `json:"registeredEvents,omitempty"` -// PageSize sets the optional parameter "pageSize": The maximum number of -// labels to return. The service may return fewer than this value. If -// unspecified, at most 50 labels will be returned. The maximum value is 1000; -// values above 1000 will be coerced to 1000. -func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudTopicName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudTopicName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListAccountLabels` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListAccountLabels` must match the call that provided the page token. -func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s PubsubNotificationSettings) MarshalJSON() ([]byte, error) { + type NoMethod PubsubNotificationSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type RateGroup struct { + // ApplicableShippingLabels: A list of shipping labels defining the products to + // which this rate group applies to. This is a disjunction: only one of the + // labels has to match for the rate group to apply. May only be empty for the + // last rate group of a service. Required. + ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` + // CarrierRates: A list of carrier rates that can be referred to by `mainTable` + // or `singleValue`. + CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` + // MainTable: A table defining the rate group, when `singleValue` is not + // expressive enough. Can only be set if `singleValue` is not set. + MainTable *Table `json:"mainTable,omitempty"` + // Name: Name of the rate group. Optional. If set has to be unique within + // shipping service. + Name string `json:"name,omitempty"` + // SingleValue: The value of the rate group (for example, flat rate $10). Can + // only be set if `mainTable` and `subtables` are not set. + SingleValue *Value `json:"singleValue,omitempty"` + // Subtables: A list of subtables referred to by `mainTable`. Can only be set + // if `mainTable` is set. + Subtables []*Table `json:"subtables,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicableShippingLabels") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApplicableShippingLabels") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { - c.ifNoneMatch_ = entityTag - return c +func (s RateGroup) MarshalJSON() ([]byte, error) { + type NoMethod RateGroup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { - c.ctx_ = ctx - return c +// Recommendation: Recommendations are suggested ways to improve your merchant +// account's performance. For example, to engage with a feature, or start using +// a new Google product. +type Recommendation struct { + // AdditionalCallToAction: Output only. CTAs of this recommendation. Repeated. + AdditionalCallToAction []*RecommendationCallToAction `json:"additionalCallToAction,omitempty"` + // AdditionalDescriptions: Output only. List of additional localized + // descriptions for a recommendation. Localication uses the `languageCode` + // field in `GenerateRecommendations` requests. Not all description types are + // guaranteed to be present and we recommend to rely on default description. + AdditionalDescriptions []*RecommendationDescription `json:"additionalDescriptions,omitempty"` + // Creative: Output only. Any creatives attached to the recommendation. + // Repeated. + Creative []*RecommendationCreative `json:"creative,omitempty"` + // DefaultCallToAction: Optional. Default CTA of the recommendation. + DefaultCallToAction *RecommendationCallToAction `json:"defaultCallToAction,omitempty"` + // DefaultDescription: Optional. Localized recommendation description. The + // localization the {@link `GenerateRecommendationsRequest.language_code`} + // field in {@link `GenerateRecommendationsRequest`} requests. + DefaultDescription string `json:"defaultDescription,omitempty"` + // NumericalImpact: Optional. A numerical score of the impact from the + // recommendation's description. For example, a recommendation might suggest an + // upward trend in sales for a certain product. Higher number means larger + // impact. + NumericalImpact int64 `json:"numericalImpact,omitempty"` + // Paid: Optional. Indicates whether a user needs to pay when they complete the + // user journey suggested by the recommendation. + Paid bool `json:"paid,omitempty"` + // RecommendationName: Optional. Localized recommendation name. The + // localization uses the {@link `GenerateRecommendationsRequest.language_code`} + // field in {@link `GenerateRecommendationsRequest`} requests. + RecommendationName string `json:"recommendationName,omitempty"` + // SubType: Optional. Subtype of the recommendations. Only applicable when + // multiple recommendations can be generated per type, and is used as an + // identifier of recommendation under the same recommendation type. + SubType string `json:"subType,omitempty"` + // Title: Optional. Localized Recommendation Title. Localization uses the + // {@link `GenerateRecommendationsRequest.language_code`} field in {@link + // `GenerateRecommendationsRequest`} requests. + Title string `json:"title,omitempty"` + // Type: Output only. Type of the recommendation. List of currently available + // recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - + // OPPORTUNITY_CREATE_EMAIL_CAMPAIGN + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalCallToAction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalCallToAction") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Recommendation) MarshalJSON() ([]byte, error) { + type NoMethod Recommendation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// RecommendationCallToAction: Call to action (CTA) that explains how a +// merchant can implement this recommendation +type RecommendationCallToAction struct { + // Intent: Output only. Intent of the action. This value describes the intent + // (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from + // recommendation to recommendation. This value can change over time for the + // same recommendation. Currently available intent values: - + // OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create + // a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: + // Opens a user journey where they can create a collection + // (https://support.google.com/merchants/answer/9703228) for their Merchant + // account. (No default URL) + Intent string `json:"intent,omitempty"` + // LocalizedText: Output only. Localized text of the CTA. Optional. + LocalizedText string `json:"localizedText,omitempty"` + // Uri: Optional. URL of the CTA. This field will only be set for some + // recommendations where there is a suggested landing URL. Otherwise it will be + // set to an empty string. We recommend developers to use their own custom + // landing page according to the description of the intent field above when + // this uri field is empty. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Intent") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Intent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.labels.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAccountLabelsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, 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 := &ListAccountLabelsResponse{ - 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 +func (s RecommendationCallToAction) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationCallToAction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// RecommendationCreative: Creative is a multimedia attachment to +// recommendation that can be used on the frontend. +type RecommendationCreative struct { + // Type: Type of the creative. + // + // Possible values: + // "CREATIVE_TYPE_UNSPECIFIED" - Default value. If provided, shall be + // considered invalid. + // "VIDEO" - Video creatives. + // "PHOTO" - Photo creatives. + Type string `json:"type,omitempty"` + // Uri: URL of the creative. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsLabelsPatchCall struct { - s *APIService - accountId int64 - labelId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RecommendationCreative) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationCreative + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Patch: Updates a label. -// -// - accountId: The id of the account this label belongs to. -// - labelId: The id of the label to update. -func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { - c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.labelId = labelId - c.accountlabel = accountlabel - return c +// RecommendationDescription: Google-provided description for the +// recommendation. +type RecommendationDescription struct { + // Text: Output only. Text of the description. + Text string `json:"text,omitempty"` + // Type: Output only. Type of the description. + // + // Possible values: + // "DESCRIPTION_TYPE_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "SHORT" - Short description. + // "LONG" - Long description. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Text") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Text") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RecommendationDescription) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationDescription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { - c.ctx_ = ctx - return c -} +// Region: Represents a geographic region that you can use as a target with +// both the `RegionalInventory` and `ShippingSettings` services. You can define +// regions as collections of either postal codes or, in some countries, using +// predefined geotargets. +type Region struct { + // DisplayName: The display name of the region. + DisplayName string `json:"displayName,omitempty"` + // GeotargetArea: A list of geotargets that defines the region area. + GeotargetArea *RegionGeoTargetArea `json:"geotargetArea,omitempty"` + // MerchantId: Output only. Immutable. Merchant that owns the region. + MerchantId int64 `json:"merchantId,omitempty,string"` + // PostalCodeArea: A list of postal codes that defines the region area. + PostalCodeArea *RegionPostalCodeArea `json:"postalCodeArea,omitempty"` + // RegionId: Output only. Immutable. The ID uniquely identifying each region. + RegionId string `json:"regionId,omitempty"` + // RegionalInventoryEligible: Output only. Indicates if the region is eligible + // to use in the Regional Inventory configuration. + RegionalInventoryEligible bool `json:"regionalInventoryEligible,omitempty"` + // ShippingEligible: Output only. Indicates if the region is eligible to use in + // the Shipping Services configuration. + ShippingEligible bool `json:"shippingEligible,omitempty"` -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsLabelsPatchCall) 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.accountlabel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") - urls += "?" + 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s Region) MarshalJSON() ([]byte, error) { + type NoMethod Region + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { - 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 := &AccountLabel{ - 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 +// RegionGeoTargetArea: A list of geotargets that defines the region area. +type RegionGeoTargetArea struct { + // GeotargetCriteriaIds: Required. A non-empty list of location IDs + // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). They + // must all be of the same location type (e.g., state). + GeotargetCriteriaIds googleapi.Int64s `json:"geotargetCriteriaIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "GeotargetCriteriaIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GeotargetCriteriaIds") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsReturncarrierCreateCall struct { - s *APIService - accountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RegionGeoTargetArea) MarshalJSON() ([]byte, error) { + type NoMethod RegionGeoTargetArea + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Create: Links return carrier to a merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { - c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountreturncarrier = accountreturncarrier - return c +// RegionPostalCodeArea: A list of postal codes that defines the region area. +// Note: All regions defined using postal codes are accessible via the +// account's `ShippingSettings.postalCodeGroups` resource. +type RegionPostalCodeArea struct { + // PostalCodes: Required. A range of postal codes. + PostalCodes []*RegionPostalCodeAreaPostalCodeRange `json:"postalCodes,omitempty"` + // RegionCode: Required. CLDR territory code or the country the postal code + // group applies to. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PostalCodes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RegionPostalCodeArea) MarshalJSON() ([]byte, error) { + type NoMethod RegionPostalCodeArea + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { - c.ctx_ = ctx - return c +// RegionPostalCodeAreaPostalCodeRange: A range of postal codes that defines +// the region area. +type RegionPostalCodeAreaPostalCodeRange struct { + // Begin: Required. A postal code or a pattern of the form prefix* denoting the + // inclusive lower bound of the range defining the area. Examples values: + // "94108", "9410*", "9*". + Begin string `json:"begin,omitempty"` + // End: Optional. A postal code or a pattern of the form prefix* denoting the + // inclusive upper bound of the range defining the area. It must have the same + // length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code + // then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin + // is a pattern then postalCodeRangeEnd must be a pattern with the same prefix + // length. Optional: if not set, then the area is defined as being all the + // postal codes matching postalCodeRangeBegin. + End string `json:"end,omitempty"` + // ForceSendFields is a list of field names (e.g. "Begin") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Begin") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RegionPostalCodeAreaPostalCodeRange) MarshalJSON() ([]byte, error) { + type NoMethod RegionPostalCodeAreaPostalCodeRange + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierCreateCall) 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.accountreturncarrier) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") - urls += "?" + 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} +// RegionalInventory: Regional inventory resource. contains the regional name +// and all attributes which are overridden for the specified region. +type RegionalInventory struct { + // Availability: The availability of the product. + Availability string `json:"availability,omitempty"` + // CustomAttributes: A list of custom (merchant-provided) attributes. It can + // also be used for submitting any attribute of the feed specification in its + // generic form. + CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalInventory". + Kind string `json:"kind,omitempty"` + // Price: The price of the product. + Price *Price `json:"price,omitempty"` + // RegionId: The ID uniquely identifying each region. + RegionId string `json:"regionId,omitempty"` + // SalePrice: The sale price of the product. Mandatory if + // `sale_price_effective_date` is defined. + SalePrice *Price `json:"salePrice,omitempty"` + // SalePriceEffectiveDate: A date range represented by a pair of ISO 8601 dates + // separated by a space, comma, or slash. Both dates might be specified as + // 'null' if undecided. + SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` -// Do executes the "content.accounts.returncarrier.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - 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 := &AccountReturnCarrier{ - 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 + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Availability") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Availability") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsReturncarrierDeleteCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RegionalInventory) MarshalJSON() ([]byte, error) { + type NoMethod RegionalInventory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Delete: Delete a return carrier in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { - c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.carrierAccountId = carrierAccountId - return c +type RegionalinventoryCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*RegionalinventoryCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RegionalinventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { - c.ctx_ = ctx - return c +// RegionalinventoryCustomBatchRequestEntry: A batch entry encoding a single +// non-batch regional inventory request. +type RegionalinventoryCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "insert" + Method string `json:"method,omitempty"` + // ProductId: The ID of the product for which to update price and availability. + ProductId string `json:"productId,omitempty"` + // RegionalInventory: Price and availability of the product. + RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RegionalinventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type RegionalinventoryCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*RegionalinventoryCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalinventoryCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounts.returncarrier.delete" call. -func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s RegionalinventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsReturncarrierListCall struct { - s *APIService - accountId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// RegionalinventoryCustomBatchResponseEntry: A batch entry encoding a single +// non-batch regional inventory response. +type RegionalinventoryCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalinventoryCustomBatchResponseEntry". + Kind string `json:"kind,omitempty"` + // RegionalInventory: Price and availability of the product. + RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// List: Lists available return carriers in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { - c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - return c +func (s RegionalinventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RenderAccountIssuesRequestPayload: The payload for configuring how the +// content should be rendered. +type RenderAccountIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered + // HTML text. + ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form should be + // handled. If not provided, actions will be returned as links that points + // merchant to Merchant Center where they can request the action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will + // never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center where they + // can request the action. Provides easier to implement alternative to + // `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition + // for each complex action. Your application needs to display this content and + // input form to the merchant before they can request processing of the action. + // To start the action, your application needs to call the `triggeraction` + // method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentOption") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RenderAccountIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesRequestPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RenderAccountIssuesResponse: Response containing support content and actions +// for listed account issues. +type RenderAccountIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains + // a link to a page where merchant can bring their appeal to an external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If the ADR is present, it MUST be available to the merchant on the page that + // shows the list with their account issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + // Issues: List of account issues for a given account. This list can be shown + // with compressed, expandable items. In the compressed form, the title and + // impact should be shown for each issue. Once the issue is expanded, the + // detailed content and available actions should be rendered. + Issues []*AccountIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AlternateDisputeResolution") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RenderAccountIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { - c.ifNoneMatch_ = entityTag - return c +// RenderProductIssuesRequestPayload: The payload for configuring how the +// content should be rendered. +type RenderProductIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered + // HTML text. + ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form should be + // handled. If not provided, actions will be returned as links that points + // merchant to Merchant Center where they can request the action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will + // never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center where they + // can request the action. Provides easier to implement alternative to + // `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition + // for each complex action. Your application needs to display this content and + // input form to the merchant before they can request processing of the action. + // To start the action, your application needs to call the `triggeraction` + // method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentOption") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { - c.ctx_ = ctx - return c +func (s RenderProductIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesRequestPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// RenderProductIssuesResponse: Response containing support content and actions +// for listed product issues. +type RenderProductIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains + // a link to a page where merchant can bring their appeal to an external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If present, the link should be shown on the same page as the list of issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + // Issues: List of issues for a given product. This list can be shown with + // compressed, expandable items. In the compressed form, the title and impact + // should be shown for each issue. Once the issue is expanded, the detailed + // content and available actions should be rendered. + Issues []*ProductIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AlternateDisputeResolution") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s RenderProductIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.returncarrier.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAccountReturnCarrierResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - 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 := &ListAccountReturnCarrierResponse{ - 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 +// ReportInteractionRequest: Request to report interactions on a +// recommendation. +type ReportInteractionRequest struct { + // InteractionType: Required. Type of the interaction that is reported, for + // example INTERACTION_CLICK. + // + // Possible values: + // "INTERACTION_TYPE_UNSPECIFIED" - Default value. If provided, the service + // will throw ApiError with description "Required parameter: interactionType". + // "INTERACTION_DISMISS" - When a recommendation is dismissed. + // "INTERACTION_CLICK" - When a recommendation is clicked. + InteractionType string `json:"interactionType,omitempty"` + // ResponseToken: Required. Token of the response when recommendation was + // returned. + ResponseToken string `json:"responseToken,omitempty"` + // Subtype: Optional. Subtype of the recommendations this interaction happened + // on. This field must be set only to the value that is returned by {@link + // `RecommendationsService.GenerateRecommendations`} call. + Subtype string `json:"subtype,omitempty"` + // Type: Required. Type of the recommendations on which this interaction + // happened. This field must be set only to the value that is returned by + // {@link `GenerateRecommendationsResponse`} call. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "InteractionType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InteractionType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountsReturncarrierPatchCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ReportInteractionRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReportInteractionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Patch: Updates a return carrier in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { - c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.carrierAccountId = carrierAccountId - c.accountreturncarrier = accountreturncarrier - return c +// ReportRow: Result row returned from the search query. +type ReportRow struct { + // BestSellers: Best sellers fields requested by the merchant in the query. + // Field values are only set if the merchant queries + // `BestSellersProductClusterView` or `BestSellersBrandView`. + BestSellers *BestSellers `json:"bestSellers,omitempty"` + // Brand: Brand fields requested by the merchant in the query. Field values are + // only set if the merchant queries `BestSellersBrandView`. + Brand *Brand `json:"brand,omitempty"` + // CompetitiveVisibility: Competitive visibility fields requested by the + // merchant in the query. Field values are only set if the merchant queries + // `CompetitiveVisibilityTopMerchantView`, `CompetitiveVisibilityBenchmarkView` + // or `CompetitiveVisibilityCompetitorView`. + CompetitiveVisibility *CompetitiveVisibility `json:"competitiveVisibility,omitempty"` + // Metrics: Metrics requested by the merchant in the query. Metric values are + // only set for metrics requested explicitly in the query. + Metrics *Metrics `json:"metrics,omitempty"` + // PriceCompetitiveness: Price competitiveness fields requested by the merchant + // in the query. Field values are only set if the merchant queries + // `PriceCompetitivenessProductView`. + PriceCompetitiveness *PriceCompetitiveness `json:"priceCompetitiveness,omitempty"` + // PriceInsights: Price insights fields requested by the merchant in the query. + // Field values are only set if the merchant queries + // `PriceInsightsProductView`. + PriceInsights *PriceInsights `json:"priceInsights,omitempty"` + // ProductCluster: Product cluster fields requested by the merchant in the + // query. Field values are only set if the merchant queries + // `BestSellersProductClusterView`. + ProductCluster *ProductCluster `json:"productCluster,omitempty"` + // ProductView: Product fields requested by the merchant in the query. Field + // values are only set if the merchant queries `ProductView`. + ProductView *ProductView `json:"productView,omitempty"` + // Segments: Segmentation dimensions requested by the merchant in the query. + // Dimension values are only set for dimensions requested explicitly in the + // query. + Segments *Segments `json:"segments,omitempty"` + // TopicTrends: Topic trends + // (https://support.google.com/merchants/answer/13542370) fields requested by + // the merchant in the query. Field values are only set if the merchant queries + // `TopicTrendsView`. + TopicTrends *TopicTrends `json:"topicTrends,omitempty"` + // ForceSendFields is a list of field names (e.g. "BestSellers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BestSellers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReportRow) MarshalJSON() ([]byte, error) { + type NoMethod ReportRow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { - c.ctx_ = ctx - return c +// RequestPhoneVerificationRequest: Request message for the +// RequestPhoneVerification method. +type RequestPhoneVerificationRequest struct { + // LanguageCode: Language code IETF BCP 47 syntax + // (https://tools.ietf.org/html/bcp47) (for example, en-US). Language code is + // used to provide localized `SMS` and `PHONE_CALL`. Default language used is + // en-US if not provided. + LanguageCode string `json:"languageCode,omitempty"` + // PhoneNumber: Phone number to be verified. + PhoneNumber string `json:"phoneNumber,omitempty"` + // PhoneRegionCode: Required. Two letter country code for the phone number, for + // example `CA` for Canadian numbers. See the ISO 3166-1 alpha-2 + // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // officially assigned codes. + PhoneRegionCode string `json:"phoneRegionCode,omitempty"` + // PhoneVerificationMethod: Verification method to receive verification code. + // + // Possible values: + // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. + // "SMS" - Receive verification code by SMS. + // "PHONE_CALL" - Receive verification code by phone call. + PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` + // ForceSendFields is a list of field names (e.g. "LanguageCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LanguageCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RequestPhoneVerificationRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestPhoneVerificationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierPatchCall) 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.accountreturncarrier) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") - urls += "?" + 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} +// RequestPhoneVerificationResponse: Response message for the +// RequestPhoneVerification method. +type RequestPhoneVerificationResponse struct { + // VerificationId: The verification ID to use in subsequent calls to + // `verifyphonenumber`. + VerificationId string `json:"verificationId,omitempty"` -// Do executes the "content.accounts.returncarrier.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, 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 := &AccountReturnCarrier{ - 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 + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "VerificationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VerificationId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccountstatusesCustombatchCall struct { - s *APIService - accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RequestPhoneVerificationResponse) MarshalJSON() ([]byte, error) { + type NoMethod RequestPhoneVerificationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Custombatch: Retrieves multiple Merchant Center account statuses in a single -// request. -func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { - c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountstatusescustombatchrequest = accountstatusescustombatchrequest - return c +// RequestReviewFreeListingsRequest: Request message for the +// RequestReviewFreeListings Program method. +type RequestReviewFreeListingsRequest struct { + // RegionCode: The code ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which + // review is to be requested. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "RegionCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RequestReviewFreeListingsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestReviewFreeListingsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { - c.ctx_ = ctx - return c +// RequestReviewShoppingAdsRequest: Request message for the +// RequestReviewShoppingAds program method. +type RequestReviewShoppingAdsRequest struct { + // RegionCode: The code ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which + // review is to be requested. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "RegionCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RequestReviewShoppingAdsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestReviewShoppingAdsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesCustombatchCall) 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.accountstatusescustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ReturnAddress: Return address resource. +type ReturnAddress struct { + // Address: Required. The address. + Address *ReturnAddressAddress `json:"address,omitempty"` + // Country: Required. The country of sale where the return address is + // applicable. + Country string `json:"country,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnAddress" + Kind string `json:"kind,omitempty"` + // Label: Required. The user-defined label of the return address. For the + // default address, use the label "default". + Label string `json:"label,omitempty"` + // PhoneNumber: Required. The merchant's contact phone number regarding the + // return. + PhoneNumber string `json:"phoneNumber,omitempty"` + // ReturnAddressId: Return address ID generated by Google. + ReturnAddressId string `json:"returnAddressId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accountstatuses.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccountstatusesCustomBatchResponse{ - 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 +func (s ReturnAddress) MarshalJSON() ([]byte, error) { + type NoMethod ReturnAddress + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountstatusesGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReturnAddressAddress struct { + // Country: CLDR country code (for example, "US"). + Country string `json:"country,omitempty"` + // Locality: City, town or commune. May also include dependent localities or + // sublocalities (for example, neighborhoods or suburbs). + Locality string `json:"locality,omitempty"` + // PostalCode: Postal code or ZIP (for example, "94043"). + PostalCode string `json:"postalCode,omitempty"` + // RecipientName: Name of the recipient to address returns to. + RecipientName string `json:"recipientName,omitempty"` + // Region: Top-level administrative subdivision of the country. For example, a + // state like California ("CA") or a province like Quebec ("QC"). + Region string `json:"region,omitempty"` + // StreetAddress: Street-level part of the address. May be up to two lines, + // each line specified as an array element. + StreetAddress []string `json:"streetAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Country") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues -// are returned for multi-client accounts. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { - c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +func (s ReturnAddressAddress) MarshalJSON() ([]byte, error) { + type NoMethod ReturnAddressAddress + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c +// ReturnPolicy: Return policy resource. +type ReturnPolicy struct { + // Country: Required. The country of sale where the return policy is + // applicable. + Country string `json:"country,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnPolicy" + Kind string `json:"kind,omitempty"` + // Label: Required. The user-defined label of the return policy. For the + // default policy, use the label "default". + Label string `json:"label,omitempty"` + // Name: Required. The name of the policy as shown in Merchant Center. + Name string `json:"name,omitempty"` + // NonFreeReturnReasons: Return reasons that will incur return fees. + NonFreeReturnReasons []string `json:"nonFreeReturnReasons,omitempty"` + // Policy: Required. The policy. + Policy *ReturnPolicyPolicy `json:"policy,omitempty"` + // ReturnPolicyId: Return policy ID generated by Google. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ReturnShippingFee: The return shipping fee that will apply to non free + // return reasons. + ReturnShippingFee *Price `json:"returnShippingFee,omitempty"` + // SeasonalOverrides: An optional list of seasonal overrides. + SeasonalOverrides []*ReturnPolicySeasonalOverride `json:"seasonalOverrides,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Country") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Country") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReturnPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c +// ReturnPolicyOnline: Return policy online object. This is currently used to +// represent return policies for ads and free listings programs. +type ReturnPolicyOnline struct { + // Countries: The countries of sale where the return policy is applicable. The + // values must be a valid 2 letter ISO 3166 code, e.g. "US". + Countries []string `json:"countries,omitempty"` + // ItemConditions: The item conditions that are accepted for returns. This is + // required to not be empty unless the type of return policy is noReturns. + // + // Possible values: + // "ITEM_CONDITION_UNSPECIFIED" - Default value. This value is unused. + // "NEW" - New. + // "USED" - Used. + ItemConditions []string `json:"itemConditions,omitempty"` + // Label: The unique user-defined label of the return policy. The same label + // cannot be used in different return policies for the same country. Policies + // with the label 'default' will apply to all products, unless a product + // specifies a return_policy_label attribute. + Label string `json:"label,omitempty"` + // Name: The name of the policy as shown in Merchant Center. + Name string `json:"name,omitempty"` + // Policy: The return policy. + Policy *ReturnPolicyOnlinePolicy `json:"policy,omitempty"` + // RestockingFee: The restocking fee that applies to all return reason + // categories. This would be treated as a free restocking fee if the value is + // not set. + RestockingFee *ReturnPolicyOnlineRestockingFee `json:"restockingFee,omitempty"` + // ReturnMethods: The return methods of how customers can return an item. This + // value is required to not be empty unless the type of return policy is + // noReturns. + // + // Possible values: + // "RETURN_METHOD_UNSPECIFIED" - Default value. This value is unused. + // "BY_MAIL" - By mail. + // "IN_STORE" - In store. + // "AT_A_KIOSK" - At a kiosk. + ReturnMethods []string `json:"returnMethods,omitempty"` + // ReturnPolicyId: Output only. Return policy ID generated by Google. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ReturnPolicyUri: The return policy uri. This can used by Google to do a + // sanity check for the policy. + ReturnPolicyUri string `json:"returnPolicyUri,omitempty"` + // ReturnReasonCategoryInfo: The return reason category information. This + // required to not be empty unless the type of return policy is noReturns. + ReturnReasonCategoryInfo []*ReturnPolicyOnlineReturnReasonCategoryInfo `json:"returnReasonCategoryInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Countries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Countries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { - c.ctx_ = ctx - return c +func (s ReturnPolicyOnline) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnline + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// ReturnPolicyOnlinePolicy: The available policies. +type ReturnPolicyOnlinePolicy struct { + // Days: The number of days items can be returned after delivery, where one day + // is defined to be 24 hours after the delivery timestamp. Required for + // `numberOfDaysAfterDelivery` returns. + Days int64 `json:"days,omitempty,string"` + // Type: Policy type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. This value is unused. + // "NUMBER_OF_DAYS_AFTER_DELIVERY" - Number of days after a return is + // delivered. + // "NO_RETURNS" - No returns. + // "LIFETIME_RETURNS" - Life time returns. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Days") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Days") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReturnPolicyOnlinePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlinePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ReturnPolicyOnlineRestockingFee: The restocking fee. This can either be a +// fixed fee or a micro percent. +type ReturnPolicyOnlineRestockingFee struct { + // FixedFee: Fixed restocking fee. + FixedFee *PriceAmount `json:"fixedFee,omitempty"` + // MicroPercent: Percent of total price in micros. 15,000,000 means 15% of the + // total price would be charged. + MicroPercent int64 `json:"microPercent,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedFee") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FixedFee") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accountstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountStatus.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { - 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 := &AccountStatus{ - 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 +func (s ReturnPolicyOnlineRestockingFee) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineRestockingFee + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// ReturnPolicyOnlineReturnReasonCategoryInfo: The return reason category info +// wrapper. +type ReturnPolicyOnlineReturnReasonCategoryInfo struct { + // ReturnLabelSource: The corresponding return label source. + // + // Possible values: + // "RETURN_LABEL_SOURCE_UNSPECIFIED" - Default value. This value is unused. + // "DOWNLOAD_AND_PRINT" - Download and print the label. + // "IN_THE_BOX" - Label in the box. + // "CUSTOMER_RESPONSIBILITY" - Customers' responsibility to get the label. + ReturnLabelSource string `json:"returnLabelSource,omitempty"` + // ReturnReasonCategory: The return reason category. + // + // Possible values: + // "RETURN_REASON_CATEGORY_UNSPECIFIED" - Default value. This value is + // unused. + // "BUYER_REMORSE" - Buyer remorse. + // "ITEM_DEFECT" - Item defect. + ReturnReasonCategory string `json:"returnReasonCategory,omitempty"` + // ReturnShippingFee: The corresponding return shipping fee. This is only + // applicable when returnLabelSource is not the customer's responsibility. + ReturnShippingFee *ReturnPolicyOnlineReturnShippingFee `json:"returnShippingFee,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReturnLabelSource") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReturnLabelSource") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// List: Lists the statuses of the sub-accounts in your Merchant Center -// account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { - c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +func (s ReturnPolicyOnlineReturnReasonCategoryInfo) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineReturnReasonCategoryInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c +// ReturnPolicyOnlineReturnShippingFee: The return shipping fee. This can +// either be a fixed fee or a boolean to indicate that the customer pays the +// actual shipping cost. +type ReturnPolicyOnlineReturnShippingFee struct { + // FixedFee: Fixed return shipping fee amount. This value is only applicable + // when type is FIXED. We will treat the return shipping fee as free if type is + // FIXED and this value is not set. + FixedFee *PriceAmount `json:"fixedFee,omitempty"` + // Type: Type of return shipping fee. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. This value is unused. + // "FIXED" - The return shipping fee is a fixed value. + // "CUSTOMER_PAYING_ACTUAL_FEE" - Customer will pay the actual return + // shipping fee. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedFee") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FixedFee") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// account statuses to return in the response, used for paging. -func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s ReturnPolicyOnlineReturnShippingFee) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineReturnShippingFee + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { - c.urlParams_.Set("name", name) - return c +type ReturnPolicyPolicy struct { + // LastReturnDate: Required. Last day for returning the items. In ISO 8601 + // format. When specifying the return window like this, set the policy type to + // "lastReturnDate". Use this for seasonal overrides only. + LastReturnDate string `json:"lastReturnDate,omitempty"` + // NumberOfDays: The number of days items can be returned after delivery, where + // one day is defined to be 24 hours after the delivery timestamp. When + // specifying the return window like this, set the policy type to + // "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, + // 270 and 365 for the default policy. Additional policies further allow 14, + // 15, 21 and 28 days, but note that for most items a minimum of 30 days is + // required for returns. Exceptions may be made for electronics. A policy of + // less than 30 days can only be applied to those items. + NumberOfDays int64 `json:"numberOfDays,omitempty,string"` + // Type: Policy type. Use "lastReturnDate" for seasonal overrides only. Note + // that for most items a minimum of 30 days is required for returns. Exceptions + // may be made for electronics or non-returnable items such as food, + // perishables, and living things. A policy of less than 30 days can only be + // applied to those items. Acceptable values are: - "lastReturnDate" - + // "lifetimeReturns" - "noReturns" - "numberOfDaysAfterDelivery" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastReturnDate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LastReturnDate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s ReturnPolicyPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type ReturnPolicySeasonalOverride struct { + // EndDate: Required. Last day on which the override applies. In ISO 8601 + // format. + EndDate string `json:"endDate,omitempty"` + // Name: Required. The name of the seasonal override as shown in Merchant + // Center. + Name string `json:"name,omitempty"` + // Policy: Required. The policy which is in effect during that time. + Policy *ReturnPolicyPolicy `json:"policy,omitempty"` + // StartDate: Required. First day on which the override applies. In ISO 8601 + // format. + StartDate string `json:"startDate,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndDate") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { - c.ifNoneMatch_ = entityTag - return c +func (s ReturnPolicySeasonalOverride) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicySeasonalOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { - c.ctx_ = ctx - return c +type ReturnaddressCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ReturnaddressCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnaddressCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnaddressCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The Merchant Center account ID. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "delete" - "get" - "insert" + Method string `json:"method,omitempty"` + // ReturnAddress: The return address to submit. This should be set only if the + // method is `insert`. + ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` + // ReturnAddressId: The return address ID. This should be set only if the + // method is `delete` or `get`. + ReturnAddressId string `json:"returnAddressId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accountstatuses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, 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 := &AccountstatusesListResponse{ - 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 +func (s ReturnaddressCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ReturnaddressCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ReturnaddressCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccounttaxCustombatchCall struct { - s *APIService - accounttaxcustombatchrequest *AccounttaxCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ReturnaddressCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Custombatch: Retrieves and updates tax settings of multiple accounts in a -// single request. -func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { - c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accounttaxcustombatchrequest = accounttaxcustombatchrequest - return c +type ReturnaddressCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ReturnAddress: The retrieved return address. + ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReturnaddressCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { - c.ctx_ = ctx - return c +type ReturnaddressListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of addresses. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ReturnAddress `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnaddressListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxCustombatchCall) 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.accounttaxcustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnpolicyCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ReturnpolicyCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounttax.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { - 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 := &AccounttaxCustomBatchResponse{ - 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 +func (s ReturnpolicyCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccounttaxGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReturnpolicyCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The Merchant Center account ID. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "delete" - "get" - "insert" + Method string `json:"method,omitempty"` + // ReturnPolicy: The return policy to submit. This should be set only if the + // method is `insert`. + ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` + // ReturnPolicyId: The return policy ID. This should be set only if the method + // is `delete` or `get`. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Get: Retrieves the tax settings of the account. -// -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { - c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +func (s ReturnpolicyCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type ReturnpolicyCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ReturnpolicyCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { - c.ifNoneMatch_ = entityTag - return c +func (s ReturnpolicyCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { - c.ctx_ = ctx - return c +type ReturnpolicyCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ReturnPolicy: The retrieved return policy. + ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnpolicyCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnpolicyListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyListResponse". + Kind string `json:"kind,omitempty"` + Resources []*ReturnPolicy `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounttax.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountTax.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { - 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 := &AccountTax{ - 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 +func (s ReturnpolicyListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type Row struct { + // Cells: The list of cells that constitute the row. Must have the same length + // as `columnHeaders` for two-dimensional tables, a length of 1 for + // one-dimensional tables. Required. + Cells []*Value `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccounttaxListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s Row) MarshalJSON() ([]byte, error) { + type NoMethod Row + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the tax settings of the sub-accounts in your Merchant Center -// account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { - c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +// SearchRequest: Request message for the ReportService.Search method. +type SearchRequest struct { + // PageSize: Number of ReportRows to retrieve in a single page. Defaults to + // 1000. Values above 5000 are coerced to 5000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: Token of the page to retrieve. If not specified, the first page + // of results is returned. In order to request the next page of results, the + // value obtained from `next_page_token` in the previous response should be + // used. + PageToken string `json:"pageToken,omitempty"` + // Query: Required. Query that defines performance metrics to retrieve and + // dimensions according to which the metrics are to be segmented. For details + // on how to construct your query, see the Query Language guide + // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSize") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// tax settings to return in the response, used for paging. -func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s SearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod SearchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} +// SearchResponse: Response message for the ReportService.Search method. +type SearchResponse struct { + // NextPageToken: Token which can be sent as `page_token` to retrieve the next + // page. If omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Results: Rows that matched the search query. + Results []*ReportRow `json:"results,omitempty"` -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { - c.ifNoneMatch_ = entityTag - return c +func (s SearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { - c.ctx_ = ctx - return c +// Segments: Dimensions according to which metrics are segmented in the +// response. Values of product dimensions, such as `offer_id`, reflect the +// state of a product at the time of the corresponding event, for example, +// impression or order. Segment fields cannot be selected in queries without +// also selecting at least one metric field. Values are only set for dimensions +// requested explicitly in the request's search query. +type Segments struct { + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // CategoryL1: Product category (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Product category (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Product category (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Product category (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Product category (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL5 string `json:"categoryL5,omitempty"` + // CurrencyCode: Currency in which price metrics are represented, for example, + // if you select `ordered_item_sales_micros`, the returned value will be + // represented by this currency. + CurrencyCode string `json:"currencyCode,omitempty"` + // CustomLabel0: Custom label 0 for custom grouping of products. + CustomLabel0 string `json:"customLabel0,omitempty"` + // CustomLabel1: Custom label 1 for custom grouping of products. + CustomLabel1 string `json:"customLabel1,omitempty"` + // CustomLabel2: Custom label 2 for custom grouping of products. + CustomLabel2 string `json:"customLabel2,omitempty"` + // CustomLabel3: Custom label 3 for custom grouping of products. + CustomLabel3 string `json:"customLabel3,omitempty"` + // CustomLabel4: Custom label 4 for custom grouping of products. + CustomLabel4 string `json:"customLabel4,omitempty"` + // CustomerCountryCode: Code of the country where the customer is located at + // the time of the event. Represented in the ISO 3166 format. If the customer + // country cannot be determined, a special 'ZZ' code is returned. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date in the merchant timezone to which metrics apply. + Date *Date `json:"date,omitempty"` + // OfferId: Merchant-provided id of the product. + OfferId string `json:"offerId,omitempty"` + // ProductTypeL1: Product type (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL1 string `json:"productTypeL1,omitempty"` + // ProductTypeL2: Product type (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL2 string `json:"productTypeL2,omitempty"` + // ProductTypeL3: Product type (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL3 string `json:"productTypeL3,omitempty"` + // ProductTypeL4: Product type (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL4 string `json:"productTypeL4,omitempty"` + // ProductTypeL5: Product type (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL5 string `json:"productTypeL5,omitempty"` + // Program: Program to which metrics apply, for example, Free Product Listing. + // + // Possible values: + // "PROGRAM_UNSPECIFIED" - Not specified. + // "SHOPPING_ADS" - Shopping Ads. + // "FREE_PRODUCT_LISTING" - Free Product Listing. + // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. + // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. + // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 + // starting from May 2024. Buy on Google Listing. + Program string `json:"program,omitempty"` + // Title: Title of the product. + Title string `json:"title,omitempty"` + // Week: First day of the week (Monday) of the metrics date in the merchant + // timezone. + Week *Date `json:"week,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Brand") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Segments) MarshalJSON() ([]byte, error) { + type NoMethod Segments + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type Service struct { + // Active: A boolean exposing the active status of the shipping service. + // Required. + Active bool `json:"active,omitempty"` + // Currency: The CLDR code of the currency to which this service applies. Must + // match that of the prices in rate groups. + Currency string `json:"currency,omitempty"` + // DeliveryCountry: The CLDR territory code of the country to which the service + // applies. Required. + DeliveryCountry string `json:"deliveryCountry,omitempty"` + // DeliveryTime: Time spent in various aspects from order to the delivery of + // the product. Required. + DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` + // Eligibility: Eligibility for this service. Acceptable values are: - "All + // scenarios" - "All scenarios except Shopping Actions" - "Shopping + // Actions" + Eligibility string `json:"eligibility,omitempty"` + // MinimumOrderValue: Minimum order value for this service. If set, indicates + // that customers will have to spend at least this amount. All prices within a + // service must have the same currency. Cannot be set together with + // minimum_order_value_table. + MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` + // MinimumOrderValueTable: Table of per store minimum order values for the + // pickup fulfillment type. Cannot be set together with minimum_order_value. + MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` + // Name: Free-form name of the service. Must be unique within target account. + // Required. + Name string `json:"name,omitempty"` + // PickupService: The carrier-service pair delivering items to collection + // points. The list of supported pickup services can be retrieved through the + // `getSupportedPickupServices` method. Required if and only if the service + // delivery type is `pickup`. + PickupService *PickupCarrierService `json:"pickupService,omitempty"` + // RateGroups: Shipping rate group definitions. Only the last one is allowed to + // have an empty `applicableShippingLabels`, which means "everything else". The + // other `applicableShippingLabels` must not overlap. + RateGroups []*RateGroup `json:"rateGroups,omitempty"` + // ShipmentType: Type of locations this service ships orders to. Acceptable + // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - + // "collection_point" + ShipmentType string `json:"shipmentType,omitempty"` + // StoreConfig: A list of stores your products are delivered from. This is only + // available for the local delivery shipment type. + StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Active") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Active") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounttax.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccounttaxListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &AccounttaxListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// ServiceStoreConfig: Stores that provide local delivery. Only valid with +// local delivery fulfillment. +type ServiceStoreConfig struct { + // CutoffConfig: Time local delivery ends for the day. This can be either + // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an + // error is thrown. + CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` + // ServiceRadius: Maximum delivery radius. Only needed for local delivery + // fulfillment type. + ServiceRadius *Distance `json:"serviceRadius,omitempty"` + // StoreCodes: A list of store codes that provide local delivery. If empty, + // then `store_service_type` must be `all_stores`, or an error is thrown. If + // not empty, then `store_service_type` must be `selected_stores`, or an error + // is thrown. + StoreCodes []string `json:"storeCodes,omitempty"` + // StoreServiceType: Indicates whether all stores listed by this merchant + // provide local delivery or not. Acceptable values are `all stores` and + // `selected stores` + StoreServiceType string `json:"storeServiceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CutoffConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CutoffConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type AccounttaxUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accounttax *AccountTax - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ServiceStoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Update: Updates the tax settings of the account. Any fields that are not -// provided are deleted from the resource. -// -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { - c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accounttax = accounttax - return c +// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based +// on the local timezone of the store. `local_cutoff_time` and +// `store_close_offset_hours` are mutually exclusive. +type ServiceStoreConfigCutoffConfig struct { + // LocalCutoffTime: Time in hours and minutes in the local timezone when local + // delivery ends. + LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` + // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local + // delivery when they have a shipping service configured to n day local + // delivery. For example, if the shipping service defines same-day delivery, + // and it's past the cut-off, setting this field to `true` results in the + // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + // same example, setting this field to `false` results in the calculated + // shipping time being one day. This is only for local delivery. + NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` + // StoreCloseOffsetHours: Represents cutoff time as the number of hours before + // store closing. Mutually exclusive with other fields (hour and minute). + StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocalCutoffTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { - c.ctx_ = ctx - return c +// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in +// the local timezone when local delivery ends. +type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { + // Hour: Hour local delivery orders must be placed by to process the same day. + Hour int64 `json:"hour,omitempty,string"` + // Minute: Minute local delivery orders must be placed by to process the same + // day. + Minute int64 `json:"minute,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hour") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxUpdateCall) 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.accounttax) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// SettlementReport: Settlement reports detail order-level and item-level +// credits and debits between you and Google. +type SettlementReport struct { + // EndDate: The end date on which all transactions are included in the report, + // in ISO 8601 format. + EndDate string `json:"endDate,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementReport" + Kind string `json:"kind,omitempty"` + // PreviousBalance: The residual amount from the previous invoice. This is set + // only if the previous invoices are not paid because of negative balance. + PreviousBalance *Price `json:"previousBalance,omitempty"` + // SettlementId: The ID of the settlement report. + SettlementId string `json:"settlementId,omitempty"` + // StartDate: The start date on which all transactions are included in the + // report, in ISO 8601 format. + StartDate string `json:"startDate,omitempty"` + // TransferAmount: The money due to the merchant. + TransferAmount *Price `json:"transferAmount,omitempty"` + // TransferDate: Date on which transfer for this payment was initiated by + // Google, in ISO 8601 format. + TransferDate string `json:"transferDate,omitempty"` + // TransferIds: The list of bank identifiers used for the transfer. For + // example, Trace ID for Federal Automated Clearing House (ACH). This may also + // be known as the Wire ID. + TransferIds []string `json:"transferIds,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndDate") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.accounttax.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountTax.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { - 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 := &AccountTax{ - 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 +func (s SettlementReport) MarshalJSON() ([]byte, error) { + type NoMethod SettlementReport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsActivateCall struct { - s *APIService - merchantId int64 - regionCode string - activatebuyongoogleprogramrequest *ActivateBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// SettlementTransaction: Settlement transactions give a detailed breakdown of +// the settlement report. +type SettlementTransaction struct { + // Amount: The amount for the transaction. + Amount *SettlementTransactionAmount `json:"amount,omitempty"` + // Identifiers: Identifiers of the transaction. + Identifiers *SettlementTransactionIdentifiers `json:"identifiers,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementTransaction" + Kind string `json:"kind,omitempty"` + // Transaction: Details of the transaction. + Transaction *SettlementTransactionTransaction `json:"transaction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Activate: Reactivates the BoG program in your Merchant Center account. Moves -// the program to the active state when allowed, for example, when paused. This -// method is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Activate(merchantId int64, regionCode string, activatebuyongoogleprogramrequest *ActivateBuyOnGoogleProgramRequest) *BuyongoogleprogramsActivateCall { - c := &BuyongoogleprogramsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.activatebuyongoogleprogramrequest = activatebuyongoogleprogramrequest - return c +func (s SettlementTransaction) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransaction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsActivateCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsActivateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type SettlementTransactionAmount struct { + Commission *SettlementTransactionAmountCommission `json:"commission,omitempty"` + // Description: The description of the event. Acceptable values are: - + // "taxWithhold" - "principal" - "principalAdjustment" - "shippingFee" + // - "merchantRemittedSalesTax" - "googleRemittedSalesTax" - + // "merchantCoupon" - "merchantCouponTax" - "merchantRemittedDisposalTax" + // - "googleRemittedDisposalTax" - "merchantRemittedRedemptionFee" - + // "googleRemittedRedemptionFee" - "eeeEcoFee" - "furnitureEcoFee" - + // "copyPrivateFee" - "eeeEcoFeeCommission" - "furnitureEcoFeeCommission" + // - "copyPrivateFeeCommission" - "principalRefund" - + // "principalRefundTax" - "itemCommission" - "adjustmentCommission" - + // "shippingFeeCommission" - "commissionRefund" - "damaged" - + // "damagedOrDefectiveItem" - "expiredItem" - "faultyItem" - + // "incorrectItemReceived" - "itemMissing" - "qualityNotExpected" - + // "receivedTooLate" - "storePackageMissing" - "transitPackageMissing" - + // "unsuccessfulDeliveryUndeliverable" - "wrongChargeInStore" - + // "wrongItem" - "returns" - "undeliverable" - + // "issueRelatedRefundAndReplacementAmountDescription" - + // "refundFromMerchant" - "returnLabelShippingFee" - "lumpSumCorrection" + // - "pspFee" - "principalRefundDoesNotFit" - + // "principalRefundOrderedWrongItem" - "principalRefundQualityNotExpected" + // - "principalRefundBetterPriceFound" - "principalRefundNoLongerNeeded" - + // "principalRefundChangedMind" - "principalRefundReceivedTooLate" - + // "principalRefundIncorrectItemReceived" - + // "principalRefundDamagedOrDefectiveItem" - + // "principalRefundDidNotMatchDescription" - "principalRefundExpiredItem" + Description string `json:"description,omitempty"` + // TransactionAmount: The amount that contributes to the line item price. + TransactionAmount *Price `json:"transactionAmount,omitempty"` + // Type: The type of the amount. Acceptable values are: - "itemPrice" - + // "orderPrice" - "refund" - "earlyRefund" - "courtesyRefund" - + // "returnRefund" - "returnLabelShippingFeeAmount" - + // "lumpSumCorrectionAmount" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Commission") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Commission") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsActivateCall) Context(ctx context.Context) *BuyongoogleprogramsActivateCall { - c.ctx_ = ctx - return c +func (s SettlementTransactionAmount) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionAmount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsActivateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type SettlementTransactionAmountCommission struct { + // Category: The category of the commission. Acceptable values are: - + // "animalsAndPetSupplies" - "dogCatFoodAndCatLitter" - + // "apparelAndAccessories" - "shoesHandbagsAndSunglasses" - + // "costumesAndAccessories" - "jewelry" - "watches" - + // "hobbiesArtsAndCrafts" - "homeAndGarden" - "entertainmentCollectibles" + // - "collectibleCoins" - "sportsCollectibles" - "sportingGoods" - + // "toysAndGames" - "musicalInstruments" - "giftCards" - + // "babyAndToddler" - "babyFoodWipesAndDiapers" - "businessAndIndustrial" + // - "camerasOpticsAndPhotography" - "consumerElectronics" - + // "electronicsAccessories" - "personalComputers" - "videoGameConsoles" - + // "foodAndGrocery" - "beverages" - "tobaccoProducts" - "furniture" - + // "hardware" - "buildingMaterials" - "tools" - "healthAndPersonalCare" + // - "beauty" - "householdSupplies" - "kitchenAndDining" - + // "majorAppliances" - "luggageAndBags" - "media" - "officeSupplies" - + // "softwareAndVideoGames" - "vehiclePartsAndAccessories" - + // "vehicleTiresAndWheels" - "vehicles" - "everythingElse" + Category string `json:"category,omitempty"` + // Rate: Rate of the commission in percentage. + Rate string `json:"rate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Category") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Category") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *BuyongoogleprogramsActivateCall) 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.activatebuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/activate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s SettlementTransactionAmountCommission) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionAmountCommission + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.activate" call. -func (c *BuyongoogleprogramsActivateCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +type SettlementTransactionIdentifiers struct { + // AdjustmentId: The identifier of the adjustments, if it's available. + AdjustmentId string `json:"adjustmentId,omitempty"` + // MerchantOrderId: The merchant provided order ID. + MerchantOrderId string `json:"merchantOrderId,omitempty"` + // OrderItemId: The identifier of the item. + OrderItemId string `json:"orderItemId,omitempty"` + // SettlementEntryId: The unique ID of the settlement transaction entry. + SettlementEntryId string `json:"settlementEntryId,omitempty"` + // ShipmentIds: The shipment ids for the item. + ShipmentIds []string `json:"shipmentIds,omitempty"` + // TransactionId: The Google transaction ID. + TransactionId string `json:"transactionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdjustmentId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdjustmentId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type BuyongoogleprogramsGetCall struct { - s *APIService - merchantId int64 - regionCode string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s SettlementTransactionIdentifiers) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionIdentifiers + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type SettlementTransactionTransaction struct { + // PostDate: The time on which the event occurred in ISO 8601 format. + PostDate string `json:"postDate,omitempty"` + // Type: The type of the transaction that occurred. Acceptable values are: - + // "order" - "reversal" - "orderRefund" - "reversalRefund" - + // "issueRelatedRefundAndReplacement" - "returnLabelShippingFeeTransaction" + // - "reversalIssueRelatedRefundAndReplacement" - + // "reversalReturnLabelShippingFeeTransaction" - + // "lumpSumCorrectionTransaction" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostDate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PostDate") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Get: Retrieves a status of the BoG program for your Merchant Center account. -// -// - merchantId: The ID of the account. -// - regionCode: The Program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Get(merchantId int64, regionCode string) *BuyongoogleprogramsGetCall { - c := &BuyongoogleprogramsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - return c +func (s SettlementTransactionTransaction) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionTransaction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsGetCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} +type SettlementreportsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementreportsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of returns. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*SettlementReport `json:"resources,omitempty"` -// 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 *BuyongoogleprogramsGetCall) IfNoneMatch(entityTag string) *BuyongoogleprogramsGetCall { - c.ifNoneMatch_ = entityTag - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsGetCall) Context(ctx context.Context) *BuyongoogleprogramsGetCall { - c.ctx_ = ctx - return c +func (s SettlementreportsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod SettlementreportsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} +type SettlementtransactionsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementtransactionsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of returns. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*SettlementTransaction `json:"resources,omitempty"` -func (c *BuyongoogleprogramsGetCall) 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, "{merchantId}/buyongoogleprograms/{regionCode}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.buyongoogleprograms.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BuyOnGoogleProgramStatus.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BuyongoogleprogramsGetCall) Do(opts ...googleapi.CallOption) (*BuyOnGoogleProgramStatus, 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 := &BuyOnGoogleProgramStatus{ - 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 +func (s SettlementtransactionsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod SettlementtransactionsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsOnboardCall struct { - s *APIService - merchantId int64 - regionCode string - onboardbuyongoogleprogramrequest *OnboardBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// ShippingSettings: The merchant account's shipping settings. All methods +// except getsupportedcarriers and getsupportedholidays require the admin role. +type ShippingSettings struct { + // AccountId: The ID of the account to which these account shipping settings + // belong. Ignored upon update, always present in get request responses. + AccountId uint64 `json:"accountId,omitempty,string"` + // PostalCodeGroups: A list of postal code groups that can be referred to in + // `services`. Optional. + PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` + // Services: The target account's list of services. Optional. + Services []*Service `json:"services,omitempty"` + // Warehouses: Optional. A list of warehouses which can be referred to in + // `services`. + Warehouses []*Warehouse `json:"warehouses,omitempty"` -// Onboard: Onboards the BoG program in your Merchant Center account. By using -// this method, you agree to the Terms of Service -// (https://merchants.google.com/mc/termsofservice/transactions/US/latest). -// Calling this method is only possible if the authenticated account is the -// same as the merchant id in the request. Calling this method multiple times -// will only accept Terms of Service if the latest version is not currently -// signed. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Onboard(merchantId int64, regionCode string, onboardbuyongoogleprogramrequest *OnboardBuyOnGoogleProgramRequest) *BuyongoogleprogramsOnboardCall { - c := &BuyongoogleprogramsOnboardCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.onboardbuyongoogleprogramrequest = onboardbuyongoogleprogramrequest - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AccountId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsOnboardCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsOnboardCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ShippingSettings) MarshalJSON() ([]byte, error) { + type NoMethod ShippingSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsOnboardCall) Context(ctx context.Context) *BuyongoogleprogramsOnboardCall { - c.ctx_ = ctx - return c +type ShippingsettingsCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsOnboardCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *BuyongoogleprogramsOnboardCall) 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.onboardbuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/onboard") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single +// non-batch shippingsettings request. +type ShippingsettingsCustomBatchRequestEntry struct { + // AccountId: The ID of the account for which to get/update account shipping + // settings. + AccountId uint64 `json:"accountId,omitempty,string"` + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "get" - + // "update" + Method string `json:"method,omitempty"` + // ShippingSettings: The account shipping settings to update. Only defined if + // the method is `update`. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.buyongoogleprograms.onboard" call. -func (c *BuyongoogleprogramsOnboardCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsPatchCall struct { - s *APIService - merchantId int64 - regionCode string - buyongoogleprogramstatus *BuyOnGoogleProgramStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +type ShippingsettingsCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsCustomBatchResponse". + Kind string `json:"kind,omitempty"` -// Patch: Updates the status of the BoG program for your Merchant Center -// account. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Patch(merchantId int64, regionCode string, buyongoogleprogramstatus *BuyOnGoogleProgramStatus) *BuyongoogleprogramsPatchCall { - c := &BuyongoogleprogramsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.buyongoogleprogramstatus = buyongoogleprogramstatus - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. If the update mask is not provided, then all the fields set in -// buyOnGoogleProgramStatus will be updated. Clearing fields is only possible -// if update mask is provided. -func (c *BuyongoogleprogramsPatchCall) UpdateMask(updateMask string) *BuyongoogleprogramsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +func (s ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsPatchCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single +// non-batch shipping settings response. +type ShippingsettingsCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ShippingSettings: The retrieved or updated account shipping settings. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BatchId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsPatchCall) Context(ctx context.Context) *BuyongoogleprogramsPatchCall { - c.ctx_ = ctx - return c +func (s ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ShippingsettingsGetSupportedCarriersResponse struct { + // Carriers: A list of supported carriers. May be empty. + Carriers []*CarriersCarrier `json:"carriers,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedCarriersResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Carriers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Carriers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *BuyongoogleprogramsPatchCall) 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.buyongoogleprogramstatus) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedCarriersResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *BuyOnGoogleProgramStatus.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BuyongoogleprogramsPatchCall) Do(opts ...googleapi.CallOption) (*BuyOnGoogleProgramStatus, 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 := &BuyOnGoogleProgramStatus{ - 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 ShippingsettingsGetSupportedHolidaysResponse struct { + // Holidays: A list of holidays applicable for delivery guarantees. May be + // empty. + Holidays []*HolidaysHoliday `json:"holidays,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedHolidaysResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Holidays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Holidays") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type BuyongoogleprogramsPauseCall struct { - s *APIService - merchantId int64 - regionCode string - pausebuyongoogleprogramrequest *PauseBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedHolidaysResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pause: Pauses the BoG program in your Merchant Center account. This method -// is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Pause(merchantId int64, regionCode string, pausebuyongoogleprogramrequest *PauseBuyOnGoogleProgramRequest) *BuyongoogleprogramsPauseCall { - c := &BuyongoogleprogramsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.pausebuyongoogleprogramrequest = pausebuyongoogleprogramrequest - return c +type ShippingsettingsGetSupportedPickupServicesResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedPickupServicesResponse". + Kind string `json:"kind,omitempty"` + // PickupServices: A list of supported pickup services. May be empty. + PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsPauseCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsPauseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedPickupServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsPauseCall) Context(ctx context.Context) *BuyongoogleprogramsPauseCall { - c.ctx_ = ctx - return c +type ShippingsettingsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of shipping + // settings. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ShippingSettings `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsPauseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *BuyongoogleprogramsPauseCall) 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.pausebuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/pause") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. +type ShoppingAdsProgramStatus struct { + // GlobalState: State of the program. `ENABLED` if there are offers for at + // least one region. + // + // Possible values: + // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. + // "NOT_ENABLED" - Program is not enabled for any country. + // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. + // Upload products to Merchant Center. + // "ENABLED" - Program is enabled and offers are uploaded for at least one + // country. + GlobalState string `json:"globalState,omitempty"` + // RegionStatuses: Status of the program in each region. Regions with the same + // status and review eligibility are grouped together in `regionCodes`. + RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GlobalState") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GlobalState") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Do executes the "content.buyongoogleprograms.pause" call. -func (c *BuyongoogleprogramsPauseCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsRequestreviewCall struct { - s *APIService - merchantId int64 - regionCode string - requestreviewbuyongoogleprogramrequest *RequestReviewBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ShoppingAdsProgramStatusRegionStatus: Status of program and region. +type ShoppingAdsProgramStatusRegionStatus struct { + // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to + // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO + // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. + DisapprovalDate string `json:"disapprovalDate,omitempty"` + // EligibilityStatus: Eligibility status of the Shopping Ads program. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not known. + // "APPROVED" - If the account has no issues and review is completed + // successfully. + // "DISAPPROVED" - There are one or more issues that needs to be resolved for + // account to be active for the program. Detailed list of account issues are + // available in + // [accountstatuses](https://developers.google.com/shopping-content/reference/re + // st/v2.1/accountstatuses) API. + // "WARNING" - If account has issues but offers are servable. Some of the + // issue can make account DISAPPROVED after a certain deadline. + // "UNDER_REVIEW" - Account is under review. + // "PENDING_REVIEW" - Account is waiting for review to start. + // "ONBOARDING" - Program is currently onboarding. Upload valid offers to + // complete onboarding. + EligibilityStatus string `json:"eligibilityStatus,omitempty"` + // OnboardingIssues: Issues that must be fixed to be eligible for review. + OnboardingIssues []string `json:"onboardingIssues,omitempty"` + // RegionCodes: The two-letter ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions + // with the same `eligibilityStatus` and `reviewEligibility`. + RegionCodes []string `json:"regionCodes,omitempty"` + // ReviewEligibilityStatus: If a program is eligible for review in a specific + // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. + // + // Possible values: + // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. + // "ELIGIBLE" - Account is eligible for review for a specified region code. + // "INELIGIBLE" - Account is not eligible for review for a specified region + // code. + ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` + // ReviewIneligibilityReason: Review ineligibility reason if account is not + // eligible for review. + // + // Possible values: + // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from + // Google is not possible. + // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. + // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. + // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period + // ends. + // "ALREADY_UNDER_REVIEW" - Account is already under review. + // "NO_REVIEW_REQUIRED" - No issues available to review. + // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed + // at the end of the grace period. + // "IS_RETIRED" - Account is retired. Should not appear in MC. + // "ALREADY_REVIEWED" - Account was already reviewd. + ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` + // ReviewIneligibilityReasonDescription: Reason a program in a specific region + // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is + // `INELIGIBLE`. + ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` + // ReviewIneligibilityReasonDetails: Additional information for ineligibility. + // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the + // end of the cooldown period is provided. + ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` + // ReviewIssues: Issues evaluated in the review process. Fix all issues before + // requesting a review. + ReviewIssues []string `json:"reviewIssues,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisapprovalDate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Requestreview: Requests review and then activates the BoG program in your -// Merchant Center account for the first time. Moves the program to the -// REVIEW_PENDING state. This method is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Requestreview(merchantId int64, regionCode string, requestreviewbuyongoogleprogramrequest *RequestReviewBuyOnGoogleProgramRequest) *BuyongoogleprogramsRequestreviewCall { - c := &BuyongoogleprogramsRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.requestreviewbuyongoogleprogramrequest = requestreviewbuyongoogleprogramrequest - return c +func (s ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusRegionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsRequestreviewCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsRequestreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details +// for review ineligibility reasons. +type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { + // CooldownTime: This timestamp represents end of cooldown period for review + // ineligbility reason `IN_COOLDOWN_PERIOD`. + CooldownTime string `json:"cooldownTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CooldownTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CooldownTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsRequestreviewCall) Context(ctx context.Context) *BuyongoogleprogramsRequestreviewCall { - c.ctx_ = ctx - return c +func (s ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsRequestreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type Table struct { + // ColumnHeaders: Headers of the table's columns. Optional: if not set then the + // table has only one dimension. + ColumnHeaders *Headers `json:"columnHeaders,omitempty"` + // Name: Name of the table. Required for subtables, ignored for the main table. + Name string `json:"name,omitempty"` + // RowHeaders: Headers of the table's rows. Required. + RowHeaders *Headers `json:"rowHeaders,omitempty"` + // Rows: The list of rows that constitute the table. Must have the same length + // as `rowHeaders`. Required. + Rows []*Row `json:"rows,omitempty"` + // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ColumnHeaders") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *BuyongoogleprogramsRequestreviewCall) 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.requestreviewbuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/requestreview") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s Table) MarshalJSON() ([]byte, error) { + type NoMethod Table + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.requestreview" call. -func (c *BuyongoogleprogramsRequestreviewCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// TextWithTooltip: Block of text that may contain a tooltip with more +// information. +type TextWithTooltip struct { + // SimpleTooltipValue: Value of the tooltip as a simple text. + SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` + // SimpleValue: Value of the message as a simple text. + SimpleValue string `json:"simpleValue,omitempty"` + // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is + // present. + // + // Possible values: + // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided + // by the API. + // "INFO" - Used when the tooltip adds additional information to the context, + // the 'i' can be used as an icon. + // "QUESTION" - Used when the tooltip shows helpful information, the '?' can + // be used as an icon. + TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` + // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SimpleTooltipValue") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type CollectionsCreateCall struct { - s *APIService - merchantId int64 - collection *Collection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s TextWithTooltip) MarshalJSON() ([]byte, error) { + type NoMethod TextWithTooltip + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimePeriod: A message that represents a time period. +type TimePeriod struct { + // EndTime: The ending timestamp. + EndTime string `json:"endTime,omitempty"` + // StartTime: The starting timestamp. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Create: Uploads a collection to your Merchant Center account. If a -// collection with the same collectionId already exists, this method updates -// that entry. In each update, the collection is completely replaced by the -// fields in the body of the update request. -// -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { - c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collection = collection - return c +func (s TimePeriod) MarshalJSON() ([]byte, error) { + type NoMethod TimePeriod + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// TimeZone: Represents a time zone from the IANA Time Zone Database +// (https://www.iana.org/time-zones). +type TimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { - c.ctx_ = ctx - return c +func (s TimeZone) MarshalJSON() ([]byte, error) { + type NoMethod TimeZone + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// TopicTrends: Topic trends fields requested by the merchant in the query. +// Field values are only set if the merchant queries `TopicTrendsView`. +// Forecast data can be queried up to 13 weeks by passing a future date in the +// `date` field. Historical data is measured daily, and forecasted data is +// projected weekly. All data points are normalized based on the highest data +// points returned in the response. If you make separate queries with different +// date ranges, you might see different values for the same date in each +// response. The recommended way to get a trend score of a topic is +// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can +// view trends for up to eight topics at a time. +type TopicTrends struct { + // CustomerCountryCode: Country trends are calculated for. Must be a two-letter + // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date the trend score was retrieved. + Date *Date `json:"date,omitempty"` + // Last120DaysSearchInterest: Search interest in the last 120 days, with the + // same normalization as search_interest. This field is only present for a past + // date. + Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` + // Last30DaysSearchInterest: Search interest in the last 30 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` + // Last7DaysSearchInterest: Search interest in the last 7 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` + // Last90DaysSearchInterest: Search interest in the last 90 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` + // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with + // the same normalization as search_interest. This field is only present for a + // future date. + Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` + // SearchInterest: Daily search interest, normalized to the time and country to + // make comparisons easier, with 100 representing peak popularity (from 0 to + // 100) for the requested time period and location. + SearchInterest float64 `json:"searchInterest,omitempty"` + // Topic: Google-provided topic trends are calculated for. Only top eight + // topics are returned. Topic is what shoppers are searching for on Google, + // grouped by the same concept. + Topic string `json:"topic,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomerCountryCode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *CollectionsCreateCall) 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.collection) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s TopicTrends) MarshalJSON() ([]byte, error) { + type NoMethod TopicTrends + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Collection.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, error) { - 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 := &Collection{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *TopicTrends) UnmarshalJSON(data []byte) error { + type NoMethod TopicTrends + var s1 struct { + Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` + Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` + Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` + Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` + Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` + SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil + s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) + s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) + s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) + s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) + s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) + s.SearchInterest = float64(s1.SearchInterest) + return nil } -type CollectionsDeleteCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type TransitTable struct { + // PostalCodeGroupNames: A list of postal group names. The last value can be + // "all other locations". Example: `["zone 1", "zone 2", "all other + // locations"]`. The referred postal code groups must match the delivery + // country of the service. + PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` + Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` + // TransitTimeLabels: A list of transit time labels. The last value can be + // "all other labels". Example: `["food", "electronics", "all other + // labels"]`. + TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Delete: Deletes a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { - c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId - return c +func (s TransitTable) MarshalJSON() ([]byte, error) { + type NoMethod TransitTable + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type TransitTableTransitTimeRow struct { + Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { - c.ctx_ = ctx - return c +func (s TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type TransitTableTransitTimeRowTransitTimeValue struct { + // MaxTransitTimeInDays: Must be greater than or equal to + // `minTransitTimeInDays`. + MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` + // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means + // same day delivery, 1 means next day delivery. + MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRowTransitTimeValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.delete" call. -func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// TriggerActionPayload: The payload for the triggered action. +type TriggerActionPayload struct { + // ActionContext: Required. The context from the selected action. The value is + // obtained from rendered issues and needs to be sent back to identify the + // action that is being triggered. + ActionContext string `json:"actionContext,omitempty"` + // ActionInput: Required. Input provided by the merchant. + ActionInput *ActionInput `json:"actionInput,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionContext") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActionContext") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type CollectionsGetCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s TriggerActionPayload) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Get: Retrieves a collection from your Merchant Center account. -// -// - collectionId: The REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { - c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId - return c -} +// TriggerActionResponse: Response informing about the started action. +type TriggerActionResponse struct { + // Message: The message for merchant. + Message string `json:"message,omitempty"` -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Message") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Message") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { - c.ifNoneMatch_ = entityTag - return c +func (s TriggerActionResponse) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { - c.ctx_ = ctx - return c +// UndeleteConversionSourceRequest: Request message for the +// UndeleteConversionSource method. +type UndeleteConversionSourceRequest struct { } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` +// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` +// will be automatically replaced with data from the merchant account with this +// attribute offer_id +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) +type UrlSettings struct { + // CartUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the cart page on the merchant website with the + // selected item in cart. + CartUriTemplate string `json:"cartUriTemplate,omitempty"` + // CheckoutUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the merchant checkout page with the item in the cart. + CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "CartUriTemplate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CartUriTemplate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s UrlSettings) MarshalJSON() ([]byte, error) { + type NoMethod UrlSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Collection.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - 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 := &Collection{ - 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 +// Value: The single value of a rate group or the value of a rate group table's +// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, +// `carrierRateName`, `subtableName` must be set. +type Value struct { + // CarrierRateName: The name of a carrier rate referring to a carrier rate + // defined in the same rate group. Can only be set if all other fields are not + // set. + CarrierRateName string `json:"carrierRateName,omitempty"` + // FlatRate: A flat rate. Can only be set if all other fields are not set. + FlatRate *Price `json:"flatRate,omitempty"` + // NoShipping: If true, then the product can't ship. Must be true when set, can + // only be set if all other fields are not set. + NoShipping bool `json:"noShipping,omitempty"` + // PricePercentage: A percentage of the price represented as a number in + // decimal notation (for example, "5.4"). Can only be set if all other fields + // are not set. + PricePercentage string `json:"pricePercentage,omitempty"` + // SubtableName: The name of a subtable. Can only be set in table cells (not + // for single values), and only if all other fields are not set. + SubtableName string `json:"subtableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierRateName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CarrierRateName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -type CollectionsListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s Value) MarshalJSON() ([]byte, error) { + type NoMethod Value + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the collections in your Merchant Center account. The response -// might contain fewer items than specified by page_size. Rely on -// next_page_token to determine if there are more items to be requested. -// -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { - c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. +type VerifyPhoneNumberRequest struct { + // PhoneVerificationMethod: Verification method used to receive verification + // code. + // + // Possible values: + // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. + // "SMS" - Receive verification code by SMS. + // "PHONE_CALL" - Receive verification code by phone call. + PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` + // VerificationCode: The verification code that was sent to the phone number + // for validation. + VerificationCode string `json:"verificationCode,omitempty"` + // VerificationId: The verification ID returned by `requestphoneverification`. + VerificationId string `json:"verificationId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PhoneVerificationMethod") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// PageSize sets the optional parameter "pageSize": The maximum number of -// collections to return in the response, used for paging. Defaults to 50; -// values above 1000 will be coerced to 1000. -func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +func (s VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber +// method. +type VerifyPhoneNumberResponse struct { + // VerifiedPhoneNumber: Verified phone number if verification is successful. + // This phone number can only be replaced by another verified phone number. + VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VerifiedPhoneNumber") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { - c.ifNoneMatch_ = entityTag - return c +// Warehouse: A fulfillment warehouse, which stores and handles inventory. +type Warehouse struct { + // BusinessDayConfig: Business days of the warehouse. If not set, will be + // Monday to Friday by default. + BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` + // CutoffTime: Required. The latest time of day that an order can be accepted + // and begin processing. Later orders will be processed in the next day. The + // time is based on the warehouse postal code. + CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` + // HandlingDays: Required. The number of days it takes for this warehouse to + // pack up and ship an item. This is on the warehouse level, but can be + // overridden on the offer level based on the attributes of an item. + HandlingDays int64 `json:"handlingDays,omitempty,string"` + // Name: Required. The name of the warehouse. Must be unique within account. + Name string `json:"name,omitempty"` + // ShippingAddress: Required. Shipping address of the warehouse. + ShippingAddress *Address `json:"shippingAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BusinessDayConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { - c.ctx_ = ctx - return c +func (s Warehouse) MarshalJSON() ([]byte, error) { + type NoMethod Warehouse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type WarehouseBasedDeliveryTime struct { + // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of + // supported carriers can be retrieved through the `listSupportedCarriers` + // method. + Carrier string `json:"carrier,omitempty"` + // CarrierService: Required. Carrier service, such as "ground" or "2 days". + // The list of supported services for a carrier can be retrieved through the + // `listSupportedCarriers` method. The name of the service must be in the + // eddSupportedServices list. + CarrierService string `json:"carrierService,omitempty"` + // OriginAdministrativeArea: Shipping origin's state. + OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` + // OriginCity: Shipping origin's city. + OriginCity string `json:"originCity,omitempty"` + // OriginCountry: Shipping origin's country represented as a CLDR territory + // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + OriginCountry string `json:"originCountry,omitempty"` + // OriginPostalCode: Shipping origin. + OriginPostalCode string `json:"originPostalCode,omitempty"` + // OriginStreetAddress: Shipping origin's street address. + OriginStreetAddress string `json:"originStreetAddress,omitempty"` + // WarehouseName: The name of the warehouse. Warehouse name need to be matched + // with name. If warehouseName is set, the below fields will be ignored. The + // warehouse info will be read from warehouse. + WarehouseName string `json:"warehouseName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Carrier") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseBasedDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListCollectionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListCollectionsResponse{ - 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 WarehouseCutoffTime struct { + // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order + // has to be placed to be processed in the same day by the warehouse. Hour is + // based on the timezone of warehouse. + Hour int64 `json:"hour,omitempty"` + // Minute: Required. Minute of the cutoff time until which an order has to be + // placed to be processed in the same day by the warehouse. Minute is based on + // the timezone of warehouse. + Minute int64 `json:"minute,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hour") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hour") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +func (s WarehouseCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseCutoffTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type CollectionstatusesGetCall struct { +type Weight struct { + // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" + Unit string `json:"unit,omitempty"` + // Value: Required. The weight represented as a number. The weight can have a + // maximum precision of four decimal places. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Unit") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Weight) MarshalJSON() ([]byte, error) { + type NoMethod Weight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type AccountsAuthinfoCall struct { s *APIService - merchantId int64 - collectionId string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the status of a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { - c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId +// Authinfo: Returns information about the authenticated user. +func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { + c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21383,27 +13163,27 @@ func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *Collectionstat // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionstatusesGetCall) Header() http.Header { +func (c *AccountsAuthinfoCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21411,27 +13191,23 @@ func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.get" call. +// Do executes the "content.accounts.authinfo" call. // Any non-2xx status code is an error. Response headers are in either -// *CollectionStatus.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { +// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21450,7 +13226,7 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CollectionStatus{ + ret := &AccountsAuthInfoResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21463,100 +13239,88 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio return ret, nil } -type CollectionstatusesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsClaimwebsiteCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the statuses of the collections in your Merchant Center account. +// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant +// accounts with approved third-party CSSs aren't required to claim a website. // -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { - c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account whose website is claimed. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { + c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// collection statuses to return in the response, used for paging. Defaults to -// 50; values above 1000 will be coerced to 1000. -func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Overwrite sets the optional parameter "overwrite": Only available to +// selected merchants, for example multi-client accounts (MCAs) and their +// sub-accounts. When set to `True`, this option removes any existing claim on +// the requested website and replaces it with a claim from the account that +// makes the request. +func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { + c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { +func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 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 *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { +func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CollectionstatusesListCall) Header() http.Header { +func (c *AccountsClaimwebsiteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsClaimwebsiteCall) 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, "{merchantId}/collectionstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.list" call. +// Do executes the "content.accounts.claimwebsite" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCollectionStatusesResponse.ServerResponse.Header or (if a response was +// *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { +func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21575,7 +13339,7 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCollectionStatusesResponse{ + ret := &AccountsClaimWebsiteResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21588,98 +13352,71 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ConversionsourcesCreateCall struct { - s *APIService - merchantId int64 - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustombatchCall struct { + s *APIService + accountscustombatchrequest *AccountsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new conversion source. -// -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { - c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.conversionsource = conversionsource +// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant +// Center (sub-)accounts in a single request. +func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { + c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountscustombatchrequest = accountscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { +func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { +func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesCreateCall) Header() http.Header { +func (c *AccountsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.create" call. +// Do executes the "content.accounts.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21698,7 +13435,7 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccountsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21711,57 +13448,63 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers return ret, nil } -type ConversionsourcesDeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsDeleteCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Archives an existing conversion source. It will be recoverable for -// 30 days. This archiving behavior is not typical in the Content API and -// unique to this service. +// Delete: Deletes a Merchant Center sub-account. // -// - conversionSourceId: The ID of the conversion source to be deleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { - c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. This must be a multi-client +// account, and accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { + c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId + c.accountId = accountId + return c +} + +// Force sets the optional parameter "force": Option to delete sub-accounts +// with products. The default value is false. +func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { +func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { +func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesDeleteCall) Header() http.Header { +func (c *AccountsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -21769,14 +13512,14 @@ func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.delete" call. -func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.delete" call. +func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { @@ -21789,31 +13532,46 @@ func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { return nil } -type ConversionsourcesGetCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Fetches a conversion source. +// Get: Retrieves a Merchant Center account. // -// - conversionSourceId: The REST ID of the collection. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { - c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { + c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId + c.accountId = accountId + return c +} + +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". +// +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsGetCall) View(view string) *AccountsGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { +func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21821,27 +13579,27 @@ func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *Conversionsourc // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { +func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { +func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesGetCall) Header() http.Header { +func (c *AccountsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21849,7 +13607,7 @@ func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21857,19 +13615,18 @@ func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.get" call. +// Do executes the "content.accounts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *Account.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21888,7 +13645,7 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21901,106 +13658,77 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion return ret, nil } -type ConversionsourcesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsInsertCall struct { + s *APIService + merchantId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of conversion sources the caller has access to. +// Insert: Creates a Merchant Center sub-account. // -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { - c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { + c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// conversion sources to return in a page. If no `page_size` is specified, -// `100` is used as the default value. The maximum value is `200`. Values above -// `200` will be coerced to `200`. Regardless of pagination, at most `200` -// conversion sources are returned in total. -func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. -func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": If true, also returns -// archived conversion sources. -func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + c.account = account return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { +func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { +func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesListCall) Header() http.Header { +func (c *AccountsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *AccountsInsertCall) 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.account) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.list" call. +// Do executes the "content.accounts.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *ListConversionSourcesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, error) { +// *Account.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22015,126 +13743,101 @@ func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConve if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListConversionSourcesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Account{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } + return ret, nil } -type ConversionsourcesPatchCall struct { - s *APIService - merchantId int64 - conversionSourceId string - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLinkCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accountslinkrequest *AccountsLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates information of an existing conversion source. +// Link: Performs an action on a link between two Merchant Center accounts, +// namely accountId and linkedAccountId. // -// - conversionSourceId: The ID of the conversion source to be updated. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { - c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account that should be linked. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { + c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.conversionsource = conversionsource - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. List of -// fields being updated. -func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.accountId = accountId + c.accountslinkrequest = accountslinkrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { +func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { +func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesPatchCall) Header() http.Header { +func (c *AccountsLinkCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.patch" call. +// Do executes the "content.accounts.link" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *AccountsLinkResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22153,7 +13856,7 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccountsLinkResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22166,116 +13869,221 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi return ret, nil } -type ConversionsourcesUndeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - undeleteconversionsourcerequest *UndeleteConversionSourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Re-enables an archived conversion source. +// List: Lists the sub-accounts in your Merchant Center account. // -// - conversionSourceId: The ID of the conversion source to be undeleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { - c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) List(merchantId uint64) *AccountsListCall { + c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.undeleteconversionsourcerequest = undeleteconversionsourcerequest + return c +} + +// Label sets the optional parameter "label": If view is set to "css", only +// return accounts that are assigned label with given ID. +func (c *AccountsListCall) Label(label uint64) *AccountsListCall { + c.urlParams_.Set("label", fmt.Sprint(label)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// accounts to return in the response, used for paging. +func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountsListCall) Name(name string) *AccountsListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". +// +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsListCall) View(view string) *AccountsListCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { +func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { +func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ConversionsourcesUndeleteCall) Header() http.Header { +func (c *AccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteconversionsourcerequest) - if err != nil { - return nil, err +func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.undelete" call. -func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountsListResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountsListResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type AccountsListlinksCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Listlinks: Returns the list of accounts linked to your Merchant Center +// account. +// +// - accountId: The ID of the account for which to list links. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { + c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + return c } -type CssesGetCall struct { - s *APIService - cssGroupId int64 - cssDomainId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// MaxResults sets the optional parameter "maxResults": The maximum number of +// links to return in the response, used for pagination. The minimum allowed +// value is 5 results per page. If provided value is lower than 5, it will be +// automatically increased to 5. +func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -// Get: Retrieves a single CSS domain by ID. -// -// - cssDomainId: The ID of the CSS domain to return. -// - cssGroupId: The ID of the managing account. If this parameter is not the -// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID -// and `cssDomainId` must be the ID of a CSS domain affiliated with this -// group. -func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { - c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { +func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22283,27 +14091,27 @@ func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { +func (c *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { +func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesGetCall) Header() http.Header { +func (c *AccountsListlinksCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22311,7 +14119,7 @@ func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22319,18 +14127,19 @@ func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.get" call. +// Do executes the "content.accounts.listlinks" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { +// *AccountsListLinksResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22349,7 +14158,7 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &AccountsListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22362,101 +14171,105 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { return ret, nil } -type CssesListCall struct { - s *APIService - cssGroupId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists CSS domains affiliated with a CSS group. -// -// - cssGroupId: The CSS group ID of CSS domains to be listed. -func (r *CssesService) List(cssGroupId int64) *CssesListCall { - c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// PageSize sets the optional parameter "pageSize": The maximum number of CSS -// domains to return. The service may return fewer than this value. If -// unspecified, at most 50 CSS domains will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type AccountsRequestphoneverificationCall struct { + s *APIService + merchantId int64 + accountId int64 + requestphoneverificationrequest *RequestPhoneVerificationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListCsses` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListCsses` must -// match the call that provided the page token. -func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Requestphoneverification: Request verification code to start phone +// verification. +// +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { + c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.requestphoneverificationrequest = requestphoneverificationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { +func (c *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { 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 *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { +func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesListCall) Header() http.Header { +func (c *AccountsRequestphoneverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *AccountsRequestphoneverificationCall) 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.requestphoneverificationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.list" call. +// Do executes the "content.accounts.requestphoneverification" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCssesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { +// *RequestPhoneVerificationResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22475,7 +14288,7 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCssesResponse{ + ret := &RequestPhoneVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22488,102 +14301,83 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type CssesUpdatelabelsCall struct { - s *APIService - cssGroupId int64 - cssDomainId int64 - labelids *LabelIds - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS -// group. +// Update: Updates a Merchant Center account. Any fields that are not provided +// are deleted from the resource. // -// - cssDomainId: The ID of the updated CSS domain. -// - cssGroupId: The CSS group ID of the updated CSS domain. -func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { - c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId - c.labelids = labelids +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { + c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.account = account return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { +func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { +func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *CssesUpdatelabelsCall) Header() http.Header { +func (c *AccountsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdateCall) 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.labelids) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.updatelabels" call. +// Do executes the "content.accounts.update" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.ServerResponse.Header or (if a response was returned at all) in +// *Account.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { +func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22602,7 +14396,7 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22615,71 +14409,82 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { return ret, nil } -type DatafeedsCustombatchCall struct { +type AccountsUpdatelabelsCall struct { s *APIService - datafeedscustombatchrequest *DatafeedsCustomBatchRequest + merchantId uint64 + accountId uint64 + accountsupdatelabelsrequest *AccountsUpdateLabelsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds -// in a single request. -func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { - c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedscustombatchrequest = datafeedscustombatchrequest +// Updatelabels: Updates labels that are assigned to the Merchant Center +// account by CSS user. +// +// - accountId: The ID of the account whose labels are updated. +// - merchantId: The ID of the managing account. +func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { + c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.accountsupdatelabelsrequest = accountsupdatelabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { +func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { +func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsCustombatchCall) Header() http.Header { +func (c *AccountsUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdatelabelsCall) 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.datafeedscustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountsupdatelabelsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.custombatch" call. +// Do executes the "content.accounts.updatelabels" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a response was +// *AccountsUpdateLabelsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { +func (c *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22698,7 +14503,7 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsCustomBatchResponse{ + ret := &AccountsUpdateLabelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22711,137 +14516,171 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC return ret, nil } -type DatafeedsDeleteCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsVerifyphonenumberCall struct { + s *APIService + merchantId int64 + accountId int64 + verifyphonenumberrequest *VerifyPhoneNumberRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a datafeed configuration from your Merchant Center account. +// Verifyphonenumber: Validates verification code to verify phone number for +// the account. If successful this will overwrite the value of +// `accounts.businessinformation.phoneNumber`. Only verified phone number will +// replace an existing verified phone number. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { - c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { + c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + c.accountId = accountId + c.verifyphonenumberrequest = verifyphonenumberrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { +func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { +func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsDeleteCall) Header() http.Header { +func (c *AccountsVerifyphonenumberCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountsVerifyphonenumberCall) 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.verifyphonenumberrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.delete" call. -func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.verifyphonenumber" call. +// Any non-2xx status code is an error. Response headers are in either +// *VerifyPhoneNumberResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &VerifyPhoneNumberResponse{ + 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 DatafeedsFetchnowCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCredentialsCreateCall struct { + s *APIService + accountId int64 + accountcredentials *AccountCredentials + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. -// If you need to call this method more than once per day, we recommend you use -// the Products service -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) -// to update your product data. +// Create: Uploads credentials for the Merchant Center account. If credentials +// already exist for this Merchant Center account and purpose, this method +// updates them. // -// - datafeedId: The ID of the datafeed to be fetched. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { - c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId +// - accountId: The merchant id of the account these credentials belong to. +func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { + c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountcredentials = accountcredentials return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { +func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { +func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsFetchnowCall) Header() http.Header { +func (c *AccountsCredentialsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountsCredentialsCreateCall) 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.accountcredentials) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22849,19 +14688,18 @@ func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.fetchnow" call. +// Do executes the "content.accounts.credentials.create" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { +// *AccountCredentials.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22880,7 +14718,7 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsFetchNowResponse{ + ret := &AccountCredentials{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22893,87 +14731,76 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc return ret, nil } -type DatafeedsGetCall struct { +type AccountsLabelsCreateCall struct { s *APIService - merchantId uint64 - datafeedId uint64 + accountId int64 + accountlabel *AccountLabel urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a datafeed configuration from your Merchant Center account. +// Create: Creates a new label, not assigned to any account. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { - c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId +// - accountId: The id of the account this label belongs to. +func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { + c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountlabel = accountlabel return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { +func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { +func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsGetCall) Header() http.Header { +func (c *AccountsLabelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *AccountsLabelsCreateCall) 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.accountlabel) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.get" call. +// Do executes the "content.accounts.labels.create" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *AccountLabel.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22992,7 +14819,7 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23005,139 +14832,115 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { return ret, nil } -type DatafeedsInsertCall struct { +type AccountsLabelsDeleteCall struct { s *APIService - merchantId uint64 - datafeed *Datafeed + accountId int64 + labelId int64 urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Registers a datafeed configuration with your Merchant Center -// account. +// Delete: Deletes a label and removes it from all accounts to which it was +// assigned. // -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { - c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeed = datafeed +// - accountId: The id of the account that owns the label. +// - labelId: The id of the label to delete. +func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { + c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.labelId = labelId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { +func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { +func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsInsertCall) Header() http.Header { +func (c *AccountsLabelsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +// Do executes the "content.accounts.labels.delete" call. +func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Datafeed{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type DatafeedsListCall struct { +type AccountsLabelsListCall struct { s *APIService - merchantId uint64 + accountId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the configurations for datafeeds in your Merchant Center -// account. +// List: Lists the labels assigned to an account. // -// - merchantId: The ID of the account that manages the datafeeds. This account -// cannot be a multi-client account. -func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { - c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The account id for whose labels are to be listed. +func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { + c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// PageSize sets the optional parameter "pageSize": The maximum number of +// labels to return. The service may return fewer than this value. If +// unspecified, at most 50 labels will be returned. The maximum value is 1000; +// values above 1000 will be coerced to 1000. +func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAccountLabels` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListAccountLabels` must match the call that provided the page token. +func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23145,7 +14948,7 @@ func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { +func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23153,27 +14956,27 @@ func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { +func (c *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { +func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsListCall) Header() http.Header { +func (c *AccountsLabelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23181,7 +14984,7 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23189,18 +14992,18 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.list" call. +// Do executes the "content.accounts.labels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { +// *ListAccountLabelsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23219,7 +15022,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsListResponse{ + ret := &ListAccountLabelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23235,7 +15038,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { +func (c *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23253,82 +15056,80 @@ func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResp } } -type DatafeedsUpdateCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - datafeed *Datafeed - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLabelsPatchCall struct { + s *APIService + accountId int64 + labelId int64 + accountlabel *AccountLabel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a datafeed configuration of your Merchant Center account. -// Any fields that are not provided are deleted from the resource. +// Patch: Updates a label. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { - c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId - c.datafeed = datafeed +// - accountId: The id of the account this label belongs to. +// - labelId: The id of the label to update. +func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { + c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.labelId = labelId + c.accountlabel = accountlabel return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { +func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { +func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedsUpdateCall) Header() http.Header { +func (c *AccountsLabelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsPatchCall) 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.datafeed) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountlabel) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.update" call. +// Do executes the "content.accounts.labels.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *AccountLabel.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23347,7 +15148,7 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23360,71 +15161,78 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error return ret, nil } -type DatafeedstatusesCustombatchCall struct { - s *APIService - datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierCreateCall struct { + s *APIService + accountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Gets multiple Merchant Center datafeed statuses in a single -// request. -func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { - c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest +// Create: Links return carrier to a merchant account. +// +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { + c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountreturncarrier = accountreturncarrier return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { +func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { +func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesCustombatchCall) Header() http.Header { +func (c *AccountsReturncarrierCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierCreateCall) 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.datafeedstatusescustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountreturncarrier) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") 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{ + "accountId": strconv.FormatInt(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.custombatch" call. +// Do executes the "content.accounts.returncarrier.create" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { +// *AccountReturnCarrier.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23443,7 +15251,7 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesCustomBatchResponse{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23456,185 +15264,107 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat return ret, nil } -type DatafeedstatusesGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierDeleteCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a datafeed from your Merchant Center account. +// Delete: Delete a return carrier in the merchant account. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { - c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId - return c -} - -// Country sets the optional parameter "country": Deprecated. Use `feedLabel` -// instead. The country to get the datafeed status for. If this parameter is -// provided then `language` must also be provided. Note that this parameter is -// required for feeds targeting multiple countries and languages, since a feed -// may have a different status for each target. -func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { - c.urlParams_.Set("country", country) - return c -} - -// FeedLabel sets the optional parameter "feedLabel": The feed label to get the -// datafeed status for. If this parameter is provided then `language` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { - c.urlParams_.Set("feedLabel", feedLabel) - return c -} - -// Language sets the optional parameter "language": The language to get the -// datafeed status for. If this parameter is provided then `country` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { - c.urlParams_.Set("language", language) +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { + c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { +func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { +func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesGetCall) Header() http.Header { +func (c *AccountsReturncarrierDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DatafeedStatus.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { +// Do executes the "content.accounts.returncarrier.delete" call. +func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DatafeedStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type DatafeedstatusesListCall struct { +type AccountsReturncarrierListCall struct { s *APIService - merchantId uint64 + accountId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the statuses of the datafeeds in your Merchant Center account. +// List: Lists available return carriers in the merchant account. // -// - merchantId: The ID of the account that manages the datafeeds. This account -// cannot be a multi-client account. -func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { - c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { + c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23642,27 +15372,27 @@ func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *Datafeedstatuse // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatafeedstatusesListCall) Header() http.Header { +func (c *AccountsReturncarrierListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23670,7 +15400,7 @@ func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23678,18 +15408,18 @@ func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.list" call. +// Do executes the "content.accounts.returncarrier.list" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *ListAccountReturnCarrierResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { +func (c *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23708,7 +15438,7 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesListResponse{ + ret := &ListAccountReturnCarrierResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23721,107 +15451,83 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type FreelistingsprogramGetCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierPatchCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status and review eligibility for the free listing -// program. Returns errors and warnings if they require action to resolve, will -// become disapprovals, or impact impressions. Use `accountstatuses` to view -// all issues for an account. +// Patch: Updates a return carrier in the merchant account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { - c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { + c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId + c.accountreturncarrier = accountreturncarrier return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { - 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 *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { - c.ifNoneMatch_ = entityTag +func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { +func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramGetCall) Header() http.Header { +func (c *AccountsReturncarrierPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *AccountsReturncarrierPatchCall) 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.accountreturncarrier) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.get" call. +// Do executes the "content.accounts.returncarrier.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *FreeListingsProgramStatus.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { +// *AccountReturnCarrier.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23840,7 +15546,7 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FreeListingsProgramStatus{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23853,182 +15559,277 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList return ret, nil } -type FreelistingsprogramRequestreviewCall struct { - s *APIService - merchantId int64 - requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesCustombatchCall struct { + s *APIService + accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Requestreview: Requests a review of free listings in a specific region. This -// method deprecated. Use the `MerchantSupportService` to view product and -// account issues and request a review. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { - c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest +// Custombatch: Retrieves multiple Merchant Center account statuses in a single +// request. +func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { + c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountstatusescustombatchrequest = accountstatusescustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { +func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { +func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramRequestreviewCall) Header() http.Header { +func (c *AccountstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramRequestreviewCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesCustombatchCall) 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.requestreviewfreelistingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") + urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.requestreview" call. -func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accountstatuses.custombatch" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountstatusesCustomBatchResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountstatusesCustomBatchResponse{ + 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 FreelistingsprogramCheckoutsettingsDeleteCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` -// program. +// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues +// are returned for multi-client accounts. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { - c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { + c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId + return c +} + +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { +func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { +func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { +func (c *AccountstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accountstatuses.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountStatus.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountStatus{ + 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 FreelistingsprogramCheckoutsettingsGetCall struct { +type AccountstatusesListCall struct { s *APIService - merchantId int64 + merchantId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets Checkout settings for the given merchant. This includes -// information about review state, enrollment state and URL settings. +// List: Lists the statuses of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { - c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { + c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// account statuses to return in the response, used for paging. +func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24036,27 +15837,27 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { +func (c *AccountstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24064,7 +15865,7 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24072,18 +15873,18 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. +// Do executes the "content.accountstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +// *AccountstatusesListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24102,7 +15903,7 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &AccountstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24115,77 +15916,92 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type FreelistingsprogramCheckoutsettingsInsertCall struct { - s *APIService - merchantId int64 - insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Insert: Enrolls merchant in `Checkout` program. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { - c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest +type AccounttaxCustombatchCall struct { + s *APIService + accounttaxcustombatchrequest *AccounttaxCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Custombatch: Retrieves and updates tax settings of multiple accounts in a +// single request. +func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { + c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accounttaxcustombatchrequest = accounttaxcustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { +func (c *AccounttaxCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxCustombatchCall) 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.insertcheckoutsettingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. +// Do executes the "content.accounttax.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +// *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24204,7 +16020,7 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &AccounttaxCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24217,71 +16033,89 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal return ret, nil } -type LiasettingsCustombatchCall struct { - s *APIService - liasettingscustombatchrequest *LiasettingsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccounttaxGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts -// in a single request. -func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { - c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.liasettingscustombatchrequest = liasettingscustombatchrequest +// Get: Retrieves the tax settings of the account. +// +// - accountId: The ID of the account for which to get/update account tax +// settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { + c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { +func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { +func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsCustombatchCall) Header() http.Header { +func (c *AccounttaxGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsCustombatchCall) 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.liasettingscustombatchrequest) - if err != nil { - return nil, err +func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.custombatch" call. +// Do executes the "content.accounttax.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { +// *AccountTax.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24300,7 +16134,7 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsCustomBatchResponse{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24313,33 +16147,44 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti return ret, nil } -type LiasettingsGetCall struct { +type AccounttaxListCall struct { s *APIService merchantId uint64 - accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves the LIA settings of the account. +// List: Lists the tax settings of the sub-accounts in your Merchant Center +// account. // -// - accountId: The ID of the account for which to get or update LIA settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { - c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { + c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// tax settings to return in the response, used for paging. +func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { +func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24347,27 +16192,27 @@ func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { +func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { +func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsGetCall) Header() http.Header { +func (c *AccounttaxListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24375,7 +16220,7 @@ func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24384,17 +16229,17 @@ func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.get" call. +// Do executes the "content.accounttax.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaSettings.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +// *AccounttaxListResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24413,7 +16258,7 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaSettings{ + ret := &AccounttaxListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24426,73 +16271,88 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err return ret, nil } -type LiasettingsGetaccessiblegmbaccountsCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Getaccessiblegmbaccounts: Retrieves the list of accessible Business -// Profiles. +type AccounttaxUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accounttax *AccountTax + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the tax settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. +// - accountId: The ID of the account for which to get/update account tax +// settings. // - merchantId: The ID of the managing account. If this parameter is not the // same as accountId, then this account must be a multi-client account and // `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { - c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { + c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId + c.accounttax = accounttax return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { +func (c *AccounttaxUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *AccounttaxUpdateCall) 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.accounttax) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -24504,13 +16364,12 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. +// Do executes the "content.accounttax.update" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { +// *AccountTax.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24529,7 +16388,7 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsGetAccessibleGmbAccountsResponse{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24542,99 +16401,80 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type LiasettingsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type CollectionsCreateCall struct { + s *APIService + merchantId int64 + collection *Collection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the LIA settings of the sub-accounts in your Merchant Center -// account. +// Create: Uploads a collection to your Merchant Center account. If a +// collection with the same collectionId already exists, this method updates +// that entry. In each update, the collection is completely replaced by the +// fields in the body of the update request. // -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { - c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { + c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// LIA settings to return in the response, used for paging. -func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.collection = collection return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { +func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { +func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsListCall) Header() http.Header { +func (c *CollectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *CollectionsCreateCall) 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.collection) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.list" call. +// Do executes the "content.collections.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { +// *Collection.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24653,7 +16493,7 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsListResponse{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24666,203 +16506,165 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LiasettingsListposdataprovidersCall struct { +type CollectionsDeleteCall struct { s *APIService + merchantId int64 + collectionId string urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Listposdataproviders: Retrieves the list of POS data providers that have -// active settings for the all eiligible countries. -func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { - c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Delete: Deletes a collection from your Merchant Center account. +// +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { + c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.collectionId = collectionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { +func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { +func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsListposdataprovidersCall) Header() http.Header { +func (c *CollectionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsDeleteCall) 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, "liasettings/posdataproviders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.listposdataproviders" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { +// Do executes the "content.collections.delete" call. +func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiasettingsListPosDataProvidersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type LiasettingsRequestgmbaccessCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionsGetCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Requestgmbaccess: Requests access to a specified Business Profile. +// Get: Retrieves a collection from your Merchant Center account. // -// - accountId: The ID of the account for which Business Profile access is -// requested. -// - gmbEmail: The email of the Business Profile. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { - c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - collectionId: The REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { + c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("gmbEmail", gmbEmail) + c.collectionId = collectionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { +func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { +func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { +func (c *CollectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestgmbaccess" call. +// Do executes the "content.collections.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { +// *Collection.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24881,7 +16683,7 @@ func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*Lia if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsRequestGmbAccessResponse{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24894,83 +16696,102 @@ func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*Lia return ret, nil } -type LiasettingsRequestinventoryverificationCall struct { - s *APIService - merchantId uint64 - accountId uint64 - country string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionsListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Requestinventoryverification: Requests inventory validation for the -// specified country. +// List: Lists the collections in your Merchant Center account. The response +// might contain fewer items than specified by page_size. Rely on +// next_page_token to determine if there are more items to be requested. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - country: The country for which inventory validation is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { - c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { + c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.country = country + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// collections to return in the response, used for paging. Defaults to 50; +// values above 1000 will be coerced to 1000. +func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { +func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { +func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { +func (c *CollectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - "country": c.country, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestinventoryverification" call. +// Do executes the "content.collections.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListCollectionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { +func (c *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24989,7 +16810,7 @@ func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsRequestInventoryVerificationResponse{ + ret := &ListCollectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25002,87 +16823,110 @@ func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallO return ret, nil } -type LiasettingsSetinventoryverificationcontactCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Setinventoryverificationcontact: Sets the inventory verification contract -// for the specified country. +type CollectionstatusesGetCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the status of a collection from your Merchant Center account. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - contactEmail: The email of the inventory verification contact. -// - contactName: The name of the inventory verification contact. -// - country: The country for which inventory verification is requested. -// - language: The language for which inventory verification is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { - c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { + c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - c.urlParams_.Set("language", language) - c.urlParams_.Set("contactName", contactName) - c.urlParams_.Set("contactEmail", contactEmail) + c.collectionId = collectionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { +func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { +func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { +func (c *CollectionstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setinventoryverificationcontact" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { +// Do executes the "content.collectionstatuses.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *CollectionStatus.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25101,7 +16945,7 @@ func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetInventoryVerificationContactResponse{ + ret := &CollectionStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25114,107 +16958,100 @@ func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.Ca return ret, nil } -type LiasettingsSetomnichannelexperienceCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionstatusesListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Setomnichannelexperience: Sets the omnichannel experience for the specified -// country. Only supported for merchants whose POS data provider is trusted to -// enable the corresponding experience. For more context, see these help -// articles about LFP (https://support.google.com/merchants/answer/7676652) and -// how to get started (https://support.google.com/merchants/answer/7676578) -// with it. +// List: Lists the statuses of the collections in your Merchant Center account. // -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { - c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { + c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Country sets the optional parameter "country": The CLDR country code (for -// example, "US") for which the omnichannel experience is selected. -func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("country", country) return c } -// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) -// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted -// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front -// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details -// about these types can be found here. -func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("lsfType", lsfType) +// PageSize sets the optional parameter "pageSize": The maximum number of +// collection statuses to return in the response, used for paging. Defaults to +// 50; values above 1000 will be coerced to 1000. +func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for -// this country. Acceptable values are: - "pickupToday" - "pickupLater" -func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { +func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { 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 *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { +func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetomnichannelexperienceCall) Header() http.Header { +func (c *CollectionstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setomnichannelexperience" call. +// Do executes the "content.collectionstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaOmnichannelExperience.ServerResponse.Header or (if a response was +// *ListCollectionStatusesResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { +func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25233,7 +17070,7 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaOmnichannelExperience{ + ret := &ListCollectionStatusesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25246,74 +17083,79 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio return ret, nil } -type LiasettingsSetposdataproviderCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Setposdataprovider: Sets the POS data provider for the specified country. -// -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - country: The country for which the POS data provider is selected. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { - c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of -// POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) - return c +type ConversionsourcesCreateCall struct { + s *APIService + merchantId int64 + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PosExternalAccountId sets the optional parameter "posExternalAccountId": The -// account ID by which this merchant is known to the POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posExternalAccountId", posExternalAccountId) +// Create: Creates a new conversion source. +// +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { + c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionsource = conversionsource return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { +func (c *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { +func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsSetposdataproviderCall) Header() http.Header { +func (c *ConversionsourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ConversionsourcesCreateCall) 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.conversionsource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25321,19 +17163,18 @@ func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setposdataprovider" call. +// Do executes the "content.conversionsources.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { +// *ConversionSource.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25352,7 +17193,7 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetPosDataProviderResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25365,179 +17206,165 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L return ret, nil } -type LiasettingsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - liasettings *LiaSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesDeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the LIA settings of the account. Any fields that are not -// provided are deleted from the resource. +// Delete: Archives an existing conversion source. It will be recoverable for +// 30 days. This archiving behavior is not typical in the Content API and +// unique to this service. // -// - accountId: The ID of the account for which to get or update LIA settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { - c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be deleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { + c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.liasettings = liasettings + c.conversionSourceId = conversionSourceId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { +func (c *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { +func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LiasettingsUpdateCall) Header() http.Header { +func (c *ConversionsourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiaSettings.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +// Do executes the "content.conversionsources.delete" call. +func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiaSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type LocalinventoryCustombatchCall struct { - s *APIService - localinventorycustombatchrequest *LocalinventoryCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesGetCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Updates local inventory for multiple products or stores in a -// single request. -func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { - c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.localinventorycustombatchrequest = localinventorycustombatchrequest +// Get: Fetches a conversion source. +// +// - conversionSourceId: The REST ID of the collection. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { + c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { +func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { +func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocalinventoryCustombatchCall) Header() http.Header { +func (c *ConversionsourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventorycustombatchrequest) - if err != nil { - return nil, err +func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.custombatch" call. +// Do executes the "content.conversionsources.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalinventoryCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { +// *ConversionSource.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25556,7 +17383,7 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalinventoryCustomBatchResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25569,82 +17396,106 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local return ret, nil } -type LocalinventoryInsertCall struct { - s *APIService - merchantId uint64 - productId string - localinventory *LocalInventory - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Updates the local inventory of a product in your Merchant Center -// account. +// List: Retrieves the list of conversion sources the caller has access to. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product for which to update local inventory. -func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { - c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { + c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.localinventory = localinventory + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// conversion sources to return in a page. If no `page_size` is specified, +// `100` is used as the default value. The maximum value is `200`. Values above +// `200` will be coerced to `200`. Regardless of pagination, at most `200` +// conversion sources are returned in total. +func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. +func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ShowDeleted sets the optional parameter "showDeleted": If true, also returns +// archived conversion sources. +func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { +func (c *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { +func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocalinventoryInsertCall) Header() http.Header { +func (c *ConversionsourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventory) - if err != nil { - return nil, err +func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.insert" call. +// Do executes the "content.conversionsources.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalInventory.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { +// *ListConversionSourcesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25663,7 +17514,7 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalInventory{ + ret := &ListConversionSourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25676,96 +17527,109 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven return ret, nil } -type MerchantsupportRenderaccountissuesCall struct { - s *APIService - merchantId int64 - renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Renderaccountissues: Provide a list of merchant's issues with a support -// content and available actions. This content and actions are meant to be -// rendered and shown in third-party applications. -// -// - merchantId: The ID of the account to fetch issues for. -func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { - c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload - return c +type ConversionsourcesPatchCall struct { + s *APIService + merchantId int64 + conversionSourceId string + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("languageCode", languageCode) +// Patch: Updates information of an existing conversion source. +// +// - conversionSourceId: The ID of the conversion source to be updated. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { + c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId + c.conversionsource = conversionsource return c } -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("timeZone", timeZone) +// UpdateMask sets the optional parameter "updateMask": Required. List of +// fields being updated. +func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { +func (c *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { +func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { +func (c *ConversionsourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesPatchCall) 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.renderaccountissuesrequestpayload) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderaccountissues" call. +// Do executes the "content.conversionsources.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *RenderAccountIssuesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { +// *ConversionSource.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25784,7 +17648,7 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RenderAccountIssuesResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25797,82 +17661,61 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption return ret, nil } -type MerchantsupportRenderproductissuesCall struct { - s *APIService - merchantId int64 - productId string - renderproductissuesrequestpayload *RenderProductIssuesRequestPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesUndeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + undeleteconversionsourcerequest *UndeleteConversionSourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Renderproductissues: Provide a list of issues for merchant's product with a -// support content and available actions. This content and actions are meant to -// be rendered and shown in third-party applications. +// Undelete: Re-enables an archived conversion source. // -// - merchantId: The ID of the account that contains the product. -// - productId: The REST_ID -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) -// of the product to fetch issues for. -func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { - c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be undeleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { + c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.renderproductissuesrequestpayload = renderproductissuesrequestpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("timeZone", timeZone) + c.conversionSourceId = conversionSourceId + c.undeleteconversionsourcerequest = undeleteconversionsourcerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { +func (c *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { +func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { +func (c *ConversionsourcesUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesUndeleteCall) 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.renderproductissuesrequestpayload) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteconversionsourcerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25880,136 +17723,109 @@ func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderproductissues" call. -// Any non-2xx status code is an error. Response headers are in either -// *RenderProductIssuesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { +// Do executes the "content.conversionsources.undelete" call. +func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &RenderProductIssuesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type MerchantsupportTriggeractionCall struct { - s *APIService - merchantId int64 - triggeractionpayload *TriggerActionPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesGetCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Triggeraction: Start an action. The action can be requested by merchants in -// third-party application. Before merchants can request the action, the -// third-party application needs to show them action specific content and -// display a user input form. The action can be successfully started only once -// all `required` inputs are provided. If any `required` input is missing, or -// invalid value was provided, the service will return 400 error. Validation -// errors will contain Ids for all problematic field together with translated, -// human readable error messages that can be shown to the user. +// Get: Retrieves a single CSS domain by ID. // -// - merchantId: The ID of the merchant's account. -func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { - c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.triggeractionpayload = triggeractionpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": Language code IETF -// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the -// response. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { - c.urlParams_.Set("languageCode", languageCode) +// - cssDomainId: The ID of the CSS domain to return. +// - cssGroupId: The ID of the managing account. If this parameter is not the +// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID +// and `cssDomainId` must be the ID of a CSS domain affiliated with this +// group. +func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { + c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { +func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { +func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MerchantsupportTriggeractionCall) Header() http.Header { +func (c *CssesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggeractionpayload) - if err != nil { - return nil, err +func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.triggeraction" call. +// Do executes the "content.csses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *TriggerActionResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { +// *Css.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26028,7 +17844,7 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TriggerActionResponse{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26041,83 +17857,101 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr return ret, nil } -type OrderinvoicesCreatechargeinvoiceCall struct { - s *APIService - merchantId uint64 - orderId string - orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesListCall struct { + s *APIService + cssGroupId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists CSS domains affiliated with a CSS group. +// +// - cssGroupId: The CSS group ID of CSS domains to be listed. +func (r *CssesService) List(cssGroupId int64) *CssesListCall { + c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of CSS +// domains to return. The service may return fewer than this value. If +// unspecified, at most 50 CSS domains will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Createchargeinvoice: Creates a charge invoice for a shipment group, and -// triggers a charge capture for orderinvoice enabled orders. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { - c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListCsses` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListCsses` must +// match the call that provided the page token. +func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { +func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { 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 *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { +func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { +func (c *CssesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderinvoicesCreatechargeinvoiceCall) 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.orderinvoicescreatechargeinvoicerequest) - if err != nil { - return nil, err +func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderinvoices.createchargeinvoice" call. +// Do executes the "content.csses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { +// *ListCssesResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26136,7 +17970,7 @@ func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderinvoicesCreateChargeInvoiceResponse{ + ret := &ListCssesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26149,66 +17983,83 @@ func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) return ret, nil } -type OrderinvoicesCreaterefundinvoiceCall struct { - s *APIService - merchantId uint64 - orderId string - orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type CssesUpdatelabelsCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + labelids *LabelIds + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Createrefundinvoice: Creates a refund invoice for one or more shipment -// groups, and triggers a refund for orderinvoice enabled orders. This can only -// be used for line items that have previously been charged using -// `createChargeInvoice`. All amounts (except for the summary) are incremental -// with respect to the previous invoice. +// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS +// group. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { - c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest +// - cssDomainId: The ID of the updated CSS domain. +// - cssGroupId: The CSS group ID of the updated CSS domain. +func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { + c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId + c.labelids = labelids return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { +func (c *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { +func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { +func (c *CssesUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { +func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.labelids) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26216,19 +18067,18 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderinvoices.createrefundinvoice" call. +// Do executes the "content.csses.updatelabels" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { +// *Css.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26247,7 +18097,7 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderinvoicesCreateRefundInvoiceResponse{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26260,114 +18110,71 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) return ret, nil } -type OrderreportsListdisbursementsCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Listdisbursements: Retrieves a report for disbursements from your Merchant -// Center account. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreportsService) Listdisbursements(merchantId uint64) *OrderreportsListdisbursementsCall { - c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// DisbursementEndDate sets the optional parameter "disbursementEndDate": The -// last date which disbursements occurred. In ISO 8601 format. Default: current -// date. -func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("disbursementEndDate", disbursementEndDate) - return c -} - -// DisbursementStartDate sets the optional parameter "disbursementStartDate": -// The first date which disbursements occurred. In ISO 8601 format. -func (c *OrderreportsListdisbursementsCall) DisbursementStartDate(disbursementStartDate string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("disbursementStartDate", disbursementStartDate) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// disbursements to return in the response, used for paging. -func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type DatafeedsCustombatchCall struct { + s *APIService + datafeedscustombatchrequest *DatafeedsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("pageToken", pageToken) +// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds +// in a single request. +func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { + c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedscustombatchrequest = datafeedscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall { +func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 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 *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall { +func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreportsListdisbursementsCall) Header() http.Header { +func (c *DatafeedsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreportsListdisbursementsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *DatafeedsCustombatchCall) 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.datafeedscustombatchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreports.listdisbursements" call. +// Do executes the "content.datafeeds.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) { +func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26386,7 +18193,7 @@ func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreportsListDisbursementsResponse{ + ret := &DatafeedsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26399,248 +18206,137 @@ func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type OrderreportsListtransactionsCall struct { - s *APIService - merchantId uint64 - disbursementId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsDeleteCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Listtransactions: Retrieves a list of transactions for a disbursement from -// your Merchant Center account. +// Delete: Deletes a datafeed configuration from your Merchant Center account. // -// - disbursementId: The Google-provided ID of the disbursement (found in -// Wallet). -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string) *OrderreportsListtransactionsCall { - c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { + c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.disbursementId = disbursementId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// disbursements to return in the response, used for paging. -func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// TransactionEndDate sets the optional parameter "transactionEndDate": The -// last date in which transaction occurred. In ISO 8601 format. Default: -// current date. -func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("transactionEndDate", transactionEndDate) - return c -} - -// TransactionStartDate sets the optional parameter "transactionStartDate": The -// first date in which transaction occurred. In ISO 8601 format. -func (c *OrderreportsListtransactionsCall) TransactionStartDate(transactionStartDate string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("transactionStartDate", transactionStartDate) + c.datafeedId = datafeedId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall { +func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall { +func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreportsListtransactionsCall) Header() http.Header { +func (c *DatafeedsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "disbursementId": c.disbursementId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreports.listtransactions" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrderreportsListTransactionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) { +// Do executes the "content.datafeeds.delete" call. +func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrderreportsListTransactionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) + return gensupport.WrapError(err) } + return nil } -type OrderreturnsAcknowledgeCall struct { - s *APIService - merchantId uint64 - returnId string - orderreturnsacknowledgerequest *OrderreturnsAcknowledgeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsFetchnowCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Acknowledge: Acks an order return in your Merchant Center account. +// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. +// If you need to call this method more than once per day, we recommend you use +// the Products service +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) +// to update your product data. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: The ID of the return. -func (r *OrderreturnsService) Acknowledge(merchantId uint64, returnId string, orderreturnsacknowledgerequest *OrderreturnsAcknowledgeRequest) *OrderreturnsAcknowledgeCall { - c := &OrderreturnsAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed to be fetched. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { + c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId - c.orderreturnsacknowledgerequest = orderreturnsacknowledgerequest + c.datafeedId = datafeedId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsAcknowledgeCall) Fields(s ...googleapi.Field) *OrderreturnsAcknowledgeCall { +func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsAcknowledgeCall) Context(ctx context.Context) *OrderreturnsAcknowledgeCall { +func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsAcknowledgeCall) Header() http.Header { +func (c *DatafeedsFetchnowCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsAcknowledgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderreturnsacknowledgerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/acknowledge") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26649,18 +18345,18 @@ func (c *OrderreturnsAcknowledgeCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.acknowledge" call. +// Do executes the "content.datafeeds.fetchnow" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsAcknowledgeResponse.ServerResponse.Header or (if a response was +// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrderreturnsAcknowledgeResponse, error) { +func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26679,7 +18375,7 @@ func (c *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*Orderre if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsAcknowledgeResponse{ + ret := &DatafeedsFetchNowResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26692,78 +18388,87 @@ func (c *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*Orderre return ret, nil } -type OrderreturnsCreateorderreturnCall struct { - s *APIService - merchantId uint64 - orderreturnscreateorderreturnrequest *OrderreturnsCreateOrderReturnRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsGetCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Createorderreturn: Create return in your Merchant Center account. +// Get: Retrieves a datafeed configuration from your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreturnsService) Createorderreturn(merchantId uint64, orderreturnscreateorderreturnrequest *OrderreturnsCreateOrderReturnRequest) *OrderreturnsCreateorderreturnCall { - c := &OrderreturnsCreateorderreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { + c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderreturnscreateorderreturnrequest = orderreturnscreateorderreturnrequest + c.datafeedId = datafeedId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsCreateorderreturnCall) Fields(s ...googleapi.Field) *OrderreturnsCreateorderreturnCall { +func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsCreateorderreturnCall) Context(ctx context.Context) *OrderreturnsCreateorderreturnCall { +func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsCreateorderreturnCall) Header() http.Header { +func (c *DatafeedsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsCreateorderreturnCall) 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.orderreturnscreateorderreturnrequest) - if err != nil { - return nil, err +func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/createOrderReturn") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.createorderreturn" call. +// Do executes the "content.datafeeds.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsCreateOrderReturnResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*OrderreturnsCreateOrderReturnResponse, error) { +// *Datafeed.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26782,7 +18487,7 @@ func (c *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsCreateOrderReturnResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26795,88 +18500,78 @@ func (c *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type OrderreturnsGetCall struct { - s *APIService - merchantId uint64 - returnId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsInsertCall struct { + s *APIService + merchantId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves an order return from your Merchant Center account. +// Insert: Registers a datafeed configuration with your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: Merchant order return ID generated by Google. -func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { - c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { + c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId + c.datafeed = datafeed return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { +func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { +func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsGetCall) Header() http.Header { +func (c *DatafeedsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.get" call. +// Do executes the "content.datafeeds.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *MerchantOrderReturn.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { +// *Datafeed.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26895,7 +18590,7 @@ func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderRe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MerchantOrderReturn{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26908,7 +18603,7 @@ func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderRe return ret, nil } -type OrderreturnsListCall struct { +type DatafeedsListCall struct { s *APIService merchantId uint64 urlParams_ gensupport.URLParams @@ -26917,147 +18612,35 @@ type OrderreturnsListCall struct { header_ http.Header } -// List: Lists order returns in your Merchant Center account. +// List: Lists the configurations for datafeeds in your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { - c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { + c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } -// Acknowledged sets the optional parameter "acknowledged": Obtains order -// returns that match the acknowledgement status. When set to true, obtains -// order returns that have been acknowledged. When false, obtains order returns -// that have not been acknowledged. When not provided, obtains order returns -// regardless of their acknowledgement status. We recommend using this filter -// set to `false`, in conjunction with the `acknowledge` call, such that only -// un-acknowledged order returns are returned. -func (c *OrderreturnsListCall) Acknowledged(acknowledged bool) *OrderreturnsListCall { - c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) - return c -} - -// CreatedEndDate sets the optional parameter "createdEndDate": Obtains order -// returns created before this date (inclusively), in ISO 8601 format. -func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { - c.urlParams_.Set("createdEndDate", createdEndDate) - return c -} - -// CreatedStartDate sets the optional parameter "createdStartDate": Obtains -// order returns created after this date (inclusively), in ISO 8601 format. -func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { - c.urlParams_.Set("createdStartDate", createdStartDate) - return c -} - -// GoogleOrderIds sets the optional parameter "googleOrderIds": Obtains order -// returns with the specified order ids. If this parameter is provided, -// createdStartDate, createdEndDate, shipmentType, shipmentStatus, -// shipmentState and acknowledged parameters must be not set. Note: if -// googleOrderId and shipmentTrackingNumber parameters are provided, the -// obtained results will include all order returns that either match the -// specified order id or the specified tracking number. -func (c *OrderreturnsListCall) GoogleOrderIds(googleOrderIds ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("googleOrderIds", append([]string{}, googleOrderIds...)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of -// order returns to return in the response, used for paging. The default value -// is 25 returns per page, and the maximum allowed value is 250 returns per -// page. -func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { +// products to return in the response, used for paging. +func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// OrderBy sets the optional parameter "orderBy": Return the results in the -// specified order. -// -// Possible values: -// -// "RETURN_CREATION_TIME_DESC" - Return results in descending order. -// "RETURN_CREATION_TIME_ASC" - Return results in ascending order. -func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageToken sets the optional parameter "pageToken": The token returned by the // previous request. -func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { +func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ShipmentStates sets the optional parameter "shipmentStates": Obtains order -// returns that match any shipment state provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment states. -// -// Possible values: -// -// "NEW" - Return shipments with `new` state only. -// "SHIPPED" - Return shipments with `shipped` state only. -// "COMPLETED" - Return shipments with `completed` state only. -// "UNDELIVERABLE" - Return shipments with `undeliverable` state only. -// "PENDING" - Return shipments with `pending` state only. -func (c *OrderreturnsListCall) ShipmentStates(shipmentStates ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentStates", append([]string{}, shipmentStates...)) - return c -} - -// ShipmentStatus sets the optional parameter "shipmentStatus": Obtains order -// returns that match any shipment status provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment statuses. -// -// Possible values: -// -// "NEW" - Return shipments with `new` status only. -// "IN_PROGRESS" - Return shipments with `inProgress` status only. -// "PROCESSED" - Return shipments with `processed` status only. -func (c *OrderreturnsListCall) ShipmentStatus(shipmentStatus ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentStatus", append([]string{}, shipmentStatus...)) - return c -} - -// ShipmentTrackingNumbers sets the optional parameter -// "shipmentTrackingNumbers": Obtains order returns with the specified tracking -// numbers. If this parameter is provided, createdStartDate, createdEndDate, -// shipmentType, shipmentStatus, shipmentState and acknowledged parameters must -// be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are -// provided, the obtained results will include all order returns that either -// match the specified order id or the specified tracking number. -func (c *OrderreturnsListCall) ShipmentTrackingNumbers(shipmentTrackingNumbers ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentTrackingNumbers", append([]string{}, shipmentTrackingNumbers...)) - return c -} - -// ShipmentTypes sets the optional parameter "shipmentTypes": Obtains order -// returns that match any shipment type provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment types. -// -// Possible values: -// -// "BY_MAIL" - Return shipments with type `byMail` only. -// "RETURNLESS" - Return shipments with type `returnless` only. -// "CONTACT_CUSTOMER_SUPPORT" - Return shipments with type -// -// `contactCustomerSupport` only. -func (c *OrderreturnsListCall) ShipmentTypes(shipmentTypes ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentTypes", append([]string{}, shipmentTypes...)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { +func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27065,27 +18648,27 @@ func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCal // 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 *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { +func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { +func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsListCall) Header() http.Header { +func (c *DatafeedsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27093,7 +18676,7 @@ func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27106,13 +18689,13 @@ func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { +// Do executes the "content.datafeeds.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *DatafeedsListResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27131,7 +18714,7 @@ func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsLi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsListResponse{ + ret := &DatafeedsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27147,7 +18730,7 @@ func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsLi // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { +func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27165,82 +18748,82 @@ func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsLi } } -type OrderreturnsProcessCall struct { - s *APIService - merchantId uint64 - returnId string - orderreturnsprocessrequest *OrderreturnsProcessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsUpdateCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Process: Processes return in your Merchant Center account. +// Update: Updates a datafeed configuration of your Merchant Center account. +// Any fields that are not provided are deleted from the resource. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: The ID of the return. -func (r *OrderreturnsService) Process(merchantId uint64, returnId string, orderreturnsprocessrequest *OrderreturnsProcessRequest) *OrderreturnsProcessCall { - c := &OrderreturnsProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { + c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId - c.orderreturnsprocessrequest = orderreturnsprocessrequest + c.datafeedId = datafeedId + c.datafeed = datafeed return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsProcessCall) Fields(s ...googleapi.Field) *OrderreturnsProcessCall { +func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsProcessCall) Context(ctx context.Context) *OrderreturnsProcessCall { +func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsProcessCall) Header() http.Header { +func (c *DatafeedsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsProcessCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderreturnsprocessrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/process") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.process" call. +// Do executes the "content.datafeeds.update" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsProcessResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*OrderreturnsProcessResponse, error) { +// *Datafeed.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27259,7 +18842,7 @@ func (c *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*Orderreturn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsProcessResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27272,85 +18855,71 @@ func (c *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*Orderreturn return ret, nil } -type OrderreturnsLabelsCreateCall struct { - s *APIService - merchantId int64 - returnId string - returnshippinglabel *ReturnShippingLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesCustombatchCall struct { + s *APIService + datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Links a return shipping label to a return id. You can only create -// one return label per return id. Since the label is sent to the buyer, the -// linked return label cannot be updated or deleted. If you try to create -// multiple return shipping labels for a single return id, every create request -// except the first will fail. -// -// - merchantId: The merchant the Return Shipping Label belongs to. -// - returnId: Provide the Google-generated merchant order return ID. -func (r *OrderreturnsLabelsService) Create(merchantId int64, returnId string, returnshippinglabel *ReturnShippingLabel) *OrderreturnsLabelsCreateCall { - c := &OrderreturnsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.returnId = returnId - c.returnshippinglabel = returnshippinglabel +// Custombatch: Gets multiple Merchant Center datafeed statuses in a single +// request. +func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { + c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderreturnsLabelsCreateCall) Fields(s ...googleapi.Field) *OrderreturnsLabelsCreateCall { +func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsLabelsCreateCall) Context(ctx context.Context) *OrderreturnsLabelsCreateCall { +func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrderreturnsLabelsCreateCall) Header() http.Header { +func (c *DatafeedstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesCustombatchCall) 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.returnshippinglabel) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/labels") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "returnId": c.returnId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.labels.create" call. +// Do executes the "content.datafeedstatuses.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnShippingLabel.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*ReturnShippingLabel, error) { +// *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27369,7 +18938,7 @@ func (c *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*Return if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnShippingLabel{ + ret := &DatafeedstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27382,82 +18951,117 @@ func (c *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*Return return ret, nil } -type OrdersAcknowledgeCall struct { - s *APIService - merchantId uint64 - orderId string - ordersacknowledgerequest *OrdersAcknowledgeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesGetCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Acknowledge: Marks an order as acknowledged. +// Get: Retrieves the status of a datafeed from your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { - c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { + c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersacknowledgerequest = ordersacknowledgerequest + c.datafeedId = datafeedId + return c +} + +// Country sets the optional parameter "country": Deprecated. Use `feedLabel` +// instead. The country to get the datafeed status for. If this parameter is +// provided then `language` must also be provided. Note that this parameter is +// required for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { + c.urlParams_.Set("country", country) + return c +} + +// FeedLabel sets the optional parameter "feedLabel": The feed label to get the +// datafeed status for. If this parameter is provided then `language` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { + c.urlParams_.Set("feedLabel", feedLabel) + return c +} + +// Language sets the optional parameter "language": The language to get the +// datafeed status for. If this parameter is provided then `country` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { + c.urlParams_.Set("language", language) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { +func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { +func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersAcknowledgeCall) Header() http.Header { +func (c *DatafeedstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersAcknowledgeCall) 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.ordersacknowledgerequest) - if err != nil { - return nil, err +func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.acknowledge" call. +// Do executes the "content.datafeedstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { +// *DatafeedStatus.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27476,7 +19080,7 @@ func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersAcknowledgeResponse{ + ret := &DatafeedStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27489,77 +19093,98 @@ func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowl return ret, nil } -type OrdersAdvancetestorderCall struct { - s *APIService - merchantId uint64 - orderId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Advancetestorder: Sandbox only. Moves a test order from state "inProgress" -// to state "pendingShipment". +// List: Lists the statuses of the datafeeds in your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the test order to modify. -func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { - c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { + c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// products to return in the response, used for paging. +func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { +func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { +func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersAdvancetestorderCall) Header() http.Header { +func (c *DatafeedstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.advancetestorder" call. +// Do executes the "content.datafeedstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a response was +// *DatafeedstatusesListResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { +func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27578,7 +19203,7 @@ func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAd if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersAdvanceTestOrderResponse{ + ret := &DatafeedstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27591,82 +19216,107 @@ func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAd return ret, nil } -type OrdersCancelCall struct { - s *APIService - merchantId uint64 - orderId string - orderscancelrequest *OrdersCancelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type FreelistingsprogramGetCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels all line items in an order, making a full refund. +// Get: Retrieves the status and review eligibility for the free listing +// program. Returns errors and warnings if they require action to resolve, will +// become disapprovals, or impact impressions. Use `accountstatuses` to view +// all issues for an account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order to cancel. -func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { - c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { + c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscancelrequest = orderscancelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { +func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { 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 *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { +func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCancelCall) Header() http.Header { +func (c *FreelistingsprogramGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCancelCall) 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.orderscancelrequest) - if err != nil { - return nil, err +func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.cancel" call. +// Do executes the "content.freelistingsprogram.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { +// *FreeListingsProgramStatus.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27685,7 +19335,7 @@ func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCancelResponse{ + ret := &FreeListingsProgramStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27698,62 +19348,60 @@ func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelRespon return ret, nil } -type OrdersCancellineitemCall struct { - s *APIService - merchantId uint64 - orderId string - orderscancellineitemrequest *OrdersCancelLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramRequestreviewCall struct { + s *APIService + merchantId int64 + requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancellineitem: Cancels a line item, making a full refund. +// Requestreview: Requests a review of free listings in a specific region. This +// method deprecated. Use the `MerchantSupportService` to view product and +// account issues and request a review. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { - c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { + c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscancellineitemrequest = orderscancellineitemrequest + c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { +func (c *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { +func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCancellineitemCall) Header() http.Header { +func (c *FreelistingsprogramRequestreviewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramRequestreviewCall) 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.orderscancellineitemrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestreviewfreelistingsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27761,245 +19409,176 @@ func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.cancellineitem" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelLineItemResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { +// Do executes the "content.freelistingsprogram.requestreview" call. +func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrdersCancelLineItemResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type OrdersCanceltestorderbycustomerCall struct { - s *APIService - merchantId uint64 - orderId string - orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsDeleteCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Canceltestorderbycustomer: Sandbox only. Cancels a test order for -// customer-initiated cancellation. +// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` +// program. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the test order to cancel. -func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { - c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { + c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.canceltestorderbycustomer" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { +// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrdersCancelTestOrderByCustomerResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type OrdersCaptureOrderCall struct { - s *APIService - merchantId int64 - orderId string - captureorderrequest *CaptureOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsGetCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CaptureOrder: Capture funds from the customer for the current order total. -// This method should be called after the merchant verifies that they are able -// and ready to start shipping the order. This method blocks until a response -// is received from the payment processsor. If this method succeeds, the -// merchant is guaranteed to receive funds for the order after shipment. If the -// request fails, it can be retried or the order may be cancelled. This method -// cannot be called after the entire order is already shipped. A rejected error -// code is returned when the payment service provider has declined the charge. -// This indicates a problem between the PSP and either the merchant's or -// customer's account. Sometimes this error will be resolved by the customer. -// We recommend retrying these errors once per day or cancelling the order with -// reason `failedToCaptureFunds` if the items cannot be held. +// Get: Gets Checkout settings for the given merchant. This includes +// information about review state, enrollment state and URL settings. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the Order. -func (r *OrdersService) CaptureOrder(merchantId int64, orderId string, captureorderrequest *CaptureOrderRequest) *OrdersCaptureOrderCall { - c := &OrdersCaptureOrderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { + c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.captureorderrequest = captureorderrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCaptureOrderCall) Fields(s ...googleapi.Field) *OrdersCaptureOrderCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersCaptureOrderCall) Context(ctx context.Context) *OrdersCaptureOrderCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCaptureOrderCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCaptureOrderCall) 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.captureorderrequest) - if err != nil { - return nil, err +func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/captureOrder") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "orderId": c.orderId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.captureOrder" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *CaptureOrderResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *CheckoutSettings.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrderResponse, error) { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28018,7 +19597,7 @@ func (c *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrder if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CaptureOrderResponse{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28031,59 +19610,58 @@ func (c *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrder return ret, nil } -type OrdersCreatetestorderCall struct { - s *APIService - merchantId uint64 - orderscreatetestorderrequest *OrdersCreateTestOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsInsertCall struct { + s *APIService + merchantId int64 + insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Createtestorder: Sandbox only. Creates a test order. +// Insert: Enrolls merchant in `Checkout` program. // -// - merchantId: The ID of the account that should manage the order. This -// cannot be a multi-client account. -func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { - c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { + c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderscreatetestorderrequest = orderscreatetestorderrequest + c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCreatetestorderCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) 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.orderscreatetestorderrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertcheckoutsettingsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28091,18 +19669,18 @@ func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.createtestorder" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { +// *CheckoutSettings.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28121,7 +19699,7 @@ func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCre if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCreateTestOrderResponse{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28134,82 +19712,71 @@ func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCre return ret, nil } -type OrdersCreatetestreturnCall struct { +type LiasettingsCustombatchCall struct { s *APIService - merchantId uint64 - orderId string - orderscreatetestreturnrequest *OrdersCreateTestReturnRequest + liasettingscustombatchrequest *LiasettingsCustomBatchRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Createtestreturn: Sandbox only. Creates a test return. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { - c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderscreatetestreturnrequest = orderscreatetestreturnrequest +// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts +// in a single request. +func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { + c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.liasettingscustombatchrequest = liasettingscustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { +func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { +func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersCreatetestreturnCall) Header() http.Header { +func (c *LiasettingsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsCustombatchCall) 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.orderscreatetestreturnrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.createtestreturn" call. +// Do executes the "content.liasettings.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a response was +// *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { +func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28228,7 +19795,7 @@ func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCreateTestReturnResponse{ + ret := &LiasettingsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28241,32 +19808,33 @@ func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCr return ret, nil } -type OrdersGetCall struct { +type LiasettingsGetCall struct { s *APIService merchantId uint64 - orderId string + accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves an order from your Merchant Center account. +// Get: Retrieves the LIA settings of the account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { - c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get or update LIA settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { + c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { +func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28274,27 +19842,27 @@ func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { // 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 *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { +func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { +func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersGetCall) Header() http.Header { +func (c *LiasettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28302,7 +19870,7 @@ func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28311,17 +19879,17 @@ func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.get" call. +// Do executes the "content.liasettings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Order.ServerResponse.Header or (if a response was returned at all) in +// *LiaSettings.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { +func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28340,7 +19908,7 @@ func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Order{ + ret := &LiaSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28353,32 +19921,35 @@ func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { return ret, nil } -type OrdersGetbymerchantorderidCall struct { - s *APIService - merchantId uint64 - merchantOrderId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LiasettingsGetaccessiblegmbaccountsCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Getbymerchantorderid: Retrieves an order using merchant order ID. +// Getaccessiblegmbaccounts: Retrieves the list of accessible Business +// Profiles. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - merchantOrderId: The merchant order ID to be looked for. -func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { - c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { + c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.merchantOrderId = merchantOrderId + c.accountId = accountId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28386,27 +19957,27 @@ func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGet // 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 *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersGetbymerchantorderidCall) Header() http.Header { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28414,7 +19985,7 @@ func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28422,19 +19993,19 @@ func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "merchantOrderId": c.merchantOrderId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.getbymerchantorderid" call. +// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28453,7 +20024,7 @@ func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersGetByMerchantOrderIdResponse{ + ret := &LiasettingsGetAccessibleGmbAccountsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28466,40 +20037,44 @@ func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersGettestordertemplateCall struct { +type LiasettingsListCall struct { s *APIService merchantId uint64 - templateName string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Gettestordertemplate: Sandbox only. Retrieves an order template that can be -// used to quickly create a new order in sandbox. +// List: Lists the LIA settings of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account that should manage the order. This -// cannot be a multi-client account. -// - templateName: The name of the template to retrieve. -func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { - c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { + c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.templateName = templateName return c } -// Country sets the optional parameter "country": The country of the template -// to retrieve. Defaults to "US". -func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { - c.urlParams_.Set("country", country) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// LIA settings to return in the response, used for paging. +func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28507,27 +20082,27 @@ func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGet // 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 *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersGettestordertemplateCall) Header() http.Header { +func (c *LiasettingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28535,7 +20110,7 @@ func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28543,19 +20118,18 @@ func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "templateName": c.templateName, + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.gettestordertemplate" call. +// Do executes the "content.liasettings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { +func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28574,7 +20148,7 @@ func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersGetTestOrderTemplateResponse{ + ret := &LiasettingsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28587,90 +20161,98 @@ func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersInstorerefundlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Instorerefundlineitem: Deprecated. Notifies that item return and refund was -// handled directly by merchant outside of Google payments processing (for -// example, cash refund done in store). Note: We recommend calling the -// returnrefundlineitem method to refund in-store returns. We will issue the -// refund directly to the customer. This helps to prevent possible differences -// arising between merchant and Google transaction records. We also recommend -// having the point of sale system communicate with Google to ensure that -// customers do not receive a double refund by first refunding through Google -// then through an in-store return. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { - c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest +type LiasettingsListposdataprovidersCall struct { + s *APIService + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Listposdataproviders: Retrieves the list of POS data providers that have +// active settings for the all eiligible countries. +func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { + c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { +func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { +func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersInstorerefundlineitemCall) Header() http.Header { +func (c *LiasettingsListposdataprovidersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersInstorerefundlineitemCall) 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.ordersinstorerefundlineitemrequest) - if err != nil { - return nil, err +func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.instorerefundlineitem" call. +// Do executes the "content.liasettings.listposdataproviders" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { +func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28689,7 +20271,7 @@ func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*Ord if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersInStoreRefundLineItemResponse{ + ret := &LiasettingsListPosDataProvidersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28702,163 +20284,188 @@ func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*Ord return ret, nil } -type OrdersListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LiasettingsRequestgmbaccessCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the orders in your Merchant Center account. +// Requestgmbaccess: Requests access to a specified Business Profile. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrdersService) List(merchantId uint64) *OrdersListCall { - c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which Business Profile access is +// requested. +// - gmbEmail: The email of the Business Profile. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { + c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId + c.urlParams_.Set("gmbEmail", gmbEmail) return c } -// Acknowledged sets the optional parameter "acknowledged": Obtains orders that -// match the acknowledgement status. When set to true, obtains orders that have -// been acknowledged. When false, obtains orders that have not been -// acknowledged. We recommend using this filter set to `false`, in conjunction -// with the `acknowledge` call, such that only un-acknowledged orders are -// returned. -func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { - c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// orders to return in the response, used for paging. The default value is 25 -// orders per page, and the maximum allowed value is 250 orders per page. -func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Context sets the context to be used in this call's Do method. +func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Order results by placement -// date in descending or ascending order. Acceptable values are: - -// placedDateAsc - placedDateDesc -func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains orders -// placed before this date (exclusively), in ISO 8601 format. -func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { - c.urlParams_.Set("placedDateEnd", placedDateEnd) - return c +// Do executes the "content.liasettings.requestgmbaccess" call. +// Any non-2xx status code is an error. Response headers are in either +// *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { + 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 := &LiasettingsRequestGmbAccessResponse{ + 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 } -// PlacedDateStart sets the optional parameter "placedDateStart": Obtains -// orders placed after this date (inclusively), in ISO 8601 format. -func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { - c.urlParams_.Set("placedDateStart", placedDateStart) - return c +type LiasettingsRequestinventoryverificationCall struct { + s *APIService + merchantId uint64 + accountId uint64 + country string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Statuses sets the optional parameter "statuses": Obtains orders that match -// any of the specified statuses. Note that `active` is a shortcut for -// `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for -// `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, -// `returned`, and `canceled`. -// -// Possible values: -// -// "ACTIVE" - Return orders with status `active`. The `active` status -// -// includes `pendingShipment` and `partiallyShipped` orders. -// -// "COMPLETED" - Return orders with status `completed`. The `completed` -// -// status includes `shipped`, `partiallyDelivered`, `delivered`, -// `partiallyReturned`, `returned`, and `canceled` orders. +// Requestinventoryverification: Requests inventory validation for the +// specified country. // -// "CANCELED" - Return orders with status `canceled`. -// "IN_PROGRESS" - Return orders with status `inProgress`. -// "PENDING_SHIPMENT" - Return orders with status `pendingShipment`. -// "PARTIALLY_SHIPPED" - Return orders with status `partiallyShipped`. -// "SHIPPED" - Return orders with status `shipped`. -// "PARTIALLY_DELIVERED" - Return orders with status `partiallyDelivered`. -// "DELIVERED" - Return orders with status `delivered`. -// "PARTIALLY_RETURNED" - Return orders with status `partiallyReturned`. -// "RETURNED" - Return orders with status `returned`. -func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { - c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) +// - accountId: The ID of the account that manages the order. This cannot be a +// multi-client account. +// - country: The country for which inventory validation is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { + c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.country = country return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { +func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 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 *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { +func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersListCall) Header() http.Header { +func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsRequestinventoryverificationCall) 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, "{merchantId}/orders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + "country": c.country, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.list" call. +// Do executes the "content.liasettings.requestinventoryverification" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { +// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28877,7 +20484,7 @@ func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersListResponse{ + ret := &LiasettingsRequestInventoryVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28890,83 +20497,67 @@ func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type OrdersRefunditemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrefunditemrequest *OrdersRefundItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetinventoryverificationcontactCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Refunditem: Issues a partial or total refund for items and shipment. +// Setinventoryverificationcontact: Sets the inventory verification contract +// for the specified country. // -// - merchantId: The ID of the account that manages the order. This cannot be a +// - accountId: The ID of the account that manages the order. This cannot be a // multi-client account. -// - orderId: The ID of the order to refund. -func (r *OrdersService) Refunditem(merchantId uint64, orderId string, ordersrefunditemrequest *OrdersRefundItemRequest) *OrdersRefunditemCall { - c := &OrdersRefunditemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - contactEmail: The email of the inventory verification contact. +// - contactName: The name of the inventory verification contact. +// - country: The country for which inventory verification is requested. +// - language: The language for which inventory verification is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { + c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrefunditemrequest = ordersrefunditemrequest + c.accountId = accountId + c.urlParams_.Set("country", country) + c.urlParams_.Set("language", language) + c.urlParams_.Set("contactName", contactName) + c.urlParams_.Set("contactEmail", contactEmail) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersRefunditemCall) Fields(s ...googleapi.Field) *OrdersRefunditemCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRefunditemCall) Context(ctx context.Context) *OrdersRefunditemCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersRefunditemCall) Header() http.Header { +func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRefunditemCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefunditemrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refunditem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28975,18 +20566,18 @@ func (c *OrdersRefunditemCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.refunditem" call. +// Do executes the "content.liasettings.setinventoryverificationcontact" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRefundItemResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundItemResponse, error) { +func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29005,7 +20596,7 @@ func (c *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundIt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRefundItemResponse{ + ret := &LiasettingsSetInventoryVerificationContactResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29018,62 +20609,87 @@ func (c *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundIt return ret, nil } -type OrdersRefundorderCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrefundorderrequest *OrdersRefundOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetomnichannelexperienceCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Refundorder: Issues a partial or total refund for an order. +// Setomnichannelexperience: Sets the omnichannel experience for the specified +// country. Only supported for merchants whose POS data provider is trusted to +// enable the corresponding experience. For more context, see these help +// articles about LFP (https://support.google.com/merchants/answer/7676652) and +// how to get started (https://support.google.com/merchants/answer/7676578) +// with it. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order to refund. -func (r *OrdersService) Refundorder(merchantId uint64, orderId string, ordersrefundorderrequest *OrdersRefundOrderRequest) *OrdersRefundorderCall { - c := &OrdersRefundorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { + c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrefundorderrequest = ordersrefundorderrequest + c.accountId = accountId + return c +} + +// Country sets the optional parameter "country": The CLDR country code (for +// example, "US") for which the omnichannel experience is selected. +func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("country", country) + return c +} + +// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) +// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted +// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front +// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details +// about these types can be found here. +func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("lsfType", lsfType) + return c +} + +// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for +// this country. Acceptable values are: - "pickupToday" - "pickupLater" +func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersRefundorderCall) Fields(s ...googleapi.Field) *OrdersRefundorderCall { +func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRefundorderCall) Context(ctx context.Context) *OrdersRefundorderCall { +func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersRefundorderCall) Header() http.Header { +func (c *LiasettingsSetomnichannelexperienceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRefundorderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundorderrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refundorder") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29082,18 +20698,18 @@ func (c *OrdersRefundorderCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.refundorder" call. +// Do executes the "content.liasettings.setomnichannelexperience" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRefundOrderResponse.ServerResponse.Header or (if a response was +// *LiaOmnichannelExperience.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundOrderResponse, error) { +func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29112,7 +20728,7 @@ func (c *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRefundOrderResponse{ + ret := &LiaOmnichannelExperience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29125,62 +20741,74 @@ func (c *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundO return ret, nil } -type OrdersRejectreturnlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetposdataproviderCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Rejectreturnlineitem: Rejects return on an line item. +// Setposdataprovider: Sets the POS data provider for the specified country. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { - c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - country: The country for which the POS data provider is selected. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { + c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest + c.accountId = accountId + c.urlParams_.Set("country", country) + return c +} + +// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of +// POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) + return c +} + +// PosExternalAccountId sets the optional parameter "posExternalAccountId": The +// account ID by which this merchant is known to the POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posExternalAccountId", posExternalAccountId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { +func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { +func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersRejectreturnlineitemCall) Header() http.Header { +func (c *LiasettingsSetposdataproviderCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29189,18 +20817,18 @@ func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.rejectreturnlineitem" call. +// Do executes the "content.liasettings.setposdataprovider" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRejectReturnLineItemResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { +func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29219,7 +20847,7 @@ func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRejectReturnLineItemResponse{ + ret := &LiasettingsSetPosDataProviderResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29232,87 +20860,83 @@ func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersReturnrefundlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + liasettings *LiaSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Returnrefundlineitem: Returns and refunds a line item. Note that this method -// can only be called on fully shipped orders. The Orderreturns API is the -// preferred way to handle returns after you receive a return from a customer. -// You can use Orderreturns.list or Orderreturns.get to search for the return, -// and then use Orderreturns.processreturn to issue the refund. If the return -// cannot be found, then we recommend using this API to issue a refund. +// Update: Updates the LIA settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { - c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get or update LIA settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { + c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest + c.accountId = accountId + c.liasettings = liasettings return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { +func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { +func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersReturnrefundlineitemCall) Header() http.Header { +func (c *LiasettingsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsUpdateCall) 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.ordersreturnrefundlineitemrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.returnrefundlineitem" call. +// Do executes the "content.liasettings.update" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersReturnRefundLineItemResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { +// *LiaSettings.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29331,7 +20955,7 @@ func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersReturnRefundLineItemResponse{ + ret := &LiaSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29344,86 +20968,71 @@ func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersSetlineitemmetadataCall struct { +type LocalinventoryCustombatchCall struct { s *APIService - merchantId uint64 - orderId string - orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest + localinventorycustombatchrequest *LocalinventoryCustomBatchRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Setlineitemmetadata: Sets (or overrides if it already exists) merchant -// provided annotations in the form of key-value pairs. A common use case would -// be to supply us with additional structured information about a line item -// that cannot be provided through other methods. Submitted key-value pairs can -// be retrieved as part of the orders resource. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { - c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest +// Custombatch: Updates local inventory for multiple products or stores in a +// single request. +func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { + c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.localinventorycustombatchrequest = localinventorycustombatchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { +func (c *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { +func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersSetlineitemmetadataCall) Header() http.Header { +func (c *LocalinventoryCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventorycustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") + urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.setlineitemmetadata" call. +// Do executes the "content.localinventory.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersSetLineItemMetadataResponse.ServerResponse.Header or (if a response +// *LocalinventoryCustomBatchResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { +func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29442,7 +21051,7 @@ func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*Order if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersSetLineItemMetadataResponse{ + ret := &LocalinventoryCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29455,62 +21064,63 @@ func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*Order return ret, nil } -type OrdersShiplineitemsCall struct { - s *APIService - merchantId uint64 - orderId string - ordersshiplineitemsrequest *OrdersShipLineItemsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocalinventoryInsertCall struct { + s *APIService + merchantId uint64 + productId string + localinventory *LocalInventory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Shiplineitems: Marks line item(s) as shipped. +// Insert: Updates the local inventory of a product in your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { - c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product for which to update local inventory. +func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { + c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersshiplineitemsrequest = ordersshiplineitemsrequest + c.productId = productId + c.localinventory = localinventory return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { +func (c *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { +func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersShiplineitemsCall) Header() http.Header { +func (c *LocalinventoryInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventory) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29519,18 +21129,17 @@ func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "productId": c.productId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.shiplineitems" call. +// Do executes the "content.localinventory.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { +// *LocalInventory.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29549,7 +21158,7 @@ func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersShipLineItemsResponse{ + ret := &LocalInventory{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29562,63 +21171,77 @@ func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipL return ret, nil } -type OrdersUpdatelineitemshippingdetailsCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderaccountissuesCall struct { + s *APIService + merchantId int64 + renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelineitemshippingdetails: Updates ship by and delivery by dates for a -// line item. +// Renderaccountissues: Provide a list of merchant's issues with a support +// content and available actions. This content and actions are meant to be +// rendered and shown in third-party applications. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { - c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account to fetch issues for. +func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { + c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest + c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("timeZone", timeZone) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { +func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { +func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { +func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportRenderaccountissuesCall) 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.ordersupdatelineitemshippingdetailsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderaccountissuesrequestpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29626,19 +21249,18 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updatelineitemshippingdetails" call. +// Do executes the "content.merchantsupport.renderaccountissues" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *RenderAccountIssuesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { +func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29657,7 +21279,7 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateLineItemShippingDetailsResponse{ + ret := &RenderAccountIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29670,62 +21292,82 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type OrdersUpdatemerchantorderidCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderproductissuesCall struct { + s *APIService + merchantId int64 + productId string + renderproductissuesrequestpayload *RenderProductIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatemerchantorderid: Updates the merchant order ID for a given order. +// Renderproductissues: Provide a list of issues for merchant's product with a +// support content and available actions. This content and actions are meant to +// be rendered and shown in third-party applications. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { - c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. +// - productId: The REST_ID +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) +// of the product to fetch issues for. +func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { + c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest + c.productId = productId + c.renderproductissuesrequestpayload = renderproductissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("timeZone", timeZone) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { +func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { +func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { +func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderproductissuesrequestpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29733,19 +21375,19 @@ func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "productId": c.productId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updatemerchantorderid" call. +// Do executes the "content.merchantsupport.renderproductissues" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *RenderProductIssuesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { +func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29764,7 +21406,7 @@ func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*Ord if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateMerchantOrderIdResponse{ + ret := &RenderProductIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29777,62 +21419,73 @@ func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*Ord return ret, nil } -type OrdersUpdateshipmentCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdateshipmentrequest *OrdersUpdateShipmentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportTriggeractionCall struct { + s *APIService + merchantId int64 + triggeractionpayload *TriggerActionPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updateshipment: Updates a shipment's status, carrier, and/or tracking ID. +// Triggeraction: Start an action. The action can be requested by merchants in +// third-party application. Before merchants can request the action, the +// third-party application needs to show them action specific content and +// display a user input form. The action can be successfully started only once +// all `required` inputs are provided. If any `required` input is missing, or +// invalid value was provided, the service will return 400 error. Validation +// errors will contain Ids for all problematic field together with translated, +// human readable error messages that can be shown to the user. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { - c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the merchant's account. +func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { + c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdateshipmentrequest = ordersupdateshipmentrequest + c.triggeractionpayload = triggeractionpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": Language code IETF +// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the +// response. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { + c.urlParams_.Set("languageCode", languageCode) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { +func (c *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { +func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrdersUpdateshipmentCall) Header() http.Header { +func (c *MerchantsupportTriggeractionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggeractionpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29840,19 +21493,18 @@ func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updateshipment" call. +// Do executes the "content.merchantsupport.triggeraction" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { +// *TriggerActionResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29871,7 +21523,7 @@ func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpda if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateShipmentResponse{ + ret := &TriggerActionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/developerconnect/v1/developerconnect-api.json b/developerconnect/v1/developerconnect-api.json index 7e980bfc972..b10e36bd582 100644 --- a/developerconnect/v1/developerconnect-api.json +++ b/developerconnect/v1/developerconnect-api.json @@ -15,6 +15,13 @@ "description": "Connect third-party source code management to Google", "discoveryVersion": "v1", "documentationLink": "http://cloud.google.com/developer-connect/docs/overview", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://developerconnect.us-central1.rep.googleapis.com/", + "location": "us-central1" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -840,7 +847,7 @@ } } }, - "revision": "20240523", + "revision": "20240822", "rootUrl": "https://developerconnect.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 8ec83107592..decc339a580 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -276,7 +276,7 @@ } } }, - "revision": "20240729", + "revision": "20240825", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -1817,7 +1817,7 @@ "id": "GoogleMapsPlacesV1SearchTextResponse", "properties": { "contextualContents": { - "description": "Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details. A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the `text_query` in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list should have as many entries as the list of places if requested.", + "description": "Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details. A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the `text_query` in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list will have as many entries as the list of places if requested.", "items": { "$ref": "GoogleMapsPlacesV1ContextualContent" }, diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 8ac63124559..afe219233e1 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -2263,8 +2263,8 @@ type GoogleMapsPlacesV1SearchTextResponse struct { // contents that are relevant to the `text_query` in the request are preferred. // If the contextual content is not available for one of the places, it will // return non-contextual content. It will be empty only when the content is - // unavailable for this place. This list should have as many entries as the - // list of places if requested. + // unavailable for this place. This list will have as many entries as the list + // of places if requested. ContextualContents []*GoogleMapsPlacesV1ContextualContent `json:"contextualContents,omitempty"` // NextPageToken: A token that can be sent as `page_token` to retrieve the next // page. If this field is omitted or empty, there are no subsequent pages. diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index c0cc07351e2..37aabd36b09 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240816", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2732,7 +2732,7 @@ "type": "object" }, "GoogleCloudRetailV2CompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2CompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -3945,7 +3945,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 06a0ac8a343..74966cdb2e5 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1314,7 +1314,7 @@ func (s GoogleCloudRetailV2CompleteQueryResponse) MarshalJSON() ([]byte, error) } // GoogleCloudRetailV2CompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2CompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -3213,8 +3213,13 @@ type GoogleCloudRetailV2Product struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2Audience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index ab031b58c94..17ddacc84b1 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2613,7 +2613,7 @@ } } }, - "revision": "20240816", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4043,7 +4043,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -5768,7 +5768,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index c007b65b331..55c4357307c 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2482,7 +2482,7 @@ func (s GoogleCloudRetailV2alphaCompleteQueryResponse) MarshalJSON() ([]byte, er } // GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -5210,8 +5210,13 @@ type GoogleCloudRetailV2alphaProduct struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2alphaAudience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 280bbb06b7d..49ead852fca 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2237,7 +2237,7 @@ } } }, - "revision": "20240816", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4386,7 +4386,7 @@ "type": "object" }, "GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -5746,7 +5746,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index d2f45ddf02d..0234cc281df 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3451,7 +3451,7 @@ func (s GoogleCloudRetailV2betaCompleteQueryResponse) MarshalJSON() ([]byte, err } // GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -5617,8 +5617,13 @@ type GoogleCloudRetailV2betaProduct struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2betaAudience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index e0a93fd785e..196f7adf294 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20240820", + "revision": "20240825", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -2186,6 +2186,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -2947,6 +2958,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -3316,6 +3346,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 025b3eaf413..84d0454f46b 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -1949,6 +1949,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -3143,6 +3170,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3763,6 +3800,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 662735d9f45..df63291f544 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20240820", + "revision": "20240825", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1281,6 +1281,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -1967,6 +1978,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -2336,6 +2366,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 511b037599a..d2f0b2adf3f 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -1537,6 +1537,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -2595,6 +2622,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3215,6 +3252,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See From f9bde01eb0e6e69c17d003e0264091a6289e7e7a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:35:54 -0600 Subject: [PATCH 8/8] chore(main): release 0.195.0 (#2751) --- CHANGES.md | 12 ++++++++++++ internal/version.go | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0dab0331ff8..ba6e9a56839 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ # Changes +## [0.195.0](https://github.com/googleapis/google-api-go-client/compare/v0.194.0...v0.195.0) (2024-08-28) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2750](https://github.com/googleapis/google-api-go-client/issues/2750)) ([6bdae51](https://github.com/googleapis/google-api-go-client/commit/6bdae51c0ef535dcba79f6299f1b6040c189a155)) +* **all:** Auto-regenerate discovery clients ([#2752](https://github.com/googleapis/google-api-go-client/issues/2752)) ([5b1ebe2](https://github.com/googleapis/google-api-go-client/commit/5b1ebe2dd1516dfe42e73205992f741a885658da)) +* **all:** Auto-regenerate discovery clients ([#2753](https://github.com/googleapis/google-api-go-client/issues/2753)) ([70a68c2](https://github.com/googleapis/google-api-go-client/commit/70a68c2fb4fb4f05a35c726109b0d8087cf6e572)) +* **all:** Auto-regenerate discovery clients ([#2755](https://github.com/googleapis/google-api-go-client/issues/2755)) ([3f3bd66](https://github.com/googleapis/google-api-go-client/commit/3f3bd668270c5baff4e058dd572ba85cd12ead4d)) +* **all:** Auto-regenerate discovery clients ([#2756](https://github.com/googleapis/google-api-go-client/issues/2756)) ([e907e01](https://github.com/googleapis/google-api-go-client/commit/e907e01d29910f6480adcfa4054cfc9809fb36fe)) +* **all:** Auto-regenerate discovery clients ([#2759](https://github.com/googleapis/google-api-go-client/issues/2759)) ([04cbad8](https://github.com/googleapis/google-api-go-client/commit/04cbad81acfcb65b90194782cc369506febd854f)) + ## [0.194.0](https://github.com/googleapis/google-api-go-client/compare/v0.193.0...v0.194.0) (2024-08-22) diff --git a/internal/version.go b/internal/version.go index 60f4bfacb6f..f3426bd3c62 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.194.0" +const Version = "0.195.0"