From 17f123bc40fd216b0f4e66a2d8f7f8ff89fc0047 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 21 Dec 2024 08:12:06 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1/accesscontextmanager-api.json | 4 +- .../v1/accesscontextmanager-gen.go | 4 +- chat/v1/chat-api.json | 24 ++-- chat/v1/chat-gen.go | 36 +++-- cloudsupport/v2/cloudsupport-api.json | 4 +- cloudsupport/v2/cloudsupport-gen.go | 5 +- cloudsupport/v2beta/cloudsupport-api.json | 4 +- cloudsupport/v2beta/cloudsupport-gen.go | 5 +- dlp/v2/dlp-api.json | 16 ++- dlp/v2/dlp-gen.go | 8 +- jobs/v3p1beta1/jobs-api.json | 20 +-- jobs/v3p1beta1/jobs-gen.go | 67 +++++----- retail/v2/retail-api.json | 63 +++++---- retail/v2/retail-gen.go | 124 +++++++++--------- retail/v2alpha/retail-api.json | 63 +++++---- retail/v2alpha/retail-gen.go | 124 +++++++++--------- retail/v2beta/retail-api.json | 63 +++++---- retail/v2beta/retail-gen.go | 124 +++++++++--------- runtimeconfig/v1/runtimeconfig-api.json | 4 +- runtimeconfig/v1/runtimeconfig-gen.go | 2 +- translate/v3/translate-api.json | 12 +- translate/v3/translate-gen.go | 40 +++--- translate/v3beta1/translate-api.json | 10 +- translate/v3beta1/translate-gen.go | 29 ++-- 24 files changed, 441 insertions(+), 414 deletions(-) diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index ae52c7a5e19..6234f2034e6 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1295,7 +1295,7 @@ } } }, - "revision": "20241209", + "revision": "20241216", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1931,7 +1931,7 @@ "type": "object" }, "GcpUserAccessBindingOperationMetadata": { - "description": "Metadata of GCP Access Binding Long Running Operations.", + "description": "Metadata of Google Cloud Access Binding Long Running Operations.", "id": "GcpUserAccessBindingOperationMetadata", "properties": {}, "type": "object" diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index e2120dbe811..18dd87870a9 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -1255,8 +1255,8 @@ func (s GcpUserAccessBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GcpUserAccessBindingOperationMetadata: Metadata of GCP Access Binding Long -// Running Operations. +// GcpUserAccessBindingOperationMetadata: Metadata of Google Cloud Access +// Binding Long Running Operations. type GcpUserAccessBindingOperationMetadata struct { } diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index beef80415da..561b0c5536e 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -1344,7 +1344,7 @@ } } }, - "revision": "20241210", + "revision": "20241217", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -2285,7 +2285,7 @@ "type": "string" }, "type": { - "description": "Optional. The type of a button. If unset, button type defaults to `OUTLINED`. If the `color` field is set, the button type is forced to `FILLED` and any value set for this field is ignored. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "Optional. The type of a button. If unset, button type defaults to `OUTLINED`. If the `color` field is set, the button type is forced to `FILLED` and any value set for this field is ignored.", "enum": [ "TYPE_UNSPECIFIED", "OUTLINED", @@ -2485,7 +2485,7 @@ "type": "object" }, "GoogleAppsCardV1Chip": { - "description": "A text, icon, or text and icon chip that users can click. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "A text, icon, or text and icon chip that users can click. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", "id": "GoogleAppsCardV1Chip", "properties": { "altText": { @@ -2517,7 +2517,7 @@ "type": "object" }, "GoogleAppsCardV1ChipList": { - "description": "A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", "id": "GoogleAppsCardV1ChipList", "properties": { "chips": { @@ -2545,7 +2545,7 @@ "type": "object" }, "GoogleAppsCardV1CollapseControl": { - "description": "Represent an expand and collapse control. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "Represent an expand and collapse control. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", "id": "GoogleAppsCardV1CollapseControl", "properties": { "collapseButton": { @@ -2987,7 +2987,7 @@ }, "overflowMenu": { "$ref": "GoogleAppsCardV1OverflowMenu", - "description": "If specified, this `onClick` opens an overflow menu. [Google Chat apps](https://developers.google.com/workspace/chat):" + "description": "If specified, this `onClick` opens an overflow menu." } }, "type": "object" @@ -3028,7 +3028,7 @@ "type": "object" }, "GoogleAppsCardV1OverflowMenu": { - "description": "A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the `OnClick` action of widgets that support it. For example, in a `Button`. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the `OnClick` action of widgets that support it. For example, in a `Button`. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", "id": "GoogleAppsCardV1OverflowMenu", "properties": { "items": { @@ -3042,7 +3042,7 @@ "type": "object" }, "GoogleAppsCardV1OverflowMenuItem": { - "description": "An option that users can invoke in an overflow menu. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "An option that users can invoke in an overflow menu. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", "id": "GoogleAppsCardV1OverflowMenuItem", "properties": { "disabled": { @@ -3093,7 +3093,7 @@ "properties": { "collapseControl": { "$ref": "GoogleAppsCardV1CollapseControl", - "description": "Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used. [Google Chat apps](https://developers.google.com/workspace/chat):" + "description": "Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used." }, "collapsible": { "description": "Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.", @@ -3325,7 +3325,7 @@ "id": "GoogleAppsCardV1TextParagraph", "properties": { "maxLines": { - "description": "The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. [Google Chat apps](https://developers.google.com/workspace/chat):", + "description": "The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.", "format": "int32", "type": "integer" }, @@ -3350,7 +3350,7 @@ }, "chipList": { "$ref": "GoogleAppsCardV1ChipList", - "description": "A list of chips. For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link: ``` \"chipList\": { \"chips\": [ { \"text\": \"Edit\", \"disabled\": true, }, { \"icon\": { \"knownIcon\": \"INVITE\", \"altText\": \"check calendar\" }, \"onClick\": { \"openLink\": { \"url\": \"https://example.com/calendar\" } } } ] } ``` [Google Chat apps](https://developers.google.com/workspace/chat):" + "description": "A list of chips. For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link: ``` \"chipList\": { \"chips\": [ { \"text\": \"Edit\", \"disabled\": true, }, { \"icon\": { \"knownIcon\": \"INVITE\", \"altText\": \"check calendar\" }, \"onClick\": { \"openLink\": { \"url\": \"https://example.com/calendar\" } } } ] } ```" }, "columns": { "$ref": "GoogleAppsCardV1Columns", @@ -3417,7 +3417,7 @@ }, "chipList": { "$ref": "GoogleAppsCardV1ChipList", - "description": "ChipList widget. [Google Chat apps](https://developers.google.com/workspace/chat):" + "description": "ChipList widget." }, "dateTimePicker": { "$ref": "GoogleAppsCardV1DateTimePicker", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 7781a009c60..9d7de2177b6 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -1845,8 +1845,7 @@ type GoogleAppsCardV1Button struct { Text string `json:"text,omitempty"` // Type: Optional. The type of a button. If unset, button type defaults to // `OUTLINED`. If the `color` field is set, the button type is forced to - // `FILLED` and any value set for this field is ignored. Google Chat apps - // (https://developers.google.com/workspace/chat): + // `FILLED` and any value set for this field is ignored. // // Possible values: // "TYPE_UNSPECIFIED" - Don't use. Unspecified. @@ -2186,7 +2185,8 @@ func (s GoogleAppsCardV1CarouselCard) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1Chip: A text, icon, or text and icon chip that users can -// click. Google Chat apps (https://developers.google.com/workspace/chat): +// click. Google Workspace Add-ons and Chat apps +// (https://developers.google.com/workspace/extend): type GoogleAppsCardV1Chip struct { // AltText: The alternative text that's used for accessibility. Set descriptive // text that lets users know what the chip does. For example, if a chip opens a @@ -2226,8 +2226,8 @@ func (s GoogleAppsCardV1Chip) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1ChipList: A list of chips layed out horizontally, which can -// either scroll horizontally or wrap to the next line. Google Chat apps -// (https://developers.google.com/workspace/chat): +// either scroll horizontally or wrap to the next line. Google Workspace +// Add-ons and Chat apps (https://developers.google.com/workspace/extend): type GoogleAppsCardV1ChipList struct { // Chips: An array of chips. Chips []*GoogleAppsCardV1Chip `json:"chips,omitempty"` @@ -2259,7 +2259,8 @@ func (s GoogleAppsCardV1ChipList) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1CollapseControl: Represent an expand and collapse control. -// Google Chat apps (https://developers.google.com/workspace/chat): +// Google Workspace Add-ons and Chat apps +// (https://developers.google.com/workspace/extend): type GoogleAppsCardV1CollapseControl struct { // CollapseButton: Optional. Define a customizable button to collapse the // section. Both expand_button and collapse_button field must be set. Only one @@ -2889,8 +2890,7 @@ type GoogleAppsCardV1OnClick struct { OpenDynamicLinkAction *GoogleAppsCardV1Action `json:"openDynamicLinkAction,omitempty"` // OpenLink: If specified, this `onClick` triggers an open link action. OpenLink *GoogleAppsCardV1OpenLink `json:"openLink,omitempty"` - // OverflowMenu: If specified, this `onClick` opens an overflow menu. Google - // Chat apps (https://developers.google.com/workspace/chat): + // OverflowMenu: If specified, this `onClick` opens an overflow menu. OverflowMenu *GoogleAppsCardV1OverflowMenu `json:"overflowMenu,omitempty"` // ForceSendFields is a list of field names (e.g. "Action") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -2958,8 +2958,8 @@ func (s GoogleAppsCardV1OpenLink) MarshalJSON() ([]byte, error) { // or more actions that users can invoke. For example, showing non-primary // actions in a card. You can use this widget when actions don't fit in the // available space. To use, specify this widget in the `OnClick` action of -// widgets that support it. For example, in a `Button`. Google Chat apps -// (https://developers.google.com/workspace/chat): +// widgets that support it. For example, in a `Button`. Google Workspace +// Add-ons and Chat apps (https://developers.google.com/workspace/extend): type GoogleAppsCardV1OverflowMenu struct { // Items: Required. The list of menu options. Items []*GoogleAppsCardV1OverflowMenuItem `json:"items,omitempty"` @@ -2982,8 +2982,8 @@ func (s GoogleAppsCardV1OverflowMenu) MarshalJSON() ([]byte, error) { } // GoogleAppsCardV1OverflowMenuItem: An option that users can invoke in an -// overflow menu. Google Chat apps -// (https://developers.google.com/workspace/chat): +// overflow menu. Google Workspace Add-ons and Chat apps +// (https://developers.google.com/workspace/extend): type GoogleAppsCardV1OverflowMenuItem struct { // Disabled: Whether the menu option is disabled. Defaults to false. Disabled bool `json:"disabled,omitempty"` @@ -3056,8 +3056,7 @@ func (s GoogleAppsCardV1PlatformDataSource) MarshalJSON() ([]byte, error) { type GoogleAppsCardV1Section struct { // CollapseControl: Optional. Define the expand and collapse button of the // section. This button will be shown only if the section is collapsible. If - // this field isn't set, the default button is used. Google Chat apps - // (https://developers.google.com/workspace/chat): + // this field isn't set, the default button is used. CollapseControl *GoogleAppsCardV1CollapseControl `json:"collapseControl,omitempty"` // Collapsible: Indicates whether this section is collapsible. Collapsible // sections hide some or all widgets, but users can expand the section to @@ -3437,8 +3436,7 @@ type GoogleAppsCardV1TextParagraph struct { // excess content is concealed behind a **show more** button. If the text is // equal or shorter than the specified maximum number of lines, a **show more** // button isn't displayed. The default value is 0, in which case all context is - // displayed. Negative values are ignored. Google Chat apps - // (https://developers.google.com/workspace/chat): + // displayed. Negative values are ignored. MaxLines int64 `json:"maxLines,omitempty"` // Text: The text that's shown in the widget. Text string `json:"text,omitempty"` @@ -3481,8 +3479,7 @@ type GoogleAppsCardV1Widget struct { // chips. The first is a text chip and the second is an icon chip that opens a // link: ``` "chipList": { "chips": [ { "text": "Edit", "disabled": true, }, { // "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { - // "openLink": { "url": "https://example.com/calendar" } } } ] } ``` Google - // Chat apps (https://developers.google.com/workspace/chat): + // "openLink": { "url": "https://example.com/calendar" } } } ] } ``` ChipList *GoogleAppsCardV1ChipList `json:"chipList,omitempty"` // Columns: Displays up to 2 columns. To include more than 2 columns, or to use // rows, use the `Grid` widget. For example, the following JSON creates 2 @@ -3593,8 +3590,7 @@ func (s GoogleAppsCardV1Widget) MarshalJSON() ([]byte, error) { type GoogleAppsCardV1Widgets struct { // ButtonList: ButtonList widget. ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"` - // ChipList: ChipList widget. Google Chat apps - // (https://developers.google.com/workspace/chat): + // ChipList: ChipList widget. ChipList *GoogleAppsCardV1ChipList `json:"chipList,omitempty"` // DateTimePicker: DateTimePicker widget. DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"` diff --git a/cloudsupport/v2/cloudsupport-api.json b/cloudsupport/v2/cloudsupport-api.json index 7c725457120..f4adfe85186 100644 --- a/cloudsupport/v2/cloudsupport-api.json +++ b/cloudsupport/v2/cloudsupport-api.json @@ -382,7 +382,7 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100. The size of each page can be smaller than the requested page size and can include zero. For example, you could request 100 attachments on one page, receive 0, and then on the next page, receive 90.", + "description": "The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100.", "format": "int32", "location": "query", "type": "integer" @@ -552,7 +552,7 @@ } } }, - "revision": "20241212", + "revision": "20241218", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2/cloudsupport-gen.go b/cloudsupport/v2/cloudsupport-gen.go index 60883b8cdf2..86dce63dd64 100644 --- a/cloudsupport/v2/cloudsupport-gen.go +++ b/cloudsupport/v2/cloudsupport-gen.go @@ -2284,10 +2284,7 @@ func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall // PageSize sets the optional parameter "pageSize": The maximum number of // attachments fetched with each request. If not provided, the default is 10. -// The maximum page size that will be returned is 100. The size of each page -// can be smaller than the requested page size and can include zero. For -// example, you could request 100 attachments on one page, receive 0, and then -// on the next page, receive 90. +// The maximum page size that will be returned is 100. func (c *CasesAttachmentsListCall) PageSize(pageSize int64) *CasesAttachmentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 6fa508eeda9..ed5bfc9c8d6 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -449,7 +449,7 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100. The size of each page can be smaller than the requested page size and can include zero. For example, you could request 100 attachments on one page, receive 0, and then on the next page, receive 90.", + "description": "The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100.", "format": "int32", "location": "query", "type": "integer" @@ -619,7 +619,7 @@ } } }, - "revision": "20241212", + "revision": "20241218", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index bec1f32f210..3e79e3206e2 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -2628,10 +2628,7 @@ func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall // PageSize sets the optional parameter "pageSize": The maximum number of // attachments fetched with each request. If not provided, the default is 10. -// The maximum page size that will be returned is 100. The size of each page -// can be smaller than the requested page size and can include zero. For -// example, you could request 100 attachments on one page, receive 0, and then -// on the next page, receive 90. +// The maximum page size that will be returned is 100. func (c *CasesAttachmentsListCall) PageSize(pageSize int64) *CasesAttachmentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index ba6580c68b7..db68334d63a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -230,6 +230,16 @@ "description": "Regional Endpoint", "endpointUrl": "https://dlp.us-west8.rep.googleapis.com/", "location": "us-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dlp.us.rep.googleapis.com/", + "location": "us" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dlp.eu.rep.googleapis.com/", + "location": "eu" } ], "fullyEncodeReservedExpansion": true, @@ -5015,7 +5025,7 @@ } } }, - "revision": "20241204", + "revision": "20241215", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -8243,7 +8253,7 @@ "type": "array" }, "noFilesExist": { - "description": "True if no files exist in this cluster. If the bucket had more files than could be listed, this will be false even if no files for this cluster were seen and file_extensions_seen is empty.", + "description": "True if no files exist in this cluster. If the file store had more files than could be listed, this will be false even if no files for this cluster were seen and file_extensions_seen is empty.", "type": "boolean" }, "sensitivityScore": { @@ -8391,7 +8401,7 @@ "type": "string" }, "locationType": { - "description": "The location type of the bucket (region, dual-region, multi-region, etc). If dual-region, expect data_storage_locations to be populated.", + "description": "The location type of the file store (region, dual-region, multi-region, etc). If dual-region, expect data_storage_locations to be populated.", "type": "string" }, "name": { diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 6a5ec0c78b0..1554e5cbdd3 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -5087,9 +5087,9 @@ type GooglePrivacyDlpV2FileClusterSummary struct { FileExtensionsSeen []*GooglePrivacyDlpV2FileExtensionInfo `json:"fileExtensionsSeen,omitempty"` // FileStoreInfoTypeSummaries: InfoTypes detected in this cluster. FileStoreInfoTypeSummaries []*GooglePrivacyDlpV2FileStoreInfoTypeSummary `json:"fileStoreInfoTypeSummaries,omitempty"` - // NoFilesExist: True if no files exist in this cluster. If the bucket had more - // files than could be listed, this will be false even if no files for this - // cluster were seen and file_extensions_seen is empty. + // NoFilesExist: True if no files exist in this cluster. If the file store had + // more files than could be listed, this will be false even if no files for + // this cluster were seen and file_extensions_seen is empty. NoFilesExist bool `json:"noFilesExist,omitempty"` // SensitivityScore: The sensitivity score of this cluster. The score will be // SENSITIVITY_LOW if nothing has been scanned. @@ -5267,7 +5267,7 @@ type GooglePrivacyDlpV2FileStoreDataProfile struct { FullResource string `json:"fullResource,omitempty"` // LastModifiedTime: The time the file store was last modified. LastModifiedTime string `json:"lastModifiedTime,omitempty"` - // LocationType: The location type of the bucket (region, dual-region, + // LocationType: The location type of the file store (region, dual-region, // multi-region, etc). If dual-region, expect data_storage_locations to be // populated. LocationType string `json:"locationType,omitempty"` diff --git a/jobs/v3p1beta1/jobs-api.json b/jobs/v3p1beta1/jobs-api.json index c771224c2f3..e08a8893dcb 100644 --- a/jobs/v3p1beta1/jobs-api.json +++ b/jobs/v3p1beta1/jobs-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20240614", + "revision": "20241219", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -2452,18 +2452,18 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { - "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", + "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", "items": { "type": "string" }, "type": "array" }, "administrativeArea": { - "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", + "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.", "type": "string" }, "languageCode": { @@ -2479,7 +2479,7 @@ "type": "string" }, "postalCode": { - "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", + "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).", "type": "string" }, "recipients": { @@ -2499,7 +2499,7 @@ "type": "integer" }, "sortingCode": { - "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. Côte d'Ivoire).", + "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (For example \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (For example Côte d'Ivoire).", "type": "string" }, "sublocality": { @@ -2781,22 +2781,22 @@ "id": "TimeOfDay", "properties": { "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", "format": "int32", "type": "integer" }, "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", + "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.", "format": "int32", "type": "integer" }, "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.", "format": "int32", "type": "integer" }, "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.", "format": "int32", "type": "integer" } diff --git a/jobs/v3p1beta1/jobs-gen.go b/jobs/v3p1beta1/jobs-gen.go index 0deb055dffb..da9200c13ba 100644 --- a/jobs/v3p1beta1/jobs-gen.go +++ b/jobs/v3p1beta1/jobs-gen.go @@ -2639,42 +2639,43 @@ func (s Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PostalAddress: Represents a postal address, e.g. for postal delivery or -// payments addresses. Given a postal address, a postal service can deliver +// PostalAddress: Represents a postal address. For example for postal delivery +// or payments addresses. Given a postal address, a postal service can deliver // items to a premise, P.O. Box or similar. It is not intended to model // geographical locations (roads, towns, mountains). In typical usage an -// address would be created via user input or from importing existing data, +// address would be created by user input or from importing existing data, // depending on the type of process. Advice on address input / editing: - Use // an internationalization-ready address widget such as // https://github.com/google/libaddressinput) - Users should not be presented // with UI elements for input or editing of fields outside countries where that -// field is used. For more guidance on how to use this schema, please see: +// field is used. For more guidance on how to use this schema, see: // https://support.google.com/business/answer/6397478 type PostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels of an // address. Because values in address_lines do not have type information and - // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), - // it is important that the line order is clear. The order of address lines - // should be "envelope order" for the country/region of the address. In places - // where this can vary (e.g. Japan), address_language is used to make it - // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for - // small-to-large). This way, the most specific line of an address can be - // selected based on the language. The minimum permitted structural - // representation of an address consists of a region_code with all remaining - // information placed in the address_lines. It would be possible to format such - // an address very approximately without geocoding, but no semantic reasoning - // could be made about any of the address components until it was at least - // partially resolved. Creating an address only containing a region_code and - // address_lines, and then geocoding is the recommended way to handle + // may sometimes contain multiple values in a single field (For example + // "Austin, TX"), it is important that the line order is clear. The order of + // address lines should be "envelope order" for the country/region of the + // address. In places where this can vary (For example Japan), address_language + // is used to make it explicit (For example "ja" for large-to-small ordering + // and "ja-Latn" or "en" for small-to-large). This way, the most specific line + // of an address can be selected based on the language. The minimum permitted + // structural representation of an address consists of a region_code with all + // remaining information placed in the address_lines. It would be possible to + // format such an address very approximately without geocoding, but no semantic + // reasoning could be made about any of the address components until it was at + // least partially resolved. Creating an address only containing a region_code + // and address_lines, and then geocoding is the recommended way to handle // completely unstructured addresses (as opposed to guessing which parts of the // address should be localities or administrative areas). AddressLines []string `json:"addressLines,omitempty"` // AdministrativeArea: Optional. Highest administrative subdivision which is // used for postal addresses of a country or region. For example, this can be a // state, a province, an oblast, or a prefecture. Specifically, for Spain this - // is the province and not the autonomous community (e.g. "Barcelona" and not - // "Catalonia"). Many countries don't use an administrative area in postal - // addresses. E.g. in Switzerland this should be left unpopulated. + // is the province and not the autonomous community (For example "Barcelona" + // and not "Catalonia"). Many countries don't use an administrative area in + // postal addresses. For example in Switzerland this should be left + // unpopulated. AdministrativeArea string `json:"administrativeArea,omitempty"` // LanguageCode: Optional. BCP-47 language code of the contents of this address // (if known). This is often the UI language of the input form or is expected @@ -2694,7 +2695,7 @@ type PostalAddress struct { Organization string `json:"organization,omitempty"` // PostalCode: Optional. Postal code of the address. Not all countries use or // require postal codes to be present, but where they are used, they may - // trigger additional validation with other parts of the address (e.g. + // trigger additional validation with other parts of the address (For example // state/zip validation in the U.S.A.). PostalCode string `json:"postalCode,omitempty"` // Recipients: Optional. The recipient at the address. This field may, under @@ -2713,9 +2714,10 @@ type PostalAddress struct { Revision int64 `json:"revision,omitempty"` // SortingCode: Optional. Additional, country-specific, sorting code. This is // not used in most regions. Where it is used, the value is either a string - // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a - // number alone, representing the "sector code" (Jamaica), "delivery area - // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). + // like "CEDEX", optionally followed by a number (For example "CEDEX 7"), or + // just a number alone, representing the "sector code" (Jamaica), "delivery + // area indicator" (Malawi) or "post office indicator" (For example Côte + // d'Ivoire). SortingCode string `json:"sortingCode,omitempty"` // Sublocality: Optional. Sublocality of the address. For example, this can be // neighborhoods, boroughs, districts. @@ -3128,16 +3130,19 @@ func (s Status) MarshalJSON() ([]byte, error) { // significant or are specified elsewhere. An API may choose to allow leap // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. type TimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may - // choose to allow the value "24:00:00" for scenarios like business closing - // time. + // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 + // and typically must be less than or equal to 23. An API may choose to allow + // the value "24:00:00" for scenarios like business closing time. Hours int64 `json:"hours,omitempty"` - // Minutes: Minutes of hour of day. Must be from 0 to 59. + // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less + // than or equal to 59. Minutes int64 `json:"minutes,omitempty"` - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal + // to 0 and less than or equal to 999,999,999. Nanos int64 `json:"nanos,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. + // Seconds: Seconds of a minute. Must be greater than or equal to 0 and + // typically must be less than or equal to 59. An API may allow the value 60 if + // it allows leap-seconds. Seconds int64 `json:"seconds,omitempty"` // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 876df37a026..682da451a9c 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1930,49 +1930,26 @@ "userEvents": { "methods": { "collect": { - "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "description": "Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", - "httpMethod": "GET", + "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.collect", "parameterOrder": [ "parent" ], "parameters": { - "ets": { - "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - "format": "int64", - "location": "query", - "type": "string" - }, "parent": { "description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" - }, - "prebuiltRule": { - "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", - "location": "query", - "type": "string" - }, - "rawJson": { - "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", - "location": "query", - "type": "string" - }, - "uri": { - "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", - "location": "query", - "type": "string" - }, - "userEvent": { - "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - "location": "query", - "type": "string" } }, "path": "v2/{+parent}/userEvents:collect", + "request": { + "$ref": "GoogleCloudRetailV2CollectUserEventRequest" + }, "response": { "$ref": "GoogleApiHttpBody" }, @@ -2246,7 +2223,7 @@ } } }, - "revision": "20241205", + "revision": "20241220", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2859,6 +2836,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2CollectUserEventRequest": { + "description": "Request message for CollectUserEvent method.", + "id": "GoogleCloudRetailV2CollectUserEventRequest", + "properties": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "type": "string" + }, + "prebuiltRule": { + "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", + "type": "string" + }, + "rawJson": { + "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2ColorInfo", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 901da990d6a..186f23950dd 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1302,6 +1302,46 @@ func (s GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2CollectUserEventRequest: Request message for +// CollectUserEvent method. +type GoogleCloudRetailV2CollectUserEventRequest struct { + // Ets: The event timestamp in milliseconds. This prevents browser caching of + // otherwise identical get requests. The name is abbreviated to reduce the + // payload bytes. + Ets int64 `json:"ets,omitempty,string"` + // PrebuiltRule: The prebuilt rule name that can convert a specific type of + // raw_json. For example: "ga4_bq" rule for the GA4 user event schema. + PrebuiltRule string `json:"prebuiltRule,omitempty"` + // RawJson: An arbitrary serialized JSON string that contains necessary + // information that can comprise a user event. When this field is specified, + // the user_event field will be ignored. Note: line-delimited JSON is not + // supported, a single JSON only. + RawJson string `json:"rawJson,omitempty"` + // Uri: The URL including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the referer + // URL, because many browsers only send the domain for 3rd party requests. + Uri string `json:"uri,omitempty"` + // UserEvent: Required. URL encoded UserEvent proto with a length limit of + // 2,000,000 characters. + UserEvent string `json:"userEvent,omitempty"` + // ForceSendFields is a list of field names (e.g. "Ets") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Ets") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2CollectUserEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CollectUserEventRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ColorInfo: The color information of a Product. type GoogleCloudRetailV2ColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to use the @@ -15710,65 +15750,26 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Co } type ProjectsLocationsCatalogsUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + s *Service + parent string + googlecloudretailv2collectusereventrequest *GoogleCloudRetailV2CollectUserEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a 3rd party domain. -// This method is used only by the Retail API JavaScript pixel and Google Tag -// Manager. Users should not call this method directly. +// Collect: Writes a single user event from the browser. For larger user event +// payload over 16 KB, the POST method should be used instead, otherwise a 400 +// Bad Request error is returned. This method is used only by the Retail API +// JavaScript pixel and Google Tag Manager. Users should not call this method +// directly. // // - parent: The parent catalog name, such as // `projects/1234/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsUserEventsCollectCall { +func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string, googlecloudretailv2collectusereventrequest *GoogleCloudRetailV2CollectUserEventRequest) *ProjectsLocationsCatalogsUserEventsCollectCall { c := &ProjectsLocationsCatalogsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// PrebuiltRule sets the optional parameter "prebuiltRule": The prebuilt rule -// name that can convert a specific type of raw_json. For example: "ga4_bq" -// rule for the GA4 user event schema. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) PrebuiltRule(prebuiltRule string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("prebuiltRule", prebuiltRule) - return c -} - -// RawJson sets the optional parameter "rawJson": An arbitrary serialized JSON -// string that contains necessary information that can comprise a user event. -// When this field is specified, the user_event field will be ignored. Note: -// line-delimited JSON is not supported, a single JSON only. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) RawJson(rawJson string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("rawJson", rawJson) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for 3rd party requests. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) + c.googlecloudretailv2collectusereventrequest = googlecloudretailv2collectusereventrequest return c } @@ -15780,14 +15781,6 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Fields(s ...googleapi.F 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 *ProjectsLocationsCatalogsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsCollectCall { c.ctx_ = ctx @@ -15804,15 +15797,16 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Header() http.Header { } func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudretailv2collectusereventrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15820,7 +15814,7 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) ( googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 46fc9f7b72a..44a2472cb62 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2391,49 +2391,26 @@ "userEvents": { "methods": { "collect": { - "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "description": "Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", - "httpMethod": "GET", + "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.collect", "parameterOrder": [ "parent" ], "parameters": { - "ets": { - "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - "format": "int64", - "location": "query", - "type": "string" - }, "parent": { "description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" - }, - "prebuiltRule": { - "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", - "location": "query", - "type": "string" - }, - "rawJson": { - "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", - "location": "query", - "type": "string" - }, - "uri": { - "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", - "location": "query", - "type": "string" - }, - "userEvent": { - "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - "location": "query", - "type": "string" } }, "path": "v2alpha/{+parent}/userEvents:collect", + "request": { + "$ref": "GoogleCloudRetailV2alphaCollectUserEventRequest" + }, "response": { "$ref": "GoogleApiHttpBody" }, @@ -2767,7 +2744,7 @@ } } }, - "revision": "20241205", + "revision": "20241220", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4170,6 +4147,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCollectUserEventRequest": { + "description": "Request message for CollectUserEvent method.", + "id": "GoogleCloudRetailV2alphaCollectUserEventRequest", + "properties": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "type": "string" + }, + "prebuiltRule": { + "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", + "type": "string" + }, + "rawJson": { + "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2alphaColorInfo", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index eecf3df6503..106ac39b51f 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2470,6 +2470,46 @@ func (s GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCollectUserEventRequest: Request message for +// CollectUserEvent method. +type GoogleCloudRetailV2alphaCollectUserEventRequest struct { + // Ets: The event timestamp in milliseconds. This prevents browser caching of + // otherwise identical get requests. The name is abbreviated to reduce the + // payload bytes. + Ets int64 `json:"ets,omitempty,string"` + // PrebuiltRule: The prebuilt rule name that can convert a specific type of + // raw_json. For example: "ga4_bq" rule for the GA4 user event schema. + PrebuiltRule string `json:"prebuiltRule,omitempty"` + // RawJson: An arbitrary serialized JSON string that contains necessary + // information that can comprise a user event. When this field is specified, + // the user_event field will be ignored. Note: line-delimited JSON is not + // supported, a single JSON only. + RawJson string `json:"rawJson,omitempty"` + // Uri: The URL including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the referer + // URL, because many browsers only send the domain for 3rd party requests. + Uri string `json:"uri,omitempty"` + // UserEvent: Required. URL encoded UserEvent proto with a length limit of + // 2,000,000 characters. + UserEvent string `json:"userEvent,omitempty"` + // ForceSendFields is a list of field names (e.g. "Ets") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Ets") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaCollectUserEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCollectUserEventRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaColorInfo: The color information of a Product. type GoogleCloudRetailV2alphaColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to use the @@ -18317,65 +18357,26 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Co } type ProjectsLocationsCatalogsUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + s *Service + parent string + googlecloudretailv2alphacollectusereventrequest *GoogleCloudRetailV2alphaCollectUserEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a 3rd party domain. -// This method is used only by the Retail API JavaScript pixel and Google Tag -// Manager. Users should not call this method directly. +// Collect: Writes a single user event from the browser. For larger user event +// payload over 16 KB, the POST method should be used instead, otherwise a 400 +// Bad Request error is returned. This method is used only by the Retail API +// JavaScript pixel and Google Tag Manager. Users should not call this method +// directly. // // - parent: The parent catalog name, such as // `projects/1234/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsUserEventsCollectCall { +func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string, googlecloudretailv2alphacollectusereventrequest *GoogleCloudRetailV2alphaCollectUserEventRequest) *ProjectsLocationsCatalogsUserEventsCollectCall { c := &ProjectsLocationsCatalogsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// PrebuiltRule sets the optional parameter "prebuiltRule": The prebuilt rule -// name that can convert a specific type of raw_json. For example: "ga4_bq" -// rule for the GA4 user event schema. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) PrebuiltRule(prebuiltRule string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("prebuiltRule", prebuiltRule) - return c -} - -// RawJson sets the optional parameter "rawJson": An arbitrary serialized JSON -// string that contains necessary information that can comprise a user event. -// When this field is specified, the user_event field will be ignored. Note: -// line-delimited JSON is not supported, a single JSON only. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) RawJson(rawJson string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("rawJson", rawJson) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for 3rd party requests. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) + c.googlecloudretailv2alphacollectusereventrequest = googlecloudretailv2alphacollectusereventrequest return c } @@ -18387,14 +18388,6 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Fields(s ...googleapi.F 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 *ProjectsLocationsCatalogsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsCollectCall { c.ctx_ = ctx @@ -18411,15 +18404,16 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Header() http.Header { } func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudretailv2alphacollectusereventrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -18427,7 +18421,7 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) ( googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 15a25d05519..070cca6ab22 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2047,49 +2047,26 @@ "userEvents": { "methods": { "collect": { - "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "description": "Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", - "httpMethod": "GET", + "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.collect", "parameterOrder": [ "parent" ], "parameters": { - "ets": { - "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - "format": "int64", - "location": "query", - "type": "string" - }, "parent": { "description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" - }, - "prebuiltRule": { - "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", - "location": "query", - "type": "string" - }, - "rawJson": { - "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", - "location": "query", - "type": "string" - }, - "uri": { - "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", - "location": "query", - "type": "string" - }, - "userEvent": { - "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - "location": "query", - "type": "string" } }, "path": "v2beta/{+parent}/userEvents:collect", + "request": { + "$ref": "GoogleCloudRetailV2betaCollectUserEventRequest" + }, "response": { "$ref": "GoogleApiHttpBody" }, @@ -2391,7 +2368,7 @@ } } }, - "revision": "20241205", + "revision": "20241220", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4513,6 +4490,34 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCollectUserEventRequest": { + "description": "Request message for CollectUserEvent method.", + "id": "GoogleCloudRetailV2betaCollectUserEventRequest", + "properties": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "type": "string" + }, + "prebuiltRule": { + "description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", + "type": "string" + }, + "rawJson": { + "description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2betaColorInfo", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 930e6cb5b3f..2a42ca80447 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3439,6 +3439,46 @@ func (s GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig) MarshalJ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCollectUserEventRequest: Request message for +// CollectUserEvent method. +type GoogleCloudRetailV2betaCollectUserEventRequest struct { + // Ets: The event timestamp in milliseconds. This prevents browser caching of + // otherwise identical get requests. The name is abbreviated to reduce the + // payload bytes. + Ets int64 `json:"ets,omitempty,string"` + // PrebuiltRule: The prebuilt rule name that can convert a specific type of + // raw_json. For example: "ga4_bq" rule for the GA4 user event schema. + PrebuiltRule string `json:"prebuiltRule,omitempty"` + // RawJson: An arbitrary serialized JSON string that contains necessary + // information that can comprise a user event. When this field is specified, + // the user_event field will be ignored. Note: line-delimited JSON is not + // supported, a single JSON only. + RawJson string `json:"rawJson,omitempty"` + // Uri: The URL including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the referer + // URL, because many browsers only send the domain for 3rd party requests. + Uri string `json:"uri,omitempty"` + // UserEvent: Required. URL encoded UserEvent proto with a length limit of + // 2,000,000 characters. + UserEvent string `json:"userEvent,omitempty"` + // ForceSendFields is a list of field names (e.g. "Ets") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Ets") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaCollectUserEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCollectUserEventRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaColorInfo: The color information of a Product. type GoogleCloudRetailV2betaColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to use the @@ -16522,65 +16562,26 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Co } type ProjectsLocationsCatalogsUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + s *Service + parent string + googlecloudretailv2betacollectusereventrequest *GoogleCloudRetailV2betaCollectUserEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a 3rd party domain. -// This method is used only by the Retail API JavaScript pixel and Google Tag -// Manager. Users should not call this method directly. +// Collect: Writes a single user event from the browser. For larger user event +// payload over 16 KB, the POST method should be used instead, otherwise a 400 +// Bad Request error is returned. This method is used only by the Retail API +// JavaScript pixel and Google Tag Manager. Users should not call this method +// directly. // // - parent: The parent catalog name, such as // `projects/1234/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsUserEventsCollectCall { +func (r *ProjectsLocationsCatalogsUserEventsService) Collect(parent string, googlecloudretailv2betacollectusereventrequest *GoogleCloudRetailV2betaCollectUserEventRequest) *ProjectsLocationsCatalogsUserEventsCollectCall { c := &ProjectsLocationsCatalogsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// PrebuiltRule sets the optional parameter "prebuiltRule": The prebuilt rule -// name that can convert a specific type of raw_json. For example: "ga4_bq" -// rule for the GA4 user event schema. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) PrebuiltRule(prebuiltRule string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("prebuiltRule", prebuiltRule) - return c -} - -// RawJson sets the optional parameter "rawJson": An arbitrary serialized JSON -// string that contains necessary information that can comprise a user event. -// When this field is specified, the user_event field will be ignored. Note: -// line-delimited JSON is not supported, a single JSON only. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) RawJson(rawJson string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("rawJson", rawJson) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for 3rd party requests. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCatalogsUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) + c.googlecloudretailv2betacollectusereventrequest = googlecloudretailv2betacollectusereventrequest return c } @@ -16592,14 +16593,6 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Fields(s ...googleapi.F 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 *ProjectsLocationsCatalogsUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsCollectCall { c.ctx_ = ctx @@ -16616,15 +16609,16 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Header() http.Header { } func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudretailv2betacollectusereventrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -16632,7 +16626,7 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) doRequest(alt string) ( googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "retail.projects.locations.catalogs.userEvents.collect", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/runtimeconfig/v1/runtimeconfig-api.json b/runtimeconfig/v1/runtimeconfig-api.json index 613fdbf45dc..08d856d04d5 100644 --- a/runtimeconfig/v1/runtimeconfig-api.json +++ b/runtimeconfig/v1/runtimeconfig-api.json @@ -111,7 +111,7 @@ "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`.", + "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/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "runtimeconfig.operations.cancel", @@ -210,7 +210,7 @@ } } }, - "revision": "20230803", + "revision": "20241219", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/runtimeconfig/v1/runtimeconfig-gen.go b/runtimeconfig/v1/runtimeconfig-gen.go index a1a53563b77..7c3aead8cdd 100644 --- a/runtimeconfig/v1/runtimeconfig-gen.go +++ b/runtimeconfig/v1/runtimeconfig-gen.go @@ -310,7 +310,7 @@ type OperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index 4d2f45ab53b..21a082e1b2b 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1552,7 +1552,7 @@ "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`.", + "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": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "translate.projects.locations.operations.cancel", @@ -1710,7 +1710,7 @@ } } }, - "revision": "20241029", + "revision": "20241218", "rootUrl": "https://translation.googleapis.com/", "schemas": { "AdaptiveMtDataset": { @@ -2374,6 +2374,10 @@ "description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.", "id": "GlossaryConfig", "properties": { + "contextualTranslationEnabled": { + "description": "Optional. If set to true, the glossary will be used for contextual translation.", + "type": "boolean" + }, "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" @@ -3125,6 +3129,10 @@ "description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.", "id": "TranslateTextGlossaryConfig", "properties": { + "contextualTranslationEnabled": { + "description": "Optional. If set to true, the glossary will be used for contextual translation.", + "type": "boolean" + }, "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" diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index 6a99f3b25df..69dc8e6b918 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -1273,6 +1273,9 @@ func (s Glossary) MarshalJSON() ([]byte, error) { // GlossaryConfig: Configures which glossary is used for a specific target // language and defines options for applying that glossary. type GlossaryConfig struct { + // ContextualTranslationEnabled: Optional. If set to true, the glossary will be + // used for contextual translation. + ContextualTranslationEnabled bool `json:"contextualTranslationEnabled,omitempty"` // 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 @@ -1281,15 +1284,15 @@ type GlossaryConfig struct { // 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 is a list of field names (e.g. + // "ContextualTranslationEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://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 + // NullFields is a list of field names (e.g. "ContextualTranslationEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2487,6 +2490,9 @@ func (s TranslateDocumentResponse) MarshalJSON() ([]byte, error) { // TranslateTextGlossaryConfig: Configures which glossary is used for a // specific target language and defines options for applying that glossary. type TranslateTextGlossaryConfig struct { + // ContextualTranslationEnabled: Optional. If set to true, the glossary will be + // used for contextual translation. + ContextualTranslationEnabled bool `json:"contextualTranslationEnabled,omitempty"` // 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 @@ -2495,15 +2501,15 @@ type TranslateTextGlossaryConfig struct { // 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 is a list of field names (e.g. + // "ContextualTranslationEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://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 + // NullFields is a list of field names (e.g. "ContextualTranslationEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -8033,7 +8039,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/translate/v3beta1/translate-api.json b/translate/v3beta1/translate-api.json index 8036016d64e..8f98f4d78ff 100644 --- a/translate/v3beta1/translate-api.json +++ b/translate/v3beta1/translate-api.json @@ -589,7 +589,7 @@ "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`.", + "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": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "translate.projects.locations.operations.cancel", @@ -747,7 +747,7 @@ } } }, - "revision": "20241029", + "revision": "20241218", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchDocumentInputConfig": { @@ -1404,9 +1404,13 @@ "type": "object" }, "TranslateTextGlossaryConfig": { - "description": "Configures which glossary should be used for a specific target language, and defines options for applying that glossary.", + "description": "----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary.", "id": "TranslateTextGlossaryConfig", "properties": { + "contextualTranslationEnabled": { + "description": "Optional. If set to true, the glossary will be used for contextual translation.", + "type": "boolean" + }, "glossary": { "description": "Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*", "type": "string" diff --git a/translate/v3beta1/translate-gen.go b/translate/v3beta1/translate-gen.go index 9b0e67f3d9d..8f8502d4244 100644 --- a/translate/v3beta1/translate-gen.go +++ b/translate/v3beta1/translate-gen.go @@ -1321,24 +1321,31 @@ func (s TranslateDocumentResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// TranslateTextGlossaryConfig: Configures which glossary should be used for a -// specific target language, and defines options for applying that glossary. +// TranslateTextGlossaryConfig: +// ----------------------------------------------------------------------------- +// +// Configures which glossary should be used for a specific target language, +// +// and defines options for applying that glossary. type TranslateTextGlossaryConfig struct { + // ContextualTranslationEnabled: Optional. If set to true, the glossary will be + // used for contextual translation. + ContextualTranslationEnabled bool `json:"contextualTranslationEnabled,omitempty"` // Glossary: Required. Specifies the glossary used for this translation. Use // this format: projects/*/locations/*/glossaries/* Glossary string `json:"glossary,omitempty"` // IgnoreCase: Optional. Indicates match is case-insensitive. 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 is a list of field names (e.g. + // "ContextualTranslationEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://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 + // NullFields is a list of field names (e.g. "ContextualTranslationEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -3310,7 +3317,7 @@ type ProjectsLocationsOperationsCancelCall struct { // 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 +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled.