diff --git a/google-apps-chat-v1/.owlbot-manifest.json b/google-apps-chat-v1/.owlbot-manifest.json index e5f7fe1f2d3f..6b749df9be9f 100644 --- a/google-apps-chat-v1/.owlbot-manifest.json +++ b/google-apps-chat-v1/.owlbot-manifest.json @@ -99,6 +99,7 @@ "snippets/chat_service/delete_section.rb", "snippets/chat_service/delete_space.rb", "snippets/chat_service/find_direct_message.rb", + "snippets/chat_service/find_group_chats.rb", "snippets/chat_service/get_attachment.rb", "snippets/chat_service/get_custom_emoji.rb", "snippets/chat_service/get_membership.rb", diff --git a/google-apps-chat-v1/gapic_metadata.json b/google-apps-chat-v1/gapic_metadata.json index 21f5a6233a8b..d87e86a2906f 100644 --- a/google-apps-chat-v1/gapic_metadata.json +++ b/google-apps-chat-v1/gapic_metadata.json @@ -100,6 +100,11 @@ "find_direct_message" ] }, + "FindGroupChats": { + "methods": [ + "find_group_chats" + ] + }, "CreateMembership": { "methods": [ "create_membership" 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 54c3d4709ed3..d90d1730e561 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 @@ -161,6 +161,11 @@ def self.configure initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } + default_config.rpcs.find_group_chats.timeout = 30.0 + default_config.rpcs.find_group_chats.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + default_config.rpcs.create_membership.timeout = 30.0 default_config.rpcs.create_membership.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] @@ -3011,6 +3016,147 @@ def find_direct_message request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Returns all spaces with `spaceType == GROUP_CHAT`, whose + # human memberships contain exactly the calling user, and the users specified + # in `FindGroupChatsRequest.users`. Only members that have joined the + # conversation are supported. For an example, see [Find group + # chats](https://developers.google.com/workspace/chat/find-group-chats). + # + # If the calling user blocks, or is blocked by, some users, and no spaces + # with the entire specified set of users are found, this method returns + # spaces that don't include the blocked or blocking users. + # + # The specified set of users must contain only human (non-app) memberships. + # A request that contains non-human users doesn't return any spaces. + # + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # + # @overload find_group_chats(request, options = nil) + # Pass arguments to `find_group_chats` via a request object, either of type + # {::Google::Apps::Chat::V1::FindGroupChatsRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Chat::V1::FindGroupChatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload find_group_chats(users: nil, page_size: nil, page_token: nil, space_view: nil) + # Pass arguments to `find_group_chats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param users [::Array<::String>] + # Optional. Resource names of all human users in group chat with the calling + # user. Chat apps can't be included in the request. + # + # The maximum number of users that can be specified in a single request is + # `49`. + # + # Format: `users/{user}`, where `{user}` is either the `id` for the + # [person](https://developers.google.com/people/api/rest/v1/people) from the + # People API, or the `id` for the + # [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + # in the Directory API. For example, to find all group chats with the calling + # user and two other users, with People API profile IDs `123456789` and + # `987654321`, you can use `users/123456789` and `users/987654321`. + # You can also use the email as an alias for `{user}`. For example, + # `users/example@gmail.com` where `example@gmail.com` is the email of the + # Google Chat user. + # @param page_size [::Integer] + # Optional. The maximum number of spaces to return. The service might return + # fewer than this value. + # + # If unspecified, at most 10 spaces are returned. + # + # The maximum value is 30. If you use a value more than 30, it's + # automatically changed to 30. + # + # Negative values return an `INVALID_ARGUMENT` error. + # @param page_token [::String] + # Optional. A page token, received from a previous call to find group chats. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, all other parameters provided should match the call that + # provided the token. Passing different values may lead to unexpected + # results. + # @param space_view [::Google::Apps::Chat::V1::SpaceView] + # Requested space view type. If unset, defaults to + # `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify + # `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data, + # for example, + # https://www.googleapis.com/auth/chat.spaces or + # https://www.googleapis.com/auth/chat.spaces.readonly. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Space>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Space>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/apps/chat/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Chat::V1::ChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Chat::V1::FindGroupChatsRequest.new + # + # # Call the find_group_chats method. + # result = client.find_group_chats request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Apps::Chat::V1::Space. + # p item + # end + # + def find_group_chats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::FindGroupChatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.find_group_chats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Apps::Chat::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.find_group_chats.timeout, + metadata: metadata, + retry_policy: @config.rpcs.find_group_chats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @chat_service_stub.call_rpc :find_group_chats, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @chat_service_stub, :find_group_chats, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Creates a membership for the calling Chat app, a user, or a Google Group. # Creating memberships for other Chat apps isn't supported. @@ -6179,6 +6325,11 @@ class Rpcs # attr_reader :find_direct_message ## + # RPC-specific configuration for `find_group_chats` + # @return [::Gapic::Config::Method] + # + attr_reader :find_group_chats + ## # RPC-specific configuration for `create_membership` # @return [::Gapic::Config::Method] # @@ -6337,6 +6488,8 @@ def initialize parent_rpcs = nil @complete_import_space = ::Gapic::Config::Method.new complete_import_space_config find_direct_message_config = parent_rpcs.find_direct_message if parent_rpcs.respond_to? :find_direct_message @find_direct_message = ::Gapic::Config::Method.new find_direct_message_config + find_group_chats_config = parent_rpcs.find_group_chats if parent_rpcs.respond_to? :find_group_chats + @find_group_chats = ::Gapic::Config::Method.new find_group_chats_config create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership @create_membership = ::Gapic::Config::Method.new create_membership_config update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership 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 2802f3ed1b52..d5b6c9a5b1c9 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 @@ -163,6 +163,11 @@ def self.configure initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } + default_config.rpcs.find_group_chats.timeout = 30.0 + default_config.rpcs.find_group_chats.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + default_config.rpcs.create_membership.timeout = 30.0 default_config.rpcs.create_membership.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] @@ -2918,6 +2923,148 @@ def find_direct_message request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Returns all spaces with `spaceType == GROUP_CHAT`, whose + # human memberships contain exactly the calling user, and the users specified + # in `FindGroupChatsRequest.users`. Only members that have joined the + # conversation are supported. For an example, see [Find group + # chats](https://developers.google.com/workspace/chat/find-group-chats). + # + # If the calling user blocks, or is blocked by, some users, and no spaces + # with the entire specified set of users are found, this method returns + # spaces that don't include the blocked or blocking users. + # + # The specified set of users must contain only human (non-app) memberships. + # A request that contains non-human users doesn't return any spaces. + # + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + # + # @overload find_group_chats(request, options = nil) + # Pass arguments to `find_group_chats` via a request object, either of type + # {::Google::Apps::Chat::V1::FindGroupChatsRequest} or an equivalent Hash. + # + # @param request [::Google::Apps::Chat::V1::FindGroupChatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload find_group_chats(users: nil, page_size: nil, page_token: nil, space_view: nil) + # Pass arguments to `find_group_chats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param users [::Array<::String>] + # Optional. Resource names of all human users in group chat with the calling + # user. Chat apps can't be included in the request. + # + # The maximum number of users that can be specified in a single request is + # `49`. + # + # Format: `users/{user}`, where `{user}` is either the `id` for the + # [person](https://developers.google.com/people/api/rest/v1/people) from the + # People API, or the `id` for the + # [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + # in the Directory API. For example, to find all group chats with the calling + # user and two other users, with People API profile IDs `123456789` and + # `987654321`, you can use `users/123456789` and `users/987654321`. + # You can also use the email as an alias for `{user}`. For example, + # `users/example@gmail.com` where `example@gmail.com` is the email of the + # Google Chat user. + # @param page_size [::Integer] + # Optional. The maximum number of spaces to return. The service might return + # fewer than this value. + # + # If unspecified, at most 10 spaces are returned. + # + # The maximum value is 30. If you use a value more than 30, it's + # automatically changed to 30. + # + # Negative values return an `INVALID_ARGUMENT` error. + # @param page_token [::String] + # Optional. A page token, received from a previous call to find group chats. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, all other parameters provided should match the call that + # provided the token. Passing different values may lead to unexpected + # results. + # @param space_view [::Google::Apps::Chat::V1::SpaceView] + # Requested space view type. If unset, defaults to + # `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify + # `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data, + # for example, + # https://www.googleapis.com/auth/chat.spaces or + # https://www.googleapis.com/auth/chat.spaces.readonly. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Space>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Space>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/apps/chat/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Apps::Chat::V1::ChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Apps::Chat::V1::FindGroupChatsRequest.new + # + # # Call the find_group_chats method. + # result = client.find_group_chats request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Apps::Chat::V1::Space. + # p item + # end + # + def find_group_chats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::FindGroupChatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.find_group_chats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Apps::Chat::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.find_group_chats.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.find_group_chats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @chat_service_stub.find_group_chats request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @chat_service_stub, :find_group_chats, "spaces", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Creates a membership for the calling Chat app, a user, or a Google Group. # Creating memberships for other Chat apps isn't supported. @@ -5897,6 +6044,11 @@ class Rpcs # attr_reader :find_direct_message ## + # RPC-specific configuration for `find_group_chats` + # @return [::Gapic::Config::Method] + # + attr_reader :find_group_chats + ## # RPC-specific configuration for `create_membership` # @return [::Gapic::Config::Method] # @@ -6055,6 +6207,8 @@ def initialize parent_rpcs = nil @complete_import_space = ::Gapic::Config::Method.new complete_import_space_config find_direct_message_config = parent_rpcs.find_direct_message if parent_rpcs.respond_to? :find_direct_message @find_direct_message = ::Gapic::Config::Method.new find_direct_message_config + find_group_chats_config = parent_rpcs.find_group_chats if parent_rpcs.respond_to? :find_group_chats + @find_group_chats = ::Gapic::Config::Method.new find_group_chats_config create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership @create_membership = ::Gapic::Config::Method.new create_membership_config update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership diff --git a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb index bc9d099604ae..959013011914 100644 --- a/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +++ b/google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb @@ -793,6 +793,46 @@ def find_direct_message request_pb, options = nil end end + ## + # Baseline implementation for the find_group_chats REST call + # + # @param request_pb [::Google::Apps::Chat::V1::FindGroupChatsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Apps::Chat::V1::FindGroupChatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Apps::Chat::V1::FindGroupChatsResponse] + # A result object deserialized from the server's reply + def find_group_chats request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_find_group_chats_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "find_group_chats", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Apps::Chat::V1::FindGroupChatsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the create_membership REST call # @@ -2136,6 +2176,25 @@ def self.transcode_find_direct_message_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the find_group_chats REST call + # + # @param request_pb [::Google::Apps::Chat::V1::FindGroupChatsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_find_group_chats_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/spaces:findGroupChats", + matches: [] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb b/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb index ce9391d040f0..7670924d5cb7 100644 --- a/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb +++ b/google-apps-chat-v1/lib/google/chat/v1/chat_service_pb.rb @@ -20,7 +20,7 @@ require 'google/protobuf/empty_pb' -descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1cgoogle/chat/v1/section.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\xcc?\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x12\x8f\x01\n\rCreateSection\x12$.google.chat.v1.CreateSectionRequest\x1a\x17.google.chat.v1.Section\"?\xda\x41\x0eparent,section\x82\xd3\xe4\x93\x02(\"\x1d/v1/{parent=users/*}/sections:\x07section\x12{\n\rDeleteSection\x12$.google.chat.v1.DeleteSectionRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=users/*/sections/*}\x12\x9c\x01\n\rUpdateSection\x12$.google.chat.v1.UpdateSectionRequest\x1a\x17.google.chat.v1.Section\"L\xda\x41\x13section,update_mask\x82\xd3\xe4\x93\x02\x30\x32%/v1/{section.name=users/*/sections/*}:\x07section\x12\x89\x01\n\x0cListSections\x12#.google.chat.v1.ListSectionsRequest\x1a$.google.chat.v1.ListSectionsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=users/*}/sections\x12\x95\x01\n\x0fPositionSection\x12&.google.chat.v1.PositionSectionRequest\x1a\'.google.chat.v1.PositionSectionResponse\"1\x82\xd3\xe4\x93\x02+\"&/v1/{name=users/*/sections/*}:position:\x01*\x12\x9d\x01\n\x10ListSectionItems\x12\'.google.chat.v1.ListSectionItemsRequest\x1a(.google.chat.v1.ListSectionItemsResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=users/*/sections/*}/items\x12\xaf\x01\n\x0fMoveSectionItem\x12&.google.chat.v1.MoveSectionItemRequest\x1a\'.google.chat.v1.MoveSectionItemResponse\"K\xda\x41\x13name,target_section\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/sections/*/items/*}:move:\x01*\x1a\xbe\x0e\xca\x41\x13\x63hat.googleapis.com\xd2\x41\xa4\x0ehttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\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!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1cgoogle/chat/v1/section.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\xd1@\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x82\x01\n\x0e\x46indGroupChats\x12%.google.chat.v1.FindGroupChatsRequest\x1a&.google.chat.v1.FindGroupChatsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/spaces:findGroupChats\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x12\x8f\x01\n\rCreateSection\x12$.google.chat.v1.CreateSectionRequest\x1a\x17.google.chat.v1.Section\"?\xda\x41\x0eparent,section\x82\xd3\xe4\x93\x02(\"\x1d/v1/{parent=users/*}/sections:\x07section\x12{\n\rDeleteSection\x12$.google.chat.v1.DeleteSectionRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=users/*/sections/*}\x12\x9c\x01\n\rUpdateSection\x12$.google.chat.v1.UpdateSectionRequest\x1a\x17.google.chat.v1.Section\"L\xda\x41\x13section,update_mask\x82\xd3\xe4\x93\x02\x30\x32%/v1/{section.name=users/*/sections/*}:\x07section\x12\x89\x01\n\x0cListSections\x12#.google.chat.v1.ListSectionsRequest\x1a$.google.chat.v1.ListSectionsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=users/*}/sections\x12\x95\x01\n\x0fPositionSection\x12&.google.chat.v1.PositionSectionRequest\x1a\'.google.chat.v1.PositionSectionResponse\"1\x82\xd3\xe4\x93\x02+\"&/v1/{name=users/*/sections/*}:position:\x01*\x12\x9d\x01\n\x10ListSectionItems\x12\'.google.chat.v1.ListSectionItemsRequest\x1a(.google.chat.v1.ListSectionItemsResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=users/*/sections/*}/items\x12\xaf\x01\n\x0fMoveSectionItem\x12&.google.chat.v1.MoveSectionItemRequest\x1a\'.google.chat.v1.MoveSectionItemResponse\"K\xda\x41\x13name,target_section\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/sections/*/items/*}:move:\x01*\x1a\xbe\x0e\xca\x41\x13\x63hat.googleapis.com\xd2\x41\xa4\x0ehttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\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 pool.add_serialized_file(descriptor_data) 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 b0e84d461cb6..3615fac13faa 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 @@ -553,6 +553,27 @@ class Service # - `https://www.googleapis.com/auth/chat.spaces.readonly` # - `https://www.googleapis.com/auth/chat.spaces` rpc :FindDirectMessage, ::Google::Apps::Chat::V1::FindDirectMessageRequest, ::Google::Apps::Chat::V1::Space + # Returns all spaces with `spaceType == GROUP_CHAT`, whose + # human memberships contain exactly the calling user, and the users specified + # in `FindGroupChatsRequest.users`. Only members that have joined the + # conversation are supported. For an example, see [Find group + # chats](https://developers.google.com/workspace/chat/find-group-chats). + # + # If the calling user blocks, or is blocked by, some users, and no spaces + # with the entire specified set of users are found, this method returns + # spaces that don't include the blocked or blocking users. + # + # The specified set of users must contain only human (non-app) memberships. + # A request that contains non-human users doesn't return any spaces. + # + # Requires [user + # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + # with one of the following [authorization + # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + # + # - `https://www.googleapis.com/auth/chat.memberships.readonly` + # - `https://www.googleapis.com/auth/chat.memberships` + rpc :FindGroupChats, ::Google::Apps::Chat::V1::FindGroupChatsRequest, ::Google::Apps::Chat::V1::FindGroupChatsResponse # 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 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 b367ea8d106a..7c949866ae56 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\"\xcd\x16\n\x05Space\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceTypeB\x03\xe0\x41\x01\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\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12>\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetailsB\x03\xe0\x41\x01\x12>\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryStateB\x03\xe0\x41\x01\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\x1d\n\x08\x63ustomer\x18\x18 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01H\x01\x88\x01\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\x12@\n\x17import_mode_expire_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\x0cSpaceDetails\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nguidelines\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a_\n\x0fMembershipCount\x12+\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12joined_group_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\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\xa8\x06\n\x12PermissionSettings\x12T\n\x19manage_members_and_groups\x18\x01 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x14modify_space_details\x18\x02 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12I\n\x0etoggle_history\x18\x03 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12M\n\x12use_at_mention_all\x18\x04 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x46\n\x0bmanage_apps\x18\x05 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12J\n\x0fmanage_webhooks\x18\x06 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\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\x12I\n\x0ereply_messages\x18\x08 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\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\x9d\x01\n\x11PermissionSetting\x12\x1d\n\x10managers_allowed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1a\x61ssistant_managers_allowed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\x0fmembers_allowed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1d\n\x1b_assistant_managers_allowed\".\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_settingsB\x0b\n\t_customer\"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\"a\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1d\n\x10use_admin_access\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\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\"d\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"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\"\xcd\x16\n\x05Space\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12/\n\x04type\x18\x02 \x01(\x0e\x32\x1a.google.chat.v1.Space.TypeB\x05\x18\x01\xe0\x41\x03\x12\x38\n\nspace_type\x18\n \x01(\x0e\x32\x1f.google.chat.v1.Space.SpaceTypeB\x03\xe0\x41\x01\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\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12%\n\x15\x65xternal_user_allowed\x18\x08 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x12M\n\x15space_threading_state\x18\t \x01(\x0e\x32).google.chat.v1.Space.SpaceThreadingStateB\x03\xe0\x41\x03\x12>\n\rspace_details\x18\x0b \x01(\x0b\x32\".google.chat.v1.Space.SpaceDetailsB\x03\xe0\x41\x01\x12>\n\x13space_history_state\x18\r \x01(\x0e\x32\x1c.google.chat.v1.HistoryStateB\x03\xe0\x41\x01\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\x1d\n\x08\x63ustomer\x18\x18 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01H\x01\x88\x01\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\x12@\n\x17import_mode_expire_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x41\n\x0cSpaceDetails\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nguidelines\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a_\n\x0fMembershipCount\x12+\n\x1ejoined_direct_human_user_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1f\n\x12joined_group_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\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\xa8\x06\n\x12PermissionSettings\x12T\n\x19manage_members_and_groups\x18\x01 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x14modify_space_details\x18\x02 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12I\n\x0etoggle_history\x18\x03 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12M\n\x12use_at_mention_all\x18\x04 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x46\n\x0bmanage_apps\x18\x05 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12J\n\x0fmanage_webhooks\x18\x06 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\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\x12I\n\x0ereply_messages\x18\x08 \x01(\x0b\x32\'.google.chat.v1.Space.PermissionSettingB\x03\xe0\x41\x01H\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\x9d\x01\n\x11PermissionSetting\x12\x1d\n\x10managers_allowed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1a\x61ssistant_managers_allowed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\x0fmembers_allowed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x1d\n\x1b_assistant_managers_allowed\".\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_settingsB\x0b\n\t_customer\"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\"a\n\x0fGetSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"-\n\x18\x46indDirectMessageRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x8b\x01\n\x15\x46indGroupChatsRequest\x12\x12\n\x05users\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12-\n\nspace_view\x18\x04 \x01(\x0e\x32\x19.google.chat.v1.SpaceView\"X\n\x16\x46indGroupChatsResponse\x12%\n\x06spaces\x18\x01 \x03(\x0b\x32\x15.google.chat.v1.Space\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x94\x01\n\x12UpdateSpaceRequest\x12)\n\x05space\x18\x01 \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1d\n\x10use_admin_access\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\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\"d\n\x12\x44\x65leteSpaceRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1d\n\x10use_admin_access\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"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.Space*c\n\tSpaceView\x12\x1a\n\x16SPACE_VIEW_UNSPECIFIED\x10\x00\x12!\n\x1dSPACE_VIEW_RESOURCE_NAME_ONLY\x10\x03\x12\x17\n\x13SPACE_VIEW_EXPANDED\x10\x04\x42\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 pool.add_serialized_file(descriptor_data) @@ -36,12 +36,15 @@ module V1 ListSpacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.ListSpacesResponse").msgclass GetSpaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.GetSpaceRequest").msgclass FindDirectMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.FindDirectMessageRequest").msgclass + FindGroupChatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.FindGroupChatsRequest").msgclass + FindGroupChatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.FindGroupChatsResponse").msgclass UpdateSpaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.UpdateSpaceRequest").msgclass SearchSpacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchSpacesRequest").msgclass SearchSpacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchSpacesResponse").msgclass DeleteSpaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.DeleteSpaceRequest").msgclass CompleteImportSpaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CompleteImportSpaceRequest").msgclass CompleteImportSpaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CompleteImportSpaceResponse").msgclass + SpaceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SpaceView").enummodule end end end 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 5def1fdb76ff..07e2237d81eb 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 @@ -539,6 +539,71 @@ class FindDirectMessageRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # A request to get group chat spaces based on user resources. + # @!attribute [rw] users + # @return [::Array<::String>] + # Optional. Resource names of all human users in group chat with the calling + # user. Chat apps can't be included in the request. + # + # The maximum number of users that can be specified in a single request is + # `49`. + # + # Format: `users/{user}`, where `{user}` is either the `id` for the + # [person](https://developers.google.com/people/api/rest/v1/people) from the + # People API, or the `id` for the + # [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + # in the Directory API. For example, to find all group chats with the calling + # user and two other users, with People API profile IDs `123456789` and + # `987654321`, you can use `users/123456789` and `users/987654321`. + # You can also use the email as an alias for `{user}`. For example, + # `users/example@gmail.com` where `example@gmail.com` is the email of the + # Google Chat user. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of spaces to return. The service might return + # fewer than this value. + # + # If unspecified, at most 10 spaces are returned. + # + # The maximum value is 30. If you use a value more than 30, it's + # automatically changed to 30. + # + # Negative values return an `INVALID_ARGUMENT` error. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous call to find group chats. + # Provide this parameter to retrieve the subsequent page. + # + # When paginating, all other parameters provided should match the call that + # provided the token. Passing different values may lead to unexpected + # results. + # @!attribute [rw] space_view + # @return [::Google::Apps::Chat::V1::SpaceView] + # Requested space view type. If unset, defaults to + # `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify + # `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data, + # for example, + # https://www.googleapis.com/auth/chat.spaces or + # https://www.googleapis.com/auth/chat.spaces.readonly. + class FindGroupChatsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response containing group chat spaces with exactly the calling user and the + # requested users. + # @!attribute [rw] spaces + # @return [::Array<::Google::Apps::Chat::V1::Space>] + # List of spaces in the requested (or first) page. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that you can send as `pageToken` to retrieve the next page of + # results. If empty, there are no subsequent pages. + class FindGroupChatsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A request to update a single space. # @!attribute [rw] space # @return [::Google::Apps::Chat::V1::Space] @@ -820,6 +885,27 @@ class CompleteImportSpaceResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # A view that specifies which fields should be populated on the + # [`Space`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + # resource. + # To ensure compatibility with future releases, we recommend that your code + # account for additional values. + module SpaceView + # The default / unset value. + SPACE_VIEW_UNSPECIFIED = 0 + + # Populates only the Space resource name. + SPACE_VIEW_RESOURCE_NAME_ONLY = 3 + + # Populates Space resource fields. Note: the `permissionSettings` field + # will not be populated. + # Requests that specify SPACE_VIEW_EXPANDED must include scopes that allow + # reading space data, for example, + # https://www.googleapis.com/auth/chat.spaces or + # https://www.googleapis.com/auth/chat.spaces.readonly. + SPACE_VIEW_EXPANDED = 4 + end end end end diff --git a/google-apps-chat-v1/snippets/chat_service/find_group_chats.rb b/google-apps-chat-v1/snippets/chat_service/find_group_chats.rb new file mode 100644 index 000000000000..1b40d6d14248 --- /dev/null +++ b/google-apps-chat-v1/snippets/chat_service/find_group_chats.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START chat_v1_generated_ChatService_FindGroupChats_sync] +require "google/apps/chat/v1" + +## +# Snippet for the find_group_chats call in the ChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Apps::Chat::V1::ChatService::Client#find_group_chats. +# +def find_group_chats + # Create a client object. The client can be reused for multiple calls. + client = Google::Apps::Chat::V1::ChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Apps::Chat::V1::FindGroupChatsRequest.new + + # Call the find_group_chats method. + result = client.find_group_chats request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Apps::Chat::V1::Space. + p item + end +end +# [END chat_v1_generated_ChatService_FindGroupChats_sync] diff --git a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json index 91600f32c021..006c2156d510 100644 --- a/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json +++ b/google-apps-chat-v1/snippets/snippet_metadata_google.chat.v1.json @@ -731,6 +731,46 @@ } ] }, + { + "region_tag": "chat_v1_generated_ChatService_FindGroupChats_sync", + "title": "Snippet for the find_group_chats call in the ChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Apps::Chat::V1::ChatService::Client#find_group_chats.", + "file": "chat_service/find_group_chats.rb", + "language": "RUBY", + "client_method": { + "short_name": "find_group_chats", + "full_name": "::Google::Apps::Chat::V1::ChatService::Client#find_group_chats", + "async": false, + "parameters": [ + { + "type": "::Google::Apps::Chat::V1::FindGroupChatsRequest", + "name": "request" + } + ], + "result_type": "::Google::Apps::Chat::V1::FindGroupChatsResponse", + "client": { + "short_name": "ChatService::Client", + "full_name": "::Google::Apps::Chat::V1::ChatService::Client" + }, + "method": { + "short_name": "FindGroupChats", + "full_name": "google.chat.v1.ChatService.FindGroupChats", + "service": { + "short_name": "ChatService", + "full_name": "google.chat.v1.ChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "chat_v1_generated_ChatService_CreateMembership_sync", "title": "Snippet for the create_membership call in the ChatService service", diff --git a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_rest_test.rb b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_rest_test.rb index 9339bb568166..742bdcc9c850 100644 --- a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_rest_test.rb +++ b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_rest_test.rb @@ -1084,6 +1084,63 @@ def test_find_direct_message end end + def test_find_group_chats + # Create test objects. + client_result = ::Google::Apps::Chat::V1::FindGroupChatsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + users = ["hello world"] + page_size = 42 + page_token = "hello world" + space_view = :SPACE_VIEW_UNSPECIFIED + + find_group_chats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Apps::Chat::V1::ChatService::Rest::ServiceStub.stub :transcode_find_group_chats_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, find_group_chats_client_stub do + # Create client + client = ::Google::Apps::Chat::V1::ChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.find_group_chats({ users: users, page_size: page_size, page_token: page_token, space_view: space_view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.find_group_chats users: users, page_size: page_size, page_token: page_token, space_view: space_view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.find_group_chats ::Google::Apps::Chat::V1::FindGroupChatsRequest.new(users: users, page_size: page_size, page_token: page_token, space_view: space_view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.find_group_chats({ users: users, page_size: page_size, page_token: page_token, space_view: space_view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.find_group_chats(::Google::Apps::Chat::V1::FindGroupChatsRequest.new(users: users, page_size: page_size, page_token: page_token, space_view: space_view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, find_group_chats_client_stub.call_count + end + end + end + def test_create_membership # Create test objects. client_result = ::Google::Apps::Chat::V1::Membership.new diff --git a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb index 752f2783ef30..203f6aa91edd 100644 --- a/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb +++ b/google-apps-chat-v1/test/google/apps/chat/v1/chat_service_test.rb @@ -1195,6 +1195,75 @@ def test_find_direct_message end end + def test_find_group_chats + # Create GRPC objects. + grpc_response = ::Google::Apps::Chat::V1::FindGroupChatsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + users = ["hello world"] + page_size = 42 + page_token = "hello world" + space_view = :SPACE_VIEW_UNSPECIFIED + + find_group_chats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :find_group_chats, name + assert_kind_of ::Google::Apps::Chat::V1::FindGroupChatsRequest, request + assert_equal ["hello world"], request["users"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :SPACE_VIEW_UNSPECIFIED, request["space_view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, find_group_chats_client_stub do + # Create client + client = ::Google::Apps::Chat::V1::ChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.find_group_chats({ users: users, page_size: page_size, page_token: page_token, space_view: space_view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.find_group_chats users: users, page_size: page_size, page_token: page_token, space_view: space_view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.find_group_chats ::Google::Apps::Chat::V1::FindGroupChatsRequest.new(users: users, page_size: page_size, page_token: page_token, space_view: space_view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.find_group_chats({ users: users, page_size: page_size, page_token: page_token, space_view: space_view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.find_group_chats(::Google::Apps::Chat::V1::FindGroupChatsRequest.new(users: users, page_size: page_size, page_token: page_token, space_view: space_view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, find_group_chats_client_stub.call_rpc_count + end + end + def test_create_membership # Create GRPC objects. grpc_response = ::Google::Apps::Chat::V1::Membership.new