From 45dc2a5487c9b115370b1fad0fe2fe431c14ac37 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 12 Dec 2024 13:21:05 +0000 Subject: [PATCH] feat: Automated regeneration of Chat client --- clients/chat/README.md | 2 +- .../chat/lib/google_api/chat/v1/connection.ex | 8 +-- .../chat/lib/google_api/chat/v1/metadata.ex | 2 +- .../chat/v1/model/google_apps_card_v1_card.ex | 2 +- .../v1/model/google_apps_card_v1_carousel.ex | 46 ++++++++++++++++ .../google_apps_card_v1_carousel_card.ex | 49 +++++++++++++++++ .../google_apps_card_v1_nested_widget.ex | 52 +++++++++++++++++++ .../v1/model/google_apps_card_v1_widget.ex | 3 ++ .../chat/v1/model/set_up_space_request.ex | 2 +- .../lib/google_api/chat/v1/model/space.ex | 3 ++ clients/chat/mix.exs | 2 +- 11 files changed, 162 insertions(+), 9 deletions(-) create mode 100644 clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel.ex create mode 100644 clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel_card.ex create mode 100644 clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_nested_widget.ex diff --git a/clients/chat/README.md b/clients/chat/README.md index 08552850f1..b6b3541d34 100644 --- a/clients/chat/README.md +++ b/clients/chat/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_chat, "~> 0.41"}] + [{:google_api_chat, "~> 0.42"}] end ``` diff --git a/clients/chat/lib/google_api/chat/v1/connection.ex b/clients/chat/lib/google_api/chat/v1/connection.ex index 0dc4a1de30..26ce882f80 100644 --- a/clients/chat/lib/google_api/chat/v1/connection.ex +++ b/clients/chat/lib/google_api/chat/v1/connection.ex @@ -69,22 +69,22 @@ defmodule GoogleApi.Chat.V1.Connection do # View members in Google Chat conversations. "https://www.googleapis.com/auth/chat.memberships.readonly", - # See, compose, send, update, and delete messages and their associated attachments, and add, see, and delete reactions to messages. + # See, compose, send, update, and delete messages as well as their message content; add, see, and delete reactions to messages. "https://www.googleapis.com/auth/chat.messages", # Compose and send messages in Google Chat "https://www.googleapis.com/auth/chat.messages.create", - # See, add, and delete reactions to messages in Google Chat + # See, add, and delete reactions as well as their reaction content to messages in Google Chat "https://www.googleapis.com/auth/chat.messages.reactions", # Add reactions to messages in Google Chat "https://www.googleapis.com/auth/chat.messages.reactions.create", - # View reactions to messages in Google Chat + # View reactions as well as their reaction content to messages in Google Chat "https://www.googleapis.com/auth/chat.messages.reactions.readonly", - # See messages and their associated reactions and attachments in Google Chat + # See messages as well as their reactions and message content in Google Chat "https://www.googleapis.com/auth/chat.messages.readonly", # Create conversations and spaces and see or update metadata (including history settings and access settings) in Google Chat diff --git a/clients/chat/lib/google_api/chat/v1/metadata.ex b/clients/chat/lib/google_api/chat/v1/metadata.ex index 0f05ad1c46..2464ae9699 100644 --- a/clients/chat/lib/google_api/chat/v1/metadata.ex +++ b/clients/chat/lib/google_api/chat/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Chat.V1 do API client metadata for GoogleApi.Chat.V1. """ - @discovery_revision "20241203" + @discovery_revision "20241208" def discovery_revision(), do: @discovery_revision end diff --git a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_card.ex b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_card.ex index 71272d0fe9..f0c05b1cfd 100644 --- a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_card.ex +++ b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_card.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card do @moduledoc """ - A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "sasha@example.com" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } ``` + A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). Note: You can add up to 100 widgets per card. Any widgets beyond this limit are ignored. This limit applies to both card messages and dialogs in Google Chat apps, and to cards in Google Workspace Add-ons. **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "sasha@example.com" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } ``` ## Attributes diff --git a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel.ex b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel.ex new file mode 100644 index 0000000000..1c930ace48 --- /dev/null +++ b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do + @moduledoc """ + [Developer Preview](https://developers.google.com/workspace/preview): A carousel, also known as a slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget. For example, this is a JSON representation of a carousel that contains three text paragraph widgets. ``` { "carouselCards": [ { "widgets": [ { "textParagraph": { "text": "First text paragraph in carousel", } } ] }, { "widgets": [ { "textParagraph": { "text": "Second text paragraph in carousel", } } ] }, { "widgets": [ { "textParagraph": { "text": "Third text paragraph in carousel", } } ] } ] } ``` [Google Chat apps](https://developers.google.com/workspace/chat): + + ## Attributes + + * `carouselCards` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t)`, *default:* `nil`) - A list of cards included in the carousel. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :carouselCards => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t()) | nil + } + + field(:carouselCards, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do + def decode(value, options) do + GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel_card.ex b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel_card.ex new file mode 100644 index 0000000000..ad180cf332 --- /dev/null +++ b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel_card.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do + @moduledoc """ + [Developer Preview](https://developers.google.com/workspace/preview): A card that can be displayed as a carousel item. [Google Chat apps](https://developers.google.com/workspace/chat): + + ## Attributes + + * `footerWidgets` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t)`, *default:* `nil`) - A list of widgets displayed at the bottom of the carousel card. The widgets are displayed in the order that they are specified. + * `widgets` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t)`, *default:* `nil`) - A list of widgets displayed in the carousel card. The widgets are displayed in the order that they are specified. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :footerWidgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil, + :widgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil + } + + field(:footerWidgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list) + field(:widgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do + def decode(value, options) do + GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_nested_widget.ex b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_nested_widget.ex new file mode 100644 index 0000000000..029b2d943b --- /dev/null +++ b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_nested_widget.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do + @moduledoc """ + [Developer Preview](https://developers.google.com/workspace/preview): A list of widgets that can be displayed in a containing layout, such as a `CarouselCard`. [Google Chat apps](https://developers.google.com/workspace/chat): + + ## Attributes + + * `buttonList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t`, *default:* `nil`) - A button list widget. + * `image` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t`, *default:* `nil`) - An image widget. + * `textParagraph` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t`, *default:* `nil`) - A text paragraph widget. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil, + :image => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t() | nil, + :textParagraph => GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t() | nil + } + + field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList) + field(:image, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image) + field(:textParagraph, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph) +end + +defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do + def decode(value, options) do + GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_widget.ex b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_widget.ex index 76f85fd1bb..f78b20ae43 100644 --- a/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_widget.ex +++ b/clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_widget.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do ## Attributes * `buttonList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t`, *default:* `nil`) - A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` "buttonList": { "buttons": [ { "text": "Edit", "color": { "red": 0, "green": 0, "blue": 1, }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ``` + * `carousel` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.t`, *default:* `nil`) - A carousel contains a collection of nested widgets. For example, this is a JSON representation of a carousel that contains two text paragraphs. ``` { "widgets": [ { "textParagraph": { "text": "First text paragraph in the carousel." } }, { "textParagraph": { "text": "Second text paragraph in the carousel." } } ] } ``` * `chipList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.t`, *default:* `nil`) - 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): * `columns` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns.t`, *default:* `nil`) - 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 columns that each contain text paragraphs: ``` "columns": { "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "First column text paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "Second column text paragraph" } } ] } ] } ``` * `dateTimePicker` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t`, *default:* `nil`) - Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": "796435200000" } ``` @@ -39,6 +40,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do @type t :: %__MODULE__{ :buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil, + :carousel => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.t() | nil, :chipList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.t() | nil, :columns => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns.t() | nil, :dateTimePicker => GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t() | nil, @@ -53,6 +55,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do } field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList) + field(:carousel, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel) field(:chipList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList) field(:columns, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns) field(:dateTimePicker, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker) diff --git a/clients/chat/lib/google_api/chat/v1/model/set_up_space_request.ex b/clients/chat/lib/google_api/chat/v1/model/set_up_space_request.ex index 92e968d18b..a95bf89ca4 100644 --- a/clients/chat/lib/google_api/chat/v1/model/set_up_space_request.ex +++ b/clients/chat/lib/google_api/chat/v1/model/set_up_space_request.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Chat.V1.Model.SetUpSpaceRequest do ## Attributes - * `memberships` (*type:* `list(GoogleApi.Chat.V1.Model.Membership.t)`, *default:* `nil`) - Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 20 memberships (in addition to the caller). For human membership, the `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`. To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`. For Google group membership, the `Membership.group_member` field must contain a `group` with `name` populated (format `groups/{group}`). You can only add Google groups when setting `Space.spaceType` to `SPACE`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * `memberships` (*type:* `list(GoogleApi.Chat.V1.Model.Membership.t)`, *default:* `nil`) - Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 49 memberships (in addition to the caller). For human membership, the `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`. To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`. For Google group membership, the `Membership.group_member` field must contain a `group` with `name` populated (format `groups/{group}`). You can only add Google groups when setting `Space.spaceType` to `SPACE`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). * `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. * `space` (*type:* `GoogleApi.Chat.V1.Model.Space.t`, *default:* `nil`) - Required. The `Space.spaceType` field is required. To create a space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. To create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't set `Space.displayName`. To create a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or `Space.spaceDetails`. To create an 1:1 conversation between a human and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space is returned instead of creating a new space. """ diff --git a/clients/chat/lib/google_api/chat/v1/model/space.ex b/clients/chat/lib/google_api/chat/v1/model/space.ex index 520c7343aa..1773789029 100644 --- a/clients/chat/lib/google_api/chat/v1/model/space.ex +++ b/clients/chat/lib/google_api/chat/v1/model/space.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.Chat.V1.Model.Space do * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) with a `spaceType` of `SPACE`. If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters. * `externalUserAllowed` (*type:* `boolean()`, *default:* `nil`) - Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only. * `importMode` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. Creating a space in `Import Mode`requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * `importModeExpireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using `spaces.completeImport`. This field is only populated for spaces that were created with import mode. * `lastActiveTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the last message in the space. * `membershipCount` (*type:* `GoogleApi.Chat.V1.Model.MembershipCount.t`, *default:* `nil`) - Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) method or from the space URL. For example, if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is `AAAAAAAAA`. @@ -51,6 +52,7 @@ defmodule GoogleApi.Chat.V1.Model.Space do :displayName => String.t() | nil, :externalUserAllowed => boolean() | nil, :importMode => boolean() | nil, + :importModeExpireTime => DateTime.t() | nil, :lastActiveTime => DateTime.t() | nil, :membershipCount => GoogleApi.Chat.V1.Model.MembershipCount.t() | nil, :name => String.t() | nil, @@ -72,6 +74,7 @@ defmodule GoogleApi.Chat.V1.Model.Space do field(:displayName) field(:externalUserAllowed) field(:importMode) + field(:importModeExpireTime, as: DateTime) field(:lastActiveTime, as: DateTime) field(:membershipCount, as: GoogleApi.Chat.V1.Model.MembershipCount) field(:name) diff --git a/clients/chat/mix.exs b/clients/chat/mix.exs index 9886eba1b9..8054be3089 100644 --- a/clients/chat/mix.exs +++ b/clients/chat/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Chat.Mixfile do use Mix.Project - @version "0.41.6" + @version "0.42.0" def project() do [