From 91a4af2a7f21678efa5ca71486767b9767e35eca Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:39:49 -0700 Subject: [PATCH] docs(apps-chat-v1): Various updates and clarifications to reference documentation (#27397) --- .../apps/chat/v1/chat_service/client.rb | 183 ++++++++------- .../apps/chat/v1/chat_service/rest/client.rb | 183 ++++++++------- .../chat/v1/chat_service_services_pb.rb | 93 ++++---- .../lib/google/chat/v1/space_pb.rb | 5 +- .../proto_docs/google/chat/v1/message.rb | 27 +-- .../proto_docs/google/chat/v1/space.rb | 215 +++++++++++++----- .../proto_docs/google/chat/v1/space_event.rb | 2 + 7 files changed, 433 insertions(+), 275 deletions(-) diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb index 088b9348c319..8b5806994c7d 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb @@ -310,18 +310,30 @@ def initialize # Service calls ## - # Creates a message in a Google Chat space. The maximum message size, - # including text and cards, is 32,000 bytes. For an example, see [Send a + # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # Calling this method requires - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) - # and supports the following authentication types: + # The `create()` method requires either user or app authentication. Chat + # attributes the message sender differently depending on the type of + # authentication that you use in your request. # - # - For text messages, user authentication or app authentication are - # supported. - # - For card messages, only app authentication is supported. (Only Chat apps - # can create card messages.) + # The following image shows how Chat attributes a message when you use app + # authentication. Chat displays the Chat app as the message + # sender. The content of the message can contain text (`text`), cards + # (`cardsV2`), and accessory widgets (`accessoryWidgets`). + # + # ![Message sent with app + # authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) + # + # The following image shows how Chat attributes a message when you use user + # authentication. Chat displays the user as the message sender and attributes + # the Chat app to the message by displaying its name. The content of message + # can only contain text (`text`). + # + # ![Message sent with user + # authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) + # + # The maximum message size, including the message contents, is 32,000 bytes. # # @overload create_message(request, options = nil) # Pass arguments to `create_message` via a request object, either of type @@ -443,8 +455,12 @@ def create_message request, options = nil ## # Lists messages in a space that the caller is a member of, including - # messages from blocked members and spaces. For an example, see - # [List messages](/chat/api/guides/v1/messages/list). + # messages from blocked members and spaces. If you list messages from a + # space with no messages, the response is an empty object. When using a + # REST/HTTP interface, the response contains an empty JSON object, `{}`. + # For an example, see + # [List + # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # @@ -1912,14 +1928,19 @@ def get_space request, options = nil end ## - # Creates a named space. Spaces grouped by topics aren't supported. For an - # example, see [Create a + # Creates a space with no members. Can be used to create a named space. + # Spaces grouped by topics aren't supported. For an example, see + # [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # # If you receive the error message `ALREADY_EXISTS` when creating # a space, try a different `displayName`. An existing space within # the Google Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), you can create a + # group chat in import mode using `spaceType.GROUP_CHAT`. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # @@ -1942,10 +1963,14 @@ def get_space request, options = nil # Required. The `displayName` and `spaceType` fields must be populated. Only # `SpaceType.SPACE` is supported. # - # If you receive the error message `ALREADY_EXISTS` when creating a space, + # If you receive the error message `ALREADY_EXISTS`, # try a different `displayName`. An existing space within the Google # Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), + # `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + # # The space `name` is assigned on the server so anything specified in this # field will be ignored. # @param request_id [::String] @@ -2236,54 +2261,64 @@ def set_up_space request, options = nil # Required. The updated field paths, comma separated if there are # multiple. # - # Currently supported field paths: + # You can update the following fields for a space: # - # - `display_name` (Only supports changing the display name of a space with - # the `SPACE` type, or when also including the `space_type` mask to change a - # `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a - # `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument - # error. If you receive the error message `ALREADY_EXISTS` when updating the - # `displayName`, try a different `displayName`. An existing space within the - # Google Workspace organization might already use this display name.) + # `space_details`: Updates the space's description. Supports up to 150 + # characters. # - # - `space_type` (Only supports changing a `GROUP_CHAT` space type to + # `display_name`: Only supports updating the display name for spaces where + # `spaceType` field is `SPACE`. + # If you receive the error message `ALREADY_EXISTS`, try a different + # value. An existing space within the + # Google Workspace organization might already use this display name. + # + # `space_type`: Only supports changing a `GROUP_CHAT` space type to # `SPACE`. Include `display_name` together # with `space_type` in the update mask and ensure that the specified space # has a non-empty display name and the `SPACE` space type. Including the # `space_type` mask and the `SPACE` type in the specified space when updating # the display name is optional if the existing space already has the `SPACE` # type. Trying to update the space type in other ways results in an invalid - # argument error). - # `space_type` is not supported with admin access. - # - # - `space_details` + # argument error. + # `space_type` is not supported with `useAdminAccess`. # - # - `space_history_state` (Supports [turning history on or off for the - # space](https://support.google.com/chat/answer/7664687) if [the organization - # allows users to change their history - # setting](https://support.google.com/a/answer/7664184). - # Warning: mutually exclusive with all other field paths.) - # `space_history_state` is not supported with admin access. + # `space_history_state`: Updates [space history + # settings](https://support.google.com/chat/answer/7664687) by turning + # history on or off for the space. Only supported if history settings are + # enabled for the Google Workspace organization. To update the + # space history state, you must omit all other field masks in your request. + # `space_history_state` is not supported with `useAdminAccess`. # - # - `access_settings.audience` (Supports changing the [access + # `access_settings.audience`: Updates the [access # setting](https://support.google.com/chat/answer/11971020) of who can - # discover the space, join the space, and preview the messages in space. If - # no audience is specified in the access setting, the space's access setting - # is updated to private. Warning: mutually exclusive with all other field - # paths.) - # `access_settings.audience` is not supported with admin access. - # - # - Developer Preview: Supports changing the [permission - # settings](https://support.google.com/chat/answer/13340792) of a space, - # supported field paths - # include: `permission_settings.manage_members_and_groups`, - # `permission_settings.modify_space_details`, - # `permission_settings.toggle_history`, - # `permission_settings.use_at_mention_all`, - # `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, - # `permission_settings.reply_messages` - # (Warning: mutually exclusive with all other non-permission settings field - # paths). `permission_settings` is not supported with admin access. + # discover the space, join the space, and preview the messages in named space + # where `spaceType` field is `SPACE`. If the existing space has a + # target audience, you can remove the audience and restrict space access by + # omitting a value for this field mask. To update access settings for a + # space, the authenticating user must be a space manager and omit all other + # field masks in your request. You can't update this field if the space is in + # [import + # mode](https://developers.google.com/workspace/chat/import-data-overview). + # To learn more, see [Make a space discoverable to specific + # users](https://developers.google.com/workspace/chat/space-target-audience). + # `access_settings.audience` is not supported with `useAdminAccess`. + # + # `permission_settings`: Supports changing the + # [permission settings](https://support.google.com/chat/answer/13340792) + # of a space. + # When updating permission settings, you can only specify + # `permissionSettings` field masks; you cannot update other field masks + # at the same time. `permissionSettings` is not supported with + # `useAdminAccess`. + # The supported field masks include: + # + # - `permission_settings.manageMembersAndGroups` + # - `permission_settings.modifySpaceDetails` + # - `permission_settings.toggleHistory` + # - `permission_settings.useAtMentionAll` + # - `permission_settings.manageApps` + # - `permission_settings.manageWebhooks` + # - `permission_settings.replyMessages` # @param use_admin_access [::Boolean] # When `true`, the method runs using the user's Google Workspace # administrator privileges. @@ -2670,40 +2705,25 @@ def find_direct_message request, options = nil end ## - # Creates a human membership or app membership for the calling app. Creating - # memberships for other apps isn't supported. For an example, see - # [Invite or add a user or a Google Chat app to a - # space](https://developers.google.com/workspace/chat/create-members). + # Creates a membership for the calling Chat app, a user, or a Google Group. + # Creating memberships for other Chat apps isn't supported. # When creating a membership, if the specified member has their auto-accept # policy turned off, then they're invited, and must accept the space # invitation before joining. Otherwise, creating a membership adds the member - # directly to the specified space. Requires [user + # directly to the specified space. + # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # - # To specify the member to add, set the `membership.member.name` for the - # human or app member, or set the `membership.group_member.name` for the - # group member. - # - # - To add the calling app to a space or a direct message between two human - # users, use `users/app`. Unable to add other - # apps to the space. - # - # - To add a human user, use `users/{user}`, where `{user}` can be the email - # address for the user. For users in the same Workspace organization `{user}` - # can also be the `id` for the person from the People API, or the `id` for - # the user in the Directory API. For example, if the People API Person - # profile ID for `user@example.com` is `123456789`, you can add the user to - # the space by setting the `membership.member.name` to - # `users/user@example.com` or `users/123456789`. - # - # - To add or invite a Google group in a named space, use - # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud - # Identity Groups API. For example, you can use [Cloud Identity Groups lookup - # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) - # to retrieve the ID `123456789` for group email `group@example.com`, then - # you can add or invite the group to a named space by setting the - # `membership.group_member.name` to `groups/123456789`. Group email is not - # supported, and Google groups can only be added as members in named spaces. + # For example usage, see: + # + # - [Invite or add a user to a + # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). + # + # - [Invite or add a Google Group to a + # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). + # + # - [Add the Chat app to a + # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). # # @overload create_membership(request, options = nil) # Pass arguments to `create_membership` via a request object, either of type @@ -3728,6 +3748,9 @@ def get_thread_read_state request, options = nil # updated, the server returns the updated `Message` resource in the event # payload. # + # Note: The `permissionSettings` field is not returned in the Space + # object of the Space event data for this request. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # To get an event, the authenticated user must be a member of the space. diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb index ff0b8e8aeaa3..fcae956d4bfb 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/client.rb @@ -303,18 +303,30 @@ def initialize # Service calls ## - # Creates a message in a Google Chat space. The maximum message size, - # including text and cards, is 32,000 bytes. For an example, see [Send a + # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # Calling this method requires - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) - # and supports the following authentication types: + # The `create()` method requires either user or app authentication. Chat + # attributes the message sender differently depending on the type of + # authentication that you use in your request. # - # - For text messages, user authentication or app authentication are - # supported. - # - For card messages, only app authentication is supported. (Only Chat apps - # can create card messages.) + # The following image shows how Chat attributes a message when you use app + # authentication. Chat displays the Chat app as the message + # sender. The content of the message can contain text (`text`), cards + # (`cardsV2`), and accessory widgets (`accessoryWidgets`). + # + # ![Message sent with app + # authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) + # + # The following image shows how Chat attributes a message when you use user + # authentication. Chat displays the user as the message sender and attributes + # the Chat app to the message by displaying its name. The content of message + # can only contain text (`text`). + # + # ![Message sent with user + # authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) + # + # The maximum message size, including the message contents, is 32,000 bytes. # # @overload create_message(request, options = nil) # Pass arguments to `create_message` via a request object, either of type @@ -429,8 +441,12 @@ def create_message request, options = nil ## # Lists messages in a space that the caller is a member of, including - # messages from blocked members and spaces. For an example, see - # [List messages](/chat/api/guides/v1/messages/list). + # messages from blocked members and spaces. If you list messages from a + # space with no messages, the response is an empty object. When using a + # REST/HTTP interface, the response contains an empty JSON object, `{}`. + # For an example, see + # [List + # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # @@ -1837,14 +1853,19 @@ def get_space request, options = nil end ## - # Creates a named space. Spaces grouped by topics aren't supported. For an - # example, see [Create a + # Creates a space with no members. Can be used to create a named space. + # Spaces grouped by topics aren't supported. For an example, see + # [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # # If you receive the error message `ALREADY_EXISTS` when creating # a space, try a different `displayName`. An existing space within # the Google Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), you can create a + # group chat in import mode using `spaceType.GROUP_CHAT`. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # @@ -1867,10 +1888,14 @@ def get_space request, options = nil # Required. The `displayName` and `spaceType` fields must be populated. Only # `SpaceType.SPACE` is supported. # - # If you receive the error message `ALREADY_EXISTS` when creating a space, + # If you receive the error message `ALREADY_EXISTS`, # try a different `displayName`. An existing space within the Google # Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), + # `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + # # The space `name` is assigned on the server so anything specified in this # field will be ignored. # @param request_id [::String] @@ -2163,54 +2188,64 @@ def set_up_space request, options = nil # Required. The updated field paths, comma separated if there are # multiple. # - # Currently supported field paths: + # You can update the following fields for a space: # - # - `display_name` (Only supports changing the display name of a space with - # the `SPACE` type, or when also including the `space_type` mask to change a - # `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a - # `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument - # error. If you receive the error message `ALREADY_EXISTS` when updating the - # `displayName`, try a different `displayName`. An existing space within the - # Google Workspace organization might already use this display name.) + # `space_details`: Updates the space's description. Supports up to 150 + # characters. # - # - `space_type` (Only supports changing a `GROUP_CHAT` space type to + # `display_name`: Only supports updating the display name for spaces where + # `spaceType` field is `SPACE`. + # If you receive the error message `ALREADY_EXISTS`, try a different + # value. An existing space within the + # Google Workspace organization might already use this display name. + # + # `space_type`: Only supports changing a `GROUP_CHAT` space type to # `SPACE`. Include `display_name` together # with `space_type` in the update mask and ensure that the specified space # has a non-empty display name and the `SPACE` space type. Including the # `space_type` mask and the `SPACE` type in the specified space when updating # the display name is optional if the existing space already has the `SPACE` # type. Trying to update the space type in other ways results in an invalid - # argument error). - # `space_type` is not supported with admin access. - # - # - `space_details` + # argument error. + # `space_type` is not supported with `useAdminAccess`. # - # - `space_history_state` (Supports [turning history on or off for the - # space](https://support.google.com/chat/answer/7664687) if [the organization - # allows users to change their history - # setting](https://support.google.com/a/answer/7664184). - # Warning: mutually exclusive with all other field paths.) - # `space_history_state` is not supported with admin access. + # `space_history_state`: Updates [space history + # settings](https://support.google.com/chat/answer/7664687) by turning + # history on or off for the space. Only supported if history settings are + # enabled for the Google Workspace organization. To update the + # space history state, you must omit all other field masks in your request. + # `space_history_state` is not supported with `useAdminAccess`. # - # - `access_settings.audience` (Supports changing the [access + # `access_settings.audience`: Updates the [access # setting](https://support.google.com/chat/answer/11971020) of who can - # discover the space, join the space, and preview the messages in space. If - # no audience is specified in the access setting, the space's access setting - # is updated to private. Warning: mutually exclusive with all other field - # paths.) - # `access_settings.audience` is not supported with admin access. - # - # - Developer Preview: Supports changing the [permission - # settings](https://support.google.com/chat/answer/13340792) of a space, - # supported field paths - # include: `permission_settings.manage_members_and_groups`, - # `permission_settings.modify_space_details`, - # `permission_settings.toggle_history`, - # `permission_settings.use_at_mention_all`, - # `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, - # `permission_settings.reply_messages` - # (Warning: mutually exclusive with all other non-permission settings field - # paths). `permission_settings` is not supported with admin access. + # discover the space, join the space, and preview the messages in named space + # where `spaceType` field is `SPACE`. If the existing space has a + # target audience, you can remove the audience and restrict space access by + # omitting a value for this field mask. To update access settings for a + # space, the authenticating user must be a space manager and omit all other + # field masks in your request. You can't update this field if the space is in + # [import + # mode](https://developers.google.com/workspace/chat/import-data-overview). + # To learn more, see [Make a space discoverable to specific + # users](https://developers.google.com/workspace/chat/space-target-audience). + # `access_settings.audience` is not supported with `useAdminAccess`. + # + # `permission_settings`: Supports changing the + # [permission settings](https://support.google.com/chat/answer/13340792) + # of a space. + # When updating permission settings, you can only specify + # `permissionSettings` field masks; you cannot update other field masks + # at the same time. `permissionSettings` is not supported with + # `useAdminAccess`. + # The supported field masks include: + # + # - `permission_settings.manageMembersAndGroups` + # - `permission_settings.modifySpaceDetails` + # - `permission_settings.toggleHistory` + # - `permission_settings.useAtMentionAll` + # - `permission_settings.manageApps` + # - `permission_settings.manageWebhooks` + # - `permission_settings.replyMessages` # @param use_admin_access [::Boolean] # When `true`, the method runs using the user's Google Workspace # administrator privileges. @@ -2577,40 +2612,25 @@ def find_direct_message request, options = nil end ## - # Creates a human membership or app membership for the calling app. Creating - # memberships for other apps isn't supported. For an example, see - # [Invite or add a user or a Google Chat app to a - # space](https://developers.google.com/workspace/chat/create-members). + # Creates a membership for the calling Chat app, a user, or a Google Group. + # Creating memberships for other Chat apps isn't supported. # When creating a membership, if the specified member has their auto-accept # policy turned off, then they're invited, and must accept the space # invitation before joining. Otherwise, creating a membership adds the member - # directly to the specified space. Requires [user + # directly to the specified space. + # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # - # To specify the member to add, set the `membership.member.name` for the - # human or app member, or set the `membership.group_member.name` for the - # group member. - # - # - To add the calling app to a space or a direct message between two human - # users, use `users/app`. Unable to add other - # apps to the space. - # - # - To add a human user, use `users/{user}`, where `{user}` can be the email - # address for the user. For users in the same Workspace organization `{user}` - # can also be the `id` for the person from the People API, or the `id` for - # the user in the Directory API. For example, if the People API Person - # profile ID for `user@example.com` is `123456789`, you can add the user to - # the space by setting the `membership.member.name` to - # `users/user@example.com` or `users/123456789`. - # - # - To add or invite a Google group in a named space, use - # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud - # Identity Groups API. For example, you can use [Cloud Identity Groups lookup - # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) - # to retrieve the ID `123456789` for group email `group@example.com`, then - # you can add or invite the group to a named space by setting the - # `membership.group_member.name` to `groups/123456789`. Group email is not - # supported, and Google groups can only be added as members in named spaces. + # For example usage, see: + # + # - [Invite or add a user to a + # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). + # + # - [Invite or add a Google Group to a + # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). + # + # - [Add the Chat app to a + # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). # # @overload create_membership(request, options = nil) # Pass arguments to `create_membership` via a request object, either of type @@ -3572,6 +3592,9 @@ def get_thread_read_state request, options = nil # updated, the server returns the updated `Message` resource in the event # payload. # + # Note: The `permissionSettings` field is not returned in the Space + # object of the Space event data for this request. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # To get an event, the authenticated user must be a member of the space. diff --git a/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb index 6940c0514823..dae6ba6964d4 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/chat_service_services_pb.rb @@ -34,22 +34,38 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'google.chat.v1.ChatService' - # Creates a message in a Google Chat space. The maximum message size, - # including text and cards, is 32,000 bytes. For an example, see [Send a + # Creates a message in a Google Chat space. For an example, see [Send a # message](https://developers.google.com/workspace/chat/create-messages). # - # Calling this method requires - # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) - # and supports the following authentication types: + # The `create()` method requires either user or app authentication. Chat + # attributes the message sender differently depending on the type of + # authentication that you use in your request. # - # - For text messages, user authentication or app authentication are - # supported. - # - For card messages, only app authentication is supported. (Only Chat apps - # can create card messages.) + # The following image shows how Chat attributes a message when you use app + # authentication. Chat displays the Chat app as the message + # sender. The content of the message can contain text (`text`), cards + # (`cardsV2`), and accessory widgets (`accessoryWidgets`). + # + # ![Message sent with app + # authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) + # + # The following image shows how Chat attributes a message when you use user + # authentication. Chat displays the user as the message sender and attributes + # the Chat app to the message by displaying its name. The content of message + # can only contain text (`text`). + # + # ![Message sent with user + # authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) + # + # The maximum message size, including the message contents, is 32,000 bytes. rpc :CreateMessage, ::Google::Apps::Chat::V1::CreateMessageRequest, ::Google::Apps::Chat::V1::Message # Lists messages in a space that the caller is a member of, including - # messages from blocked members and spaces. For an example, see - # [List messages](/chat/api/guides/v1/messages/list). + # messages from blocked members and spaces. If you list messages from a + # space with no messages, the response is an empty object. When using a + # REST/HTTP interface, the response contains an empty JSON object, `{}`. + # For an example, see + # [List + # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). rpc :ListMessages, ::Google::Apps::Chat::V1::ListMessagesRequest, ::Google::Apps::Chat::V1::ListMessagesResponse @@ -187,14 +203,19 @@ class Service # and [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). rpc :GetSpace, ::Google::Apps::Chat::V1::GetSpaceRequest, ::Google::Apps::Chat::V1::Space - # Creates a named space. Spaces grouped by topics aren't supported. For an - # example, see [Create a + # Creates a space with no members. Can be used to create a named space. + # Spaces grouped by topics aren't supported. For an example, see + # [Create a # space](https://developers.google.com/workspace/chat/create-spaces). # # If you receive the error message `ALREADY_EXISTS` when creating # a space, try a different `displayName`. An existing space within # the Google Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), you can create a + # group chat in import mode using `spaceType.GROUP_CHAT`. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). rpc :CreateSpace, ::Google::Apps::Chat::V1::CreateSpaceRequest, ::Google::Apps::Chat::V1::Space @@ -298,40 +319,25 @@ class Service # or [app # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). rpc :FindDirectMessage, ::Google::Apps::Chat::V1::FindDirectMessageRequest, ::Google::Apps::Chat::V1::Space - # Creates a human membership or app membership for the calling app. Creating - # memberships for other apps isn't supported. For an example, see - # [Invite or add a user or a Google Chat app to a - # space](https://developers.google.com/workspace/chat/create-members). + # Creates a membership for the calling Chat app, a user, or a Google Group. + # Creating memberships for other Chat apps isn't supported. # When creating a membership, if the specified member has their auto-accept # policy turned off, then they're invited, and must accept the space # invitation before joining. Otherwise, creating a membership adds the member - # directly to the specified space. Requires [user + # directly to the specified space. + # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # - # To specify the member to add, set the `membership.member.name` for the - # human or app member, or set the `membership.group_member.name` for the - # group member. - # - # - To add the calling app to a space or a direct message between two human - # users, use `users/app`. Unable to add other - # apps to the space. - # - # - To add a human user, use `users/{user}`, where `{user}` can be the email - # address for the user. For users in the same Workspace organization `{user}` - # can also be the `id` for the person from the People API, or the `id` for - # the user in the Directory API. For example, if the People API Person - # profile ID for `user@example.com` is `123456789`, you can add the user to - # the space by setting the `membership.member.name` to - # `users/user@example.com` or `users/123456789`. - # - # - To add or invite a Google group in a named space, use - # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud - # Identity Groups API. For example, you can use [Cloud Identity Groups lookup - # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) - # to retrieve the ID `123456789` for group email `group@example.com`, then - # you can add or invite the group to a named space by setting the - # `membership.group_member.name` to `groups/123456789`. Group email is not - # supported, and Google groups can only be added as members in named spaces. + # For example usage, see: + # + # - [Invite or add a user to a + # space](https://developers.google.com/workspace/chat/create-members#create-user-membership). + # + # - [Invite or add a Google Group to a + # space](https://developers.google.com/workspace/chat/create-members#create-group-membership). + # + # - [Add the Chat app to a + # space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). rpc :CreateMembership, ::Google::Apps::Chat::V1::CreateMembershipRequest, ::Google::Apps::Chat::V1::Membership # Updates a membership. For an example, see [Update a user's membership in # a space](https://developers.google.com/workspace/chat/update-members). @@ -396,6 +402,9 @@ class Service # updated, the server returns the updated `Message` resource in the event # payload. # + # Note: The `permissionSettings` field is not returned in the Space + # object of the Space event data for this request. + # # Requires [user # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). # To get an event, the authenticated user must be a member of the space. diff --git a/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb index 1d7a38273047..25efd1bf5831 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/space_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n\x1agoogle/chat/v1/space.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/chat/v1/history_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x0b\n\x05Space\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x33\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceType\x12\x1f\n\x12single_user_bot_dm\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\x08threaded\x18\x05 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\"\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x03\xe0\x41\x05\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12\x39\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetails\x12\x39\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryState\x12\x18\n\x0bimport_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_active_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0f\x61\x64min_installed\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x10membership_count\x18\x14 \x01(\x0b\x32%.google.chat.v1.Space.MembershipCountB\x03\xe0\x41\x03\x12\x42\n\x0f\x61\x63\x63\x65ss_settings\x18\x17 \x01(\x0b\x32$.google.chat.v1.Space.AccessSettingsB\x03\xe0\x41\x01\x12\x16\n\tspace_uri\x18\x19 \x01(\tB\x03\xe0\x41\x03\x1a\x37\n\x0cSpaceDetails\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nguidelines\x18\x02 \x01(\t\x1aU\n\x0fMembershipCount\x12&\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x12\x1a\n\x12joined_group_count\x18\x05 \x01(\x05\x1a\xc0\x01\n\x0e\x41\x63\x63\x65ssSettings\x12K\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32\x30.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xe0\x41\x03\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x01\"J\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\x10\n\x0c\x44ISCOVERABLE\x10\x02\".\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x06\n\x02\x44M\x10\x02\"V\n\tSpaceType\x12\x1a\n\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nGROUP_CHAT\x10\x02\x12\x12\n\x0e\x44IRECT_MESSAGE\x10\x03\"\x82\x01\n\x13SpaceThreadingState\x12%\n!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\n\x11THREADED_MESSAGES\x10\x02\x12\x14\n\x10GROUPED_MESSAGES\x10\x03\x12\x17\n\x13UNTHREADED_MESSAGES\x10\x04:.\xea\x41+\n\x19\x63hat.googleapis.com/Space\x12\x0espaces/{space}\"X\n\x12\x43reateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Y\n\x11ListSpacesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"T\n\x12ListSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x18\n\x10use_admin_access\x18\x02 \x01(\x08\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x8a\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x18\n\x10use_admin_access\x18\x03 \x01(\x08\"\x81\x01\n\x13SearchSpacesRequest\x12\x18\n\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x12\n\x05query\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"j\n\x14SearchSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"_\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x18\n\x10use_admin_access\x18\x02 \x01(\x08\"M\n\x1a\x43ompleteImportSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\"C\n\x1b\x43ompleteImportSpaceResponse\x12$\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\xa3\x01\n\x12\x63om.google.chat.v1B\nSpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" +descriptor_data = "\n\x1agoogle/chat/v1/space.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\"google/chat/v1/history_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb4\x14\n\x05Space\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x33\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceType\x12\x1f\n\x12single_user_bot_dm\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\x08threaded\x18\x05 \x01(\x08\x42\x05\x18\x01\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\"\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x03\xe0\x41\x05\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12\x39\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetails\x12\x39\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryState\x12\x18\n\x0bimport_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_active_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0f\x61\x64min_installed\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x44\n\x10membership_count\x18\x14 \x01(\x0b\x32%.google.chat.v1.Space.MembershipCountB\x03\xe0\x41\x03\x12\x42\n\x0f\x61\x63\x63\x65ss_settings\x18\x17 \x01(\x0b\x32$.google.chat.v1.Space.AccessSettingsB\x03\xe0\x41\x01\x12\x16\n\tspace_uri\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x1epredefined_permission_settings\x18\x1a \x01(\x0e\x32\x32.google.chat.v1.Space.PredefinedPermissionSettingsB\x06\xe0\x41\x04\xe0\x41\x01H\x00\x12L\n\x13permission_settings\x18\x1b \x01(\x0b\x32(.google.chat.v1.Space.PermissionSettingsB\x03\xe0\x41\x01H\x00\x1a\x37\n\x0cSpaceDetails\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nguidelines\x18\x02 \x01(\t\x1aU\n\x0fMembershipCount\x12&\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x12\x1a\n\x12joined_group_count\x18\x05 \x01(\x05\x1a\xc0\x01\n\x0e\x41\x63\x63\x65ssSettings\x12K\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32\x30.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xe0\x41\x03\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x01\"J\n\x0b\x41\x63\x63\x65ssState\x12\x1c\n\x18\x41\x43\x43\x45SS_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\x10\n\x0c\x44ISCOVERABLE\x10\x02\x1a\x85\x06\n\x12PermissionSettings\x12O\n\x19manage_members_and_groups\x18\x01 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x00\x88\x01\x01\x12J\n\x14modify_space_details\x18\x02 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x01\x88\x01\x01\x12\x44\n\x0etoggle_history\x18\x03 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x02\x88\x01\x01\x12H\n\x12use_at_mention_all\x18\x04 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x03\x88\x01\x01\x12\x41\n\x0bmanage_apps\x18\x05 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x04\x88\x01\x01\x12\x45\n\x0fmanage_webhooks\x18\x06 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x05\x88\x01\x01\x12H\n\rpost_messages\x18\x07 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x44\n\x0ereply_messages\x18\x08 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingH\x07\x88\x01\x01\x42\x1c\n\x1a_manage_members_and_groupsB\x17\n\x15_modify_space_detailsB\x11\n\x0f_toggle_historyB\x15\n\x13_use_at_mention_allB\x0e\n\x0c_manage_appsB\x12\n\x10_manage_webhooksB\x10\n\x0e_post_messagesB\x11\n\x0f_reply_messages\x1a\x46\n\x11PermissionSetting\x12\x18\n\x10managers_allowed\x18\x01 \x01(\x08\x12\x17\n\x0fmembers_allowed\x18\x02 \x01(\x08\".\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04ROOM\x10\x01\x12\x06\n\x02\x44M\x10\x02\"V\n\tSpaceType\x12\x1a\n\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nGROUP_CHAT\x10\x02\x12\x12\n\x0e\x44IRECT_MESSAGE\x10\x03\"\x82\x01\n\x13SpaceThreadingState\x12%\n!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\n\x11THREADED_MESSAGES\x10\x02\x12\x14\n\x10GROUPED_MESSAGES\x10\x03\x12\x17\n\x13UNTHREADED_MESSAGES\x10\x04\"\x7f\n\x1cPredefinedPermissionSettings\x12.\n*PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13\x43OLLABORATION_SPACE\x10\x01\x12\x16\n\x12\x41NNOUNCEMENT_SPACE\x10\x02:.\xea\x41+\n\x19\x63hat.googleapis.com/Space\x12\x0espaces/{space}B\x1b\n\x19space_permission_settings\"X\n\x12\x43reateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Y\n\x11ListSpacesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"T\n\x12ListSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x18\n\x10use_admin_access\x18\x02 \x01(\x08\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x8a\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x18\n\x10use_admin_access\x18\x03 \x01(\x08\"\x81\x01\n\x13SearchSpacesRequest\x12\x18\n\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x12\n\x05query\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"j\n\x14SearchSpacesResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"_\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x18\n\x10use_admin_access\x18\x02 \x01(\x08\"M\n\x1a\x43ompleteImportSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\"C\n\x1b\x43ompleteImportSpaceResponse\x12$\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\xa3\x01\n\x12\x63om.google.chat.v1B\nSpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -48,9 +48,12 @@ module V1 Space::MembershipCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.MembershipCount").msgclass Space::AccessSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.AccessSettings").msgclass Space::AccessSettings::AccessState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.AccessSettings.AccessState").enummodule + Space::PermissionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.PermissionSettings").msgclass + Space::PermissionSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.PermissionSetting").msgclass Space::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.Type").enummodule Space::SpaceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.SpaceType").enummodule Space::SpaceThreadingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.SpaceThreadingState").enummodule + Space::PredefinedPermissionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Space.PredefinedPermissionSettings").enummodule CreateSpaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CreateSpaceRequest").msgclass ListSpacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.ListSpacesRequest").msgclass ListSpacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.ListSpacesResponse").msgclass diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb index 7121db192b64..04cb42f917ab 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/message.rb @@ -73,8 +73,8 @@ module V1 # user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), # or everyone in the space. # - # To learn about creating text messages, see [Send a text - # message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). + # To learn about creating text messages, see [Send a + # message](https://developers.google.com/workspace/chat/create-messages). # @!attribute [r] formatted_text # @return [::String] # Output only. Contains the message `text` with markups added to communicate @@ -118,8 +118,8 @@ module V1 # user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), # the messages can't contain cards. # - # To learn about cards and how to create them, see [Send card - # messages](https://developers.google.com/workspace/chat/create-messages#create). + # To learn how to create a message that contains cards, see [Send a + # message](https://developers.google.com/workspace/chat/create-messages). # # [Card builder](https://addons.gsuite.google.com/uikit/builder) # @!attribute [r] annotations @@ -183,16 +183,17 @@ module V1 # @return [::Google::Apps::Chat::V1::User] # Immutable. Input for creating a message, otherwise output only. The user # that can view the message. When set, the message is private and only - # visible to the specified user and the Chat app. Link previews and - # attachments aren't supported for private messages. + # visible to the specified user and the Chat app. To include this field in + # your request, you must call the Chat API using [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + # and omit the following: # - # Only Chat apps can send private messages. If your Chat app [authenticates - # as a - # user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - # to send a message, the message can't be private and must omit this field. + # * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + # * [Accessory + # widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) # - # For details, see [Send private messages to Google Chat - # users](https://developers.google.com/workspace/chat/private-messages). + # For details, see [Send a message + # privately](https://developers.google.com/workspace/chat/create-messages#private). # @!attribute [r] deletion_metadata # @return [::Google::Apps::Chat::V1::DeletionMetadata] # Output only. Information about a deleted message. A message is deleted when @@ -253,7 +254,7 @@ class QuotedMessageMetadata # field to determine what happens if no matching thread is found. # @!attribute [rw] name # @return [::String] - # Output only. Resource name of the thread. + # Resource name of the thread. # # Example: `spaces/{space}/threads/{thread}` # @!attribute [rw] thread_key diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb index 1ce7be207d68..1aac451ac380 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/space.rb @@ -28,6 +28,13 @@ module V1 # 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`. # @!attribute [r] type # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Apps::Chat::V1::Space::Type] @@ -49,11 +56,11 @@ module V1 # @!attribute [rw] display_name # @return [::String] # The space's display name. Required when [creating a - # space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). - # 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. + # 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. # @@ -68,15 +75,6 @@ module V1 # account). By default, a space created by a consumer account permits any # Google Chat user. # - # * The space is used to [import data to Google Chat] - # (https://developers.google.com/chat/api/guides/import-data-overview) - # because import mode spaces must only permit members from the same - # Google Workspace organization. However, as part of the [Google - # Workspace Developer Preview - # Program](https://developers.google.com/workspace/preview), import mode - # spaces can permit any Google Chat user so this field can then be set - # for import mode spaces. - # # For existing spaces, this field is output only. # @!attribute [r] space_threading_state # @return [::Google::Apps::Chat::V1::Space::SpaceThreadingState] @@ -126,6 +124,17 @@ module V1 # @!attribute [r] space_uri # @return [::String] # Output only. The URI for a user to access the space. + # @!attribute [rw] predefined_permission_settings + # @return [::Google::Apps::Chat::V1::Space::PredefinedPermissionSettings] + # Optional. Input only. Predefined space permission settings, input only + # when creating a space. If the field is not set, a collaboration space is + # created. After you create the space, settings are populated in the + # `PermissionSettings` field. + # @!attribute [rw] permission_settings + # @return [::Google::Apps::Chat::V1::Space::PermissionSettings] + # Optional. Space permission settings for existing spaces. Input for + # updating exact space permission settings, where existing permission + # settings are replaced. Output lists current permission settings. class Space include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -169,14 +178,19 @@ class MembershipCount # @return [::String] # Optional. The resource name of the [target # audience](https://support.google.com/a/answer/9934697) who can discover - # the space, join the space, and preview the messages in the space. For - # details, see [Make a space discoverable to a target + # the space, join the space, and preview the messages in the space. If + # unset, only users or Google Groups who have been individually invited or + # added to the space can access it. For details, see [Make a space + # discoverable to a target # audience](https://developers.google.com/workspace/chat/space-target-audience). # # Format: `audiences/{audience}` # # To use the default target audience for the Google Workspace organization, # set to `audiences/default`. + # + # This field is not populated when using the `chat.bot` scope with [app + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). class AccessSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -186,16 +200,66 @@ module AccessState # Access state is unknown or not supported in this API. ACCESS_STATE_UNSPECIFIED = 0 - # Space is discoverable by added or invited members or groups. + # Only users or Google Groups that have been individually added or + # invited by other users or Google Workspace administrators can discover + # and access the space. PRIVATE = 1 - # Space is discoverable by the selected [target - # audience](https://support.google.com/a/answer/9934697), as well as - # added or invited members or groups. + # A space manager has granted a target audience access to + # the space. Users or Google Groups that have been individually added or + # invited to the space can also discover and access the space. To learn + # more, see [Make a space discoverable to specific + # users](https://developers.google.com/workspace/chat/space-target-audience). DISCOVERABLE = 2 end end + # [Permission settings](https://support.google.com/chat/answer/13340792) + # that you can specify when updating an existing named space. + # + # To set permission settings when creating a space, specify the + # `PredefinedPermissionSettings` field in your request. + # @!attribute [rw] manage_members_and_groups + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for managing members and groups in a space. + # @!attribute [rw] modify_space_details + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for updating space name, avatar, description and guidelines. + # @!attribute [rw] toggle_history + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for toggling space history on and off. + # @!attribute [rw] use_at_mention_all + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for using @all in a space. + # @!attribute [rw] manage_apps + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for managing apps in a space. + # @!attribute [rw] manage_webhooks + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for managing webhooks in a space. + # @!attribute [r] post_messages + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Output only. Setting for posting messages in a space. + # @!attribute [rw] reply_messages + # @return [::Google::Apps::Chat::V1::Space::PermissionSetting] + # Setting for replying to messages in a space. + class PermissionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a space permission setting. + # @!attribute [rw] managers_allowed + # @return [::Boolean] + # Whether spaces managers have this permission. + # @!attribute [rw] members_allowed + # @return [::Boolean] + # Whether non-manager members have this permission. + class PermissionSetting + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Deprecated: Use `SpaceType` instead. module Type # Reserved. @@ -245,18 +309,39 @@ module SpaceThreadingState # 3 or more people. UNTHREADED_MESSAGES = 4 end + + # Predefined permission settings that you can only specify when creating a + # named space. More settings might be added in the future. + # For details about permission settings for named spaces, see [Learn about + # spaces](https://support.google.com/chat/answer/7659784). + module PredefinedPermissionSettings + # Unspecified. Don't use. + PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0 + + # Setting to make the space a collaboration space where all members can + # post messages. + COLLABORATION_SPACE = 1 + + # Setting to make the space an announcement space where only space managers + # can post messages. + ANNOUNCEMENT_SPACE = 2 + end end - # A request to create a named space. + # A request to create a named space with no members. # @!attribute [rw] space # @return [::Google::Apps::Chat::V1::Space] # Required. The `displayName` and `spaceType` fields must be populated. Only # `SpaceType.SPACE` is supported. # - # If you receive the error message `ALREADY_EXISTS` when creating a space, + # If you receive the error message `ALREADY_EXISTS`, # try a different `displayName`. An existing space within the Google # Workspace organization might already use this display name. # + # If you're a member of the [Developer Preview + # program](https://developers.google.com/workspace/preview), + # `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + # # The space `name` is assigned on the server so anything specified in this # field will be ignored. # @!attribute [rw] request_id @@ -321,6 +406,8 @@ class ListSpacesRequest # @!attribute [rw] spaces # @return [::Array<::Google::Apps::Chat::V1::Space>] # List of spaces in the requested (or first) page. + # Note: The `permissionSettings` field is not returned in the Space + # object for list requests. # @!attribute [rw] next_page_token # @return [::String] # You can send a token as `pageToken` to retrieve the next page of @@ -384,54 +471,64 @@ class FindDirectMessageRequest # Required. The updated field paths, comma separated if there are # multiple. # - # Currently supported field paths: + # You can update the following fields for a space: # - # - `display_name` (Only supports changing the display name of a space with - # the `SPACE` type, or when also including the `space_type` mask to change a - # `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a - # `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument - # error. If you receive the error message `ALREADY_EXISTS` when updating the - # `displayName`, try a different `displayName`. An existing space within the - # Google Workspace organization might already use this display name.) + # `space_details`: Updates the space's description. Supports up to 150 + # characters. # - # - `space_type` (Only supports changing a `GROUP_CHAT` space type to + # `display_name`: Only supports updating the display name for spaces where + # `spaceType` field is `SPACE`. + # If you receive the error message `ALREADY_EXISTS`, try a different + # value. An existing space within the + # Google Workspace organization might already use this display name. + # + # `space_type`: Only supports changing a `GROUP_CHAT` space type to # `SPACE`. Include `display_name` together # with `space_type` in the update mask and ensure that the specified space # has a non-empty display name and the `SPACE` space type. Including the # `space_type` mask and the `SPACE` type in the specified space when updating # the display name is optional if the existing space already has the `SPACE` # type. Trying to update the space type in other ways results in an invalid - # argument error). - # `space_type` is not supported with admin access. - # - # - `space_details` + # argument error. + # `space_type` is not supported with `useAdminAccess`. # - # - `space_history_state` (Supports [turning history on or off for the - # space](https://support.google.com/chat/answer/7664687) if [the organization - # allows users to change their history - # setting](https://support.google.com/a/answer/7664184). - # Warning: mutually exclusive with all other field paths.) - # `space_history_state` is not supported with admin access. + # `space_history_state`: Updates [space history + # settings](https://support.google.com/chat/answer/7664687) by turning + # history on or off for the space. Only supported if history settings are + # enabled for the Google Workspace organization. To update the + # space history state, you must omit all other field masks in your request. + # `space_history_state` is not supported with `useAdminAccess`. # - # - `access_settings.audience` (Supports changing the [access + # `access_settings.audience`: Updates the [access # setting](https://support.google.com/chat/answer/11971020) of who can - # discover the space, join the space, and preview the messages in space. If - # no audience is specified in the access setting, the space's access setting - # is updated to private. Warning: mutually exclusive with all other field - # paths.) - # `access_settings.audience` is not supported with admin access. - # - # - Developer Preview: Supports changing the [permission - # settings](https://support.google.com/chat/answer/13340792) of a space, - # supported field paths - # include: `permission_settings.manage_members_and_groups`, - # `permission_settings.modify_space_details`, - # `permission_settings.toggle_history`, - # `permission_settings.use_at_mention_all`, - # `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, - # `permission_settings.reply_messages` - # (Warning: mutually exclusive with all other non-permission settings field - # paths). `permission_settings` is not supported with admin access. + # discover the space, join the space, and preview the messages in named space + # where `spaceType` field is `SPACE`. If the existing space has a + # target audience, you can remove the audience and restrict space access by + # omitting a value for this field mask. To update access settings for a + # space, the authenticating user must be a space manager and omit all other + # field masks in your request. You can't update this field if the space is in + # [import + # mode](https://developers.google.com/workspace/chat/import-data-overview). + # To learn more, see [Make a space discoverable to specific + # users](https://developers.google.com/workspace/chat/space-target-audience). + # `access_settings.audience` is not supported with `useAdminAccess`. + # + # `permission_settings`: Supports changing the + # [permission settings](https://support.google.com/chat/answer/13340792) + # of a space. + # When updating permission settings, you can only specify + # `permissionSettings` field masks; you cannot update other field masks + # at the same time. `permissionSettings` is not supported with + # `useAdminAccess`. + # The supported field masks include: + # + # - `permission_settings.manageMembersAndGroups` + # - `permission_settings.modifySpaceDetails` + # - `permission_settings.toggleHistory` + # - `permission_settings.useAtMentionAll` + # - `permission_settings.manageApps` + # - `permission_settings.manageWebhooks` + # - `permission_settings.replyMessages` # @!attribute [rw] use_admin_access # @return [::Boolean] # When `true`, the method runs using the user's Google Workspace diff --git a/google-apps-chat-v1/proto_docs/google/chat/v1/space_event.rb b/google-apps-chat-v1/proto_docs/google/chat/v1/space_event.rb index 7df0d6798469..14acc3350d7c 100644 --- a/google-apps-chat-v1/proto_docs/google/chat/v1/space_event.rb +++ b/google-apps-chat-v1/proto_docs/google/chat/v1/space_event.rb @@ -271,6 +271,8 @@ class ListSpaceEventsRequest # @!attribute [rw] space_events # @return [::Array<::Google::Apps::Chat::V1::SpaceEvent>] # Results are returned in chronological order (oldest event first). + # Note: The `permissionSettings` field is not returned in the Space + # object for list requests. # @!attribute [rw] next_page_token # @return [::String] # Continuation token used to fetch more events.