diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 1bcb9feff50..1e30a69fd05 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -642,7 +642,7 @@ } } }, - "revision": "20220720", + "revision": "20220722", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -940,6 +940,21 @@ }, "type": "object" }, + "CardWithId": { + "description": "Widgets for Chat apps to specify.", + "id": "CardWithId", + "properties": { + "card": { + "$ref": "GoogleAppsCardV1Card", + "description": "Card proto that allows Chat apps to specify UI elements and editable widgets." + }, + "cardId": { + "description": "Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message.", + "type": "string" + } + }, + "type": "object" + }, "ChatAppLogEntry": { "description": "JSON payload of error messages. If the Cloud Logging API is enabled, these error messages are logged to [Google Cloud Logging](https://cloud.google.com/logging/docs).", "id": "ChatAppLogEntry", @@ -2466,6 +2481,13 @@ }, "type": "array" }, + "cardsV2": { + "description": "Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text-body of a Chat message, but can situationally appear other places, such as [dialogs](https://developers.google.com/chat/how-tos/dialogs). The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList`", + "items": { + "$ref": "CardWithId" + }, + "type": "array" + }, "createTime": { "description": "Output only. The time at which the message was created in Google Chat server.", "format": "google-datetime", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 8d033922aa8..a69758a6125 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -737,6 +737,39 @@ func (s *CardHeader) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CardWithId: Widgets for Chat apps to specify. +type CardWithId struct { + // Card: Card proto that allows Chat apps to specify UI elements and + // editable widgets. + Card *GoogleAppsCardV1Card `json:"card,omitempty"` + + // CardId: Required for `cardsV2` messages. Chat app-specified + // identifier for this widget. Scoped within a message. + CardId string `json:"cardId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Card") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Card") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CardWithId) MarshalJSON() ([]byte, error) { + type NoMethod CardWithId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ChatAppLogEntry: JSON payload of error messages. If the Cloud Logging // API is enabled, these error messages are logged to Google Cloud // Logging (https://cloud.google.com/logging/docs). @@ -3110,6 +3143,17 @@ type Message struct { // message. Cards []*Card `json:"cards,omitempty"` + // CardsV2: Richly formatted and interactive cards that display UI + // elements and editable widgets, such as: - Formatted text - Buttons - + // Clickable images - Checkboxes - Radio buttons - Input widgets. Cards + // are usually displayed below the text-body of a Chat message, but can + // situationally appear other places, such as dialogs + // (https://developers.google.com/chat/how-tos/dialogs). The `cardId` is + // a unique identifier among cards in the same message and for + // identifying user input values. Currently supported widgets include: - + // `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` + CardsV2 []*CardWithId `json:"cardsV2,omitempty"` + // CreateTime: Output only. The time at which the message was created in // Google Chat server. CreateTime string `json:"createTime,omitempty"` diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 75d78857ccb..9fbbf3f1644 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -1901,7 +1901,7 @@ } } }, - "revision": "20220720", + "revision": "20220728", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -3019,10 +3019,6 @@ "$ref": "GoogleCloudChannelV1Constraints", "description": "Constraints on transacting the Offer." }, - "dealCode": { - "description": "The deal code of the offer to get a special promotion or discount.", - "type": "string" - }, "endTime": { "description": "Output only. End of the Offer validity time.", "format": "google-datetime", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index b67aad3e051..f361eaaf441 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -2167,10 +2167,6 @@ type GoogleCloudChannelV1Offer struct { // Constraints: Constraints on transacting the Offer. Constraints *GoogleCloudChannelV1Constraints `json:"constraints,omitempty"` - // DealCode: The deal code of the offer to get a special promotion or - // discount. - DealCode string `json:"dealCode,omitempty"` - // EndTime: Output only. End of the Offer validity time. EndTime string `json:"endTime,omitempty"`