@@ -161,6 +161,11 @@ def self.configure
161161 initial_delay : 1.0 , max_delay : 10.0 , multiplier : 1.3 , retry_codes : [ 14 ]
162162 }
163163
164+ default_config . rpcs . find_group_chats . timeout = 30.0
165+ default_config . rpcs . find_group_chats . retry_policy = {
166+ initial_delay : 1.0 , max_delay : 10.0 , multiplier : 1.3 , retry_codes : [ 14 ]
167+ }
168+
164169 default_config . rpcs . create_membership . timeout = 30.0
165170 default_config . rpcs . create_membership . retry_policy = {
166171 initial_delay : 1.0 , max_delay : 10.0 , multiplier : 1.3 , retry_codes : [ 14 ]
@@ -450,7 +455,7 @@ def logger
450455 # @param options [::Gapic::CallOptions, ::Hash]
451456 # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
452457 #
453- # @overload create_message(parent: nil, message: nil, thread_key: nil, request_id: nil, message_reply_option: nil, message_id: nil)
458+ # @overload create_message(parent: nil, message: nil, thread_key: nil, request_id: nil, message_reply_option: nil, message_id: nil, create_message_notification_options: nil )
454459 # Pass arguments to `create_message` via keyword arguments. Note that at
455460 # least one keyword argument is required. To specify no parameters, or to keep all
456461 # the default parameter values, pass an empty Hash as a request object (see above).
@@ -498,6 +503,10 @@ def logger
498503 #
499504 # For details, see [Name a
500505 # message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
506+ # @param create_message_notification_options [::Google::Apps::Chat::V1::CreateMessageNotificationOptions, ::Hash]
507+ # Optional. Controls the notification behavior when the message is posted.
508+ # To learn more, see [Force notifications or send silent
509+ # messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
501510 #
502511 # @yield [response, operation] Access the result along with the RPC operation
503512 # @yieldparam response [::Google::Apps::Chat::V1::Message]
@@ -3011,6 +3020,147 @@ def find_direct_message request, options = nil
30113020 raise ::Google ::Cloud ::Error . from_error ( e )
30123021 end
30133022
3023+ ##
3024+ # Returns all spaces with `spaceType == GROUP_CHAT`, whose
3025+ # human memberships contain exactly the calling user, and the users specified
3026+ # in `FindGroupChatsRequest.users`. Only members that have joined the
3027+ # conversation are supported. For an example, see [Find group
3028+ # chats](https://developers.google.com/workspace/chat/find-group-chats).
3029+ #
3030+ # If the calling user blocks, or is blocked by, some users, and no spaces
3031+ # with the entire specified set of users are found, this method returns
3032+ # spaces that don't include the blocked or blocking users.
3033+ #
3034+ # The specified set of users must contain only human (non-app) memberships.
3035+ # A request that contains non-human users doesn't return any spaces.
3036+ #
3037+ # Requires [user
3038+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3039+ # with one of the following [authorization
3040+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3041+ #
3042+ # - `https://www.googleapis.com/auth/chat.memberships.readonly`
3043+ # - `https://www.googleapis.com/auth/chat.memberships`
3044+ #
3045+ # @overload find_group_chats(request, options = nil)
3046+ # Pass arguments to `find_group_chats` via a request object, either of type
3047+ # {::Google::Apps::Chat::V1::FindGroupChatsRequest} or an equivalent Hash.
3048+ #
3049+ # @param request [::Google::Apps::Chat::V1::FindGroupChatsRequest, ::Hash]
3050+ # A request object representing the call parameters. Required. To specify no
3051+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3052+ # @param options [::Gapic::CallOptions, ::Hash]
3053+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3054+ #
3055+ # @overload find_group_chats(users: nil, page_size: nil, page_token: nil, space_view: nil)
3056+ # Pass arguments to `find_group_chats` via keyword arguments. Note that at
3057+ # least one keyword argument is required. To specify no parameters, or to keep all
3058+ # the default parameter values, pass an empty Hash as a request object (see above).
3059+ #
3060+ # @param users [::Array<::String>]
3061+ # Optional. Resource names of all human users in group chat with the calling
3062+ # user. Chat apps can't be included in the request.
3063+ #
3064+ # The maximum number of users that can be specified in a single request is
3065+ # `49`.
3066+ #
3067+ # Format: `users/{user}`, where `{user}` is either the `id` for the
3068+ # [person](https://developers.google.com/people/api/rest/v1/people) from the
3069+ # People API, or the `id` for the
3070+ # [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
3071+ # in the Directory API. For example, to find all group chats with the calling
3072+ # user and two other users, with People API profile IDs `123456789` and
3073+ # `987654321`, you can use `users/123456789` and `users/987654321`.
3074+ # You can also use the email as an alias for `{user}`. For example,
3075+ # `users/example@gmail.com` where `example@gmail.com` is the email of the
3076+ # Google Chat user.
3077+ # @param page_size [::Integer]
3078+ # Optional. The maximum number of spaces to return. The service might return
3079+ # fewer than this value.
3080+ #
3081+ # If unspecified, at most 10 spaces are returned.
3082+ #
3083+ # The maximum value is 30. If you use a value more than 30, it's
3084+ # automatically changed to 30.
3085+ #
3086+ # Negative values return an `INVALID_ARGUMENT` error.
3087+ # @param page_token [::String]
3088+ # Optional. A page token, received from a previous call to find group chats.
3089+ # Provide this parameter to retrieve the subsequent page.
3090+ #
3091+ # When paginating, all other parameters provided should match the call that
3092+ # provided the token. Passing different values may lead to unexpected
3093+ # results.
3094+ # @param space_view [::Google::Apps::Chat::V1::SpaceView]
3095+ # Requested space view type. If unset, defaults to
3096+ # `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
3097+ # `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
3098+ # for example,
3099+ # https://www.googleapis.com/auth/chat.spaces or
3100+ # https://www.googleapis.com/auth/chat.spaces.readonly.
3101+ #
3102+ # @yield [response, operation] Access the result along with the RPC operation
3103+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
3104+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3105+ #
3106+ # @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
3107+ #
3108+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3109+ #
3110+ # @example Basic example
3111+ # require "google/apps/chat/v1"
3112+ #
3113+ # # Create a client object. The client can be reused for multiple calls.
3114+ # client = Google::Apps::Chat::V1::ChatService::Client.new
3115+ #
3116+ # # Create a request. To set request fields, pass in keyword arguments.
3117+ # request = Google::Apps::Chat::V1::FindGroupChatsRequest.new
3118+ #
3119+ # # Call the find_group_chats method.
3120+ # result = client.find_group_chats request
3121+ #
3122+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3123+ # # over elements, and API calls will be issued to fetch pages as needed.
3124+ # result.each do |item|
3125+ # # Each element is of type ::Google::Apps::Chat::V1::Space.
3126+ # p item
3127+ # end
3128+ #
3129+ def find_group_chats request , options = nil
3130+ raise ::ArgumentError , "request must be provided" if request . nil?
3131+
3132+ request = ::Gapic ::Protobuf . coerce request , to : ::Google ::Apps ::Chat ::V1 ::FindGroupChatsRequest
3133+
3134+ # Converts hash and nil to an options object
3135+ options = ::Gapic ::CallOptions . new ( **options . to_h ) if options . respond_to? :to_h
3136+
3137+ # Customize the options with defaults
3138+ metadata = @config . rpcs . find_group_chats . metadata . to_h
3139+
3140+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3141+ metadata [ :"x-goog-api-client" ] ||= ::Gapic ::Headers . x_goog_api_client \
3142+ lib_name : @config . lib_name , lib_version : @config . lib_version ,
3143+ gapic_version : ::Google ::Apps ::Chat ::V1 ::VERSION
3144+ metadata [ :"x-goog-api-version" ] = API_VERSION unless API_VERSION . empty?
3145+ metadata [ :"x-goog-user-project" ] = @quota_project_id if @quota_project_id
3146+
3147+ options . apply_defaults timeout : @config . rpcs . find_group_chats . timeout ,
3148+ metadata : metadata ,
3149+ retry_policy : @config . rpcs . find_group_chats . retry_policy
3150+
3151+ options . apply_defaults timeout : @config . timeout ,
3152+ metadata : @config . metadata ,
3153+ retry_policy : @config . retry_policy
3154+
3155+ @chat_service_stub . call_rpc :find_group_chats , request , options : options do |response , operation |
3156+ response = ::Gapic ::PagedEnumerable . new @chat_service_stub , :find_group_chats , request , response , operation , options
3157+ yield response , operation if block_given?
3158+ throw :response , response
3159+ end
3160+ rescue ::GRPC ::BadStatus => e
3161+ raise ::Google ::Cloud ::Error . from_error ( e )
3162+ end
3163+
30143164 ##
30153165 # Creates a membership for the calling Chat app, a user, or a Google Group.
30163166 # Creating memberships for other Chat apps isn't supported.
@@ -6001,6 +6151,7 @@ def move_section_item request, options = nil
60016151 # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
60026152 # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
60036153 # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
6154+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
60046155 # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
60056156 # trigger a retry.
60066157 # @return [::Hash]
@@ -6084,6 +6235,7 @@ def channel_pool
60846235 # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
60856236 # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
60866237 # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
6238+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
60876239 # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
60886240 # trigger a retry.
60896241 #
@@ -6179,6 +6331,11 @@ class Rpcs
61796331 #
61806332 attr_reader :find_direct_message
61816333 ##
6334+ # RPC-specific configuration for `find_group_chats`
6335+ # @return [::Gapic::Config::Method]
6336+ #
6337+ attr_reader :find_group_chats
6338+ ##
61826339 # RPC-specific configuration for `create_membership`
61836340 # @return [::Gapic::Config::Method]
61846341 #
@@ -6337,6 +6494,8 @@ def initialize parent_rpcs = nil
63376494 @complete_import_space = ::Gapic ::Config ::Method . new complete_import_space_config
63386495 find_direct_message_config = parent_rpcs . find_direct_message if parent_rpcs . respond_to? :find_direct_message
63396496 @find_direct_message = ::Gapic ::Config ::Method . new find_direct_message_config
6497+ find_group_chats_config = parent_rpcs . find_group_chats if parent_rpcs . respond_to? :find_group_chats
6498+ @find_group_chats = ::Gapic ::Config ::Method . new find_group_chats_config
63406499 create_membership_config = parent_rpcs . create_membership if parent_rpcs . respond_to? :create_membership
63416500 @create_membership = ::Gapic ::Config ::Method . new create_membership_config
63426501 update_membership_config = parent_rpcs . update_membership if parent_rpcs . respond_to? :update_membership
0 commit comments