google-apps-chat-v1 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/apps/chat/v1/chat_service/client.rb +218 -0
- data/lib/google/apps/chat/v1/chat_service/credentials.rb +2 -1
- data/lib/google/apps/chat/v1/chat_service/paths.rb +17 -0
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +204 -0
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +123 -0
- data/lib/google/apps/chat/v1/version.rb +1 -1
- data/lib/google/chat/v1/chat_service_pb.rb +2 -1
- data/lib/google/chat/v1/chat_service_services_pb.rb +14 -0
- data/lib/google/chat/v1/space_notification_setting_pb.rb +51 -0
- data/proto_docs/google/chat/v1/space_notification_setting.rb +114 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81d31581165a6cbfcfd9c864c76bcfac71615de6b200703d21e277d397524cc9
|
4
|
+
data.tar.gz: 9f9c8f333a0676624cbff0fdbfaa913426737d2b516ce6578db3dc891d00ca1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a328099d8183bda53a97cfe54ea58c82cd869a5a8cb492cb6cbe4bd33b23286045153160253cf2f3ce4c6ec85e401afbbdc8690d8319f7f047b5e8382ab08b27
|
7
|
+
data.tar.gz: 7d9fc99e4ed24549f981e151c43c6857aaf55e5c908167929e609b5b3cb97f30b734a8c4fd95734457179a3df3a92fa0adad7cf9f664ce29f735cf5166f8c59c
|
@@ -216,6 +216,16 @@ module Google
|
|
216
216
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
217
217
|
}
|
218
218
|
|
219
|
+
default_config.rpcs.get_space_notification_setting.timeout = 30.0
|
220
|
+
default_config.rpcs.get_space_notification_setting.retry_policy = {
|
221
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
222
|
+
}
|
223
|
+
|
224
|
+
default_config.rpcs.update_space_notification_setting.timeout = 30.0
|
225
|
+
default_config.rpcs.update_space_notification_setting.retry_policy = {
|
226
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
227
|
+
}
|
228
|
+
|
219
229
|
default_config
|
220
230
|
end
|
221
231
|
yield @configure if block_given?
|
@@ -4124,6 +4134,200 @@ module Google
|
|
4124
4134
|
raise ::Google::Cloud::Error.from_error(e)
|
4125
4135
|
end
|
4126
4136
|
|
4137
|
+
##
|
4138
|
+
# Gets the space notification setting. For an example, see [Get the
|
4139
|
+
# caller's space notification
|
4140
|
+
# setting](https://developers.google.com/workspace/chat/get-space-notification-setting).
|
4141
|
+
#
|
4142
|
+
# Requires [user
|
4143
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
4144
|
+
#
|
4145
|
+
# @overload get_space_notification_setting(request, options = nil)
|
4146
|
+
# Pass arguments to `get_space_notification_setting` via a request object, either of type
|
4147
|
+
# {::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest} or an equivalent Hash.
|
4148
|
+
#
|
4149
|
+
# @param request [::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest, ::Hash]
|
4150
|
+
# A request object representing the call parameters. Required. To specify no
|
4151
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4152
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4153
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4154
|
+
#
|
4155
|
+
# @overload get_space_notification_setting(name: nil)
|
4156
|
+
# Pass arguments to `get_space_notification_setting` via keyword arguments. Note that at
|
4157
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4158
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4159
|
+
#
|
4160
|
+
# @param name [::String]
|
4161
|
+
# Required. Format: users/\\{user}/spaces/\\{space}/spaceNotificationSetting
|
4162
|
+
#
|
4163
|
+
# - `users/me/spaces/{space}/spaceNotificationSetting`, OR
|
4164
|
+
# - `users/user@example.com/spaces/{space}/spaceNotificationSetting`, OR
|
4165
|
+
# - `users/123456789/spaces/{space}/spaceNotificationSetting`.
|
4166
|
+
# Note: Only the caller's user id or email is allowed in the path.
|
4167
|
+
#
|
4168
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4169
|
+
# @yieldparam response [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4170
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4171
|
+
#
|
4172
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4173
|
+
#
|
4174
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4175
|
+
#
|
4176
|
+
# @example Basic example
|
4177
|
+
# require "google/apps/chat/v1"
|
4178
|
+
#
|
4179
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4180
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
4181
|
+
#
|
4182
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4183
|
+
# request = Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest.new
|
4184
|
+
#
|
4185
|
+
# # Call the get_space_notification_setting method.
|
4186
|
+
# result = client.get_space_notification_setting request
|
4187
|
+
#
|
4188
|
+
# # The returned object is of type Google::Apps::Chat::V1::SpaceNotificationSetting.
|
4189
|
+
# p result
|
4190
|
+
#
|
4191
|
+
def get_space_notification_setting request, options = nil
|
4192
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4193
|
+
|
4194
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest
|
4195
|
+
|
4196
|
+
# Converts hash and nil to an options object
|
4197
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4198
|
+
|
4199
|
+
# Customize the options with defaults
|
4200
|
+
metadata = @config.rpcs.get_space_notification_setting.metadata.to_h
|
4201
|
+
|
4202
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4203
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4204
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4205
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
4206
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4207
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4208
|
+
|
4209
|
+
header_params = {}
|
4210
|
+
if request.name
|
4211
|
+
header_params["name"] = request.name
|
4212
|
+
end
|
4213
|
+
|
4214
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4215
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4216
|
+
|
4217
|
+
options.apply_defaults timeout: @config.rpcs.get_space_notification_setting.timeout,
|
4218
|
+
metadata: metadata,
|
4219
|
+
retry_policy: @config.rpcs.get_space_notification_setting.retry_policy
|
4220
|
+
|
4221
|
+
options.apply_defaults timeout: @config.timeout,
|
4222
|
+
metadata: @config.metadata,
|
4223
|
+
retry_policy: @config.retry_policy
|
4224
|
+
|
4225
|
+
@chat_service_stub.call_rpc :get_space_notification_setting, request, options: options do |response, operation|
|
4226
|
+
yield response, operation if block_given?
|
4227
|
+
end
|
4228
|
+
rescue ::GRPC::BadStatus => e
|
4229
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4230
|
+
end
|
4231
|
+
|
4232
|
+
##
|
4233
|
+
# Updates the space notification setting. For an example, see [Update
|
4234
|
+
# the caller's space notification
|
4235
|
+
# setting](https://developers.google.com/workspace/chat/update-space-notification-setting).
|
4236
|
+
#
|
4237
|
+
# Requires [user
|
4238
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
4239
|
+
#
|
4240
|
+
# @overload update_space_notification_setting(request, options = nil)
|
4241
|
+
# Pass arguments to `update_space_notification_setting` via a request object, either of type
|
4242
|
+
# {::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest} or an equivalent Hash.
|
4243
|
+
#
|
4244
|
+
# @param request [::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest, ::Hash]
|
4245
|
+
# A request object representing the call parameters. Required. To specify no
|
4246
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4247
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4248
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4249
|
+
#
|
4250
|
+
# @overload update_space_notification_setting(space_notification_setting: nil, update_mask: nil)
|
4251
|
+
# Pass arguments to `update_space_notification_setting` via keyword arguments. Note that at
|
4252
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4253
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4254
|
+
#
|
4255
|
+
# @param space_notification_setting [::Google::Apps::Chat::V1::SpaceNotificationSetting, ::Hash]
|
4256
|
+
# Required. The resource name for the space notification settings must be
|
4257
|
+
# populated in the form of
|
4258
|
+
# `users/{user}/spaces/{space}/spaceNotificationSetting`. Only fields
|
4259
|
+
# specified by `update_mask` are updated.
|
4260
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4261
|
+
# Required. Supported field paths:
|
4262
|
+
#
|
4263
|
+
# - `notification_setting`
|
4264
|
+
#
|
4265
|
+
# - `mute_setting`
|
4266
|
+
#
|
4267
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4268
|
+
# @yieldparam response [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4269
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4270
|
+
#
|
4271
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4272
|
+
#
|
4273
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4274
|
+
#
|
4275
|
+
# @example Basic example
|
4276
|
+
# require "google/apps/chat/v1"
|
4277
|
+
#
|
4278
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4279
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
4280
|
+
#
|
4281
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4282
|
+
# request = Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest.new
|
4283
|
+
#
|
4284
|
+
# # Call the update_space_notification_setting method.
|
4285
|
+
# result = client.update_space_notification_setting request
|
4286
|
+
#
|
4287
|
+
# # The returned object is of type Google::Apps::Chat::V1::SpaceNotificationSetting.
|
4288
|
+
# p result
|
4289
|
+
#
|
4290
|
+
def update_space_notification_setting request, options = nil
|
4291
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4292
|
+
|
4293
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest
|
4294
|
+
|
4295
|
+
# Converts hash and nil to an options object
|
4296
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4297
|
+
|
4298
|
+
# Customize the options with defaults
|
4299
|
+
metadata = @config.rpcs.update_space_notification_setting.metadata.to_h
|
4300
|
+
|
4301
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4302
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4303
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4304
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
4305
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4306
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4307
|
+
|
4308
|
+
header_params = {}
|
4309
|
+
if request.space_notification_setting&.name
|
4310
|
+
header_params["space_notification_setting.name"] = request.space_notification_setting.name
|
4311
|
+
end
|
4312
|
+
|
4313
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4314
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4315
|
+
|
4316
|
+
options.apply_defaults timeout: @config.rpcs.update_space_notification_setting.timeout,
|
4317
|
+
metadata: metadata,
|
4318
|
+
retry_policy: @config.rpcs.update_space_notification_setting.retry_policy
|
4319
|
+
|
4320
|
+
options.apply_defaults timeout: @config.timeout,
|
4321
|
+
metadata: @config.metadata,
|
4322
|
+
retry_policy: @config.retry_policy
|
4323
|
+
|
4324
|
+
@chat_service_stub.call_rpc :update_space_notification_setting, request, options: options do |response, operation|
|
4325
|
+
yield response, operation if block_given?
|
4326
|
+
end
|
4327
|
+
rescue ::GRPC::BadStatus => e
|
4328
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4329
|
+
end
|
4330
|
+
|
4127
4331
|
##
|
4128
4332
|
# Configuration class for the ChatService API.
|
4129
4333
|
#
|
@@ -4435,6 +4639,16 @@ module Google
|
|
4435
4639
|
# @return [::Gapic::Config::Method]
|
4436
4640
|
#
|
4437
4641
|
attr_reader :list_space_events
|
4642
|
+
##
|
4643
|
+
# RPC-specific configuration for `get_space_notification_setting`
|
4644
|
+
# @return [::Gapic::Config::Method]
|
4645
|
+
#
|
4646
|
+
attr_reader :get_space_notification_setting
|
4647
|
+
##
|
4648
|
+
# RPC-specific configuration for `update_space_notification_setting`
|
4649
|
+
# @return [::Gapic::Config::Method]
|
4650
|
+
#
|
4651
|
+
attr_reader :update_space_notification_setting
|
4438
4652
|
|
4439
4653
|
# @private
|
4440
4654
|
def initialize parent_rpcs = nil
|
@@ -4496,6 +4710,10 @@ module Google
|
|
4496
4710
|
@get_space_event = ::Gapic::Config::Method.new get_space_event_config
|
4497
4711
|
list_space_events_config = parent_rpcs.list_space_events if parent_rpcs.respond_to? :list_space_events
|
4498
4712
|
@list_space_events = ::Gapic::Config::Method.new list_space_events_config
|
4713
|
+
get_space_notification_setting_config = parent_rpcs.get_space_notification_setting if parent_rpcs.respond_to? :get_space_notification_setting
|
4714
|
+
@get_space_notification_setting = ::Gapic::Config::Method.new get_space_notification_setting_config
|
4715
|
+
update_space_notification_setting_config = parent_rpcs.update_space_notification_setting if parent_rpcs.respond_to? :update_space_notification_setting
|
4716
|
+
@update_space_notification_setting = ::Gapic::Config::Method.new update_space_notification_setting_config
|
4499
4717
|
|
4500
4718
|
yield self if block_given?
|
4501
4719
|
end
|
@@ -47,7 +47,8 @@ module Google
|
|
47
47
|
"https://www.googleapis.com/auth/chat.spaces.create",
|
48
48
|
"https://www.googleapis.com/auth/chat.spaces.readonly",
|
49
49
|
"https://www.googleapis.com/auth/chat.users.readstate",
|
50
|
-
"https://www.googleapis.com/auth/chat.users.readstate.readonly"
|
50
|
+
"https://www.googleapis.com/auth/chat.users.readstate.readonly",
|
51
|
+
"https://www.googleapis.com/auth/chat.users.spacesettings"
|
51
52
|
]
|
52
53
|
self.env_vars = [
|
53
54
|
"GOOGLE_CLOUD_CREDENTIALS",
|
@@ -146,6 +146,23 @@ module Google
|
|
146
146
|
"spaces/#{space}/spaceEvents/#{space_event}"
|
147
147
|
end
|
148
148
|
|
149
|
+
##
|
150
|
+
# Create a fully-qualified SpaceNotificationSetting resource string.
|
151
|
+
#
|
152
|
+
# The resource will be in the following format:
|
153
|
+
#
|
154
|
+
# `users/{user}/spaces/{space}/spaceNotificationSetting`
|
155
|
+
#
|
156
|
+
# @param user [String]
|
157
|
+
# @param space [String]
|
158
|
+
#
|
159
|
+
# @return [::String]
|
160
|
+
def space_notification_setting_path user:, space:
|
161
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
162
|
+
|
163
|
+
"users/#{user}/spaces/#{space}/spaceNotificationSetting"
|
164
|
+
end
|
165
|
+
|
149
166
|
##
|
150
167
|
# Create a fully-qualified SpaceReadState resource string.
|
151
168
|
#
|
@@ -218,6 +218,16 @@ module Google
|
|
218
218
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
219
219
|
}
|
220
220
|
|
221
|
+
default_config.rpcs.get_space_notification_setting.timeout = 30.0
|
222
|
+
default_config.rpcs.get_space_notification_setting.retry_policy = {
|
223
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
224
|
+
}
|
225
|
+
|
226
|
+
default_config.rpcs.update_space_notification_setting.timeout = 30.0
|
227
|
+
default_config.rpcs.update_space_notification_setting.retry_policy = {
|
228
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
229
|
+
}
|
230
|
+
|
221
231
|
default_config
|
222
232
|
end
|
223
233
|
yield @configure if block_given?
|
@@ -3954,6 +3964,186 @@ module Google
|
|
3954
3964
|
raise ::Google::Cloud::Error.from_error(e)
|
3955
3965
|
end
|
3956
3966
|
|
3967
|
+
##
|
3968
|
+
# Gets the space notification setting. For an example, see [Get the
|
3969
|
+
# caller's space notification
|
3970
|
+
# setting](https://developers.google.com/workspace/chat/get-space-notification-setting).
|
3971
|
+
#
|
3972
|
+
# Requires [user
|
3973
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3974
|
+
#
|
3975
|
+
# @overload get_space_notification_setting(request, options = nil)
|
3976
|
+
# Pass arguments to `get_space_notification_setting` via a request object, either of type
|
3977
|
+
# {::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest} or an equivalent Hash.
|
3978
|
+
#
|
3979
|
+
# @param request [::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest, ::Hash]
|
3980
|
+
# A request object representing the call parameters. Required. To specify no
|
3981
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3982
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3983
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3984
|
+
#
|
3985
|
+
# @overload get_space_notification_setting(name: nil)
|
3986
|
+
# Pass arguments to `get_space_notification_setting` via keyword arguments. Note that at
|
3987
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3988
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3989
|
+
#
|
3990
|
+
# @param name [::String]
|
3991
|
+
# Required. Format: users/\\{user}/spaces/\\{space}/spaceNotificationSetting
|
3992
|
+
#
|
3993
|
+
# - `users/me/spaces/{space}/spaceNotificationSetting`, OR
|
3994
|
+
# - `users/user@example.com/spaces/{space}/spaceNotificationSetting`, OR
|
3995
|
+
# - `users/123456789/spaces/{space}/spaceNotificationSetting`.
|
3996
|
+
# Note: Only the caller's user id or email is allowed in the path.
|
3997
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3998
|
+
# @yieldparam result [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
3999
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4000
|
+
#
|
4001
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4002
|
+
#
|
4003
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4004
|
+
#
|
4005
|
+
# @example Basic example
|
4006
|
+
# require "google/apps/chat/v1"
|
4007
|
+
#
|
4008
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4009
|
+
# client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
|
4010
|
+
#
|
4011
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4012
|
+
# request = Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest.new
|
4013
|
+
#
|
4014
|
+
# # Call the get_space_notification_setting method.
|
4015
|
+
# result = client.get_space_notification_setting request
|
4016
|
+
#
|
4017
|
+
# # The returned object is of type Google::Apps::Chat::V1::SpaceNotificationSetting.
|
4018
|
+
# p result
|
4019
|
+
#
|
4020
|
+
def get_space_notification_setting request, options = nil
|
4021
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4022
|
+
|
4023
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest
|
4024
|
+
|
4025
|
+
# Converts hash and nil to an options object
|
4026
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4027
|
+
|
4028
|
+
# Customize the options with defaults
|
4029
|
+
call_metadata = @config.rpcs.get_space_notification_setting.metadata.to_h
|
4030
|
+
|
4031
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4032
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4033
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4034
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION,
|
4035
|
+
transports_version_send: [:rest]
|
4036
|
+
|
4037
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4038
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4039
|
+
|
4040
|
+
options.apply_defaults timeout: @config.rpcs.get_space_notification_setting.timeout,
|
4041
|
+
metadata: call_metadata,
|
4042
|
+
retry_policy: @config.rpcs.get_space_notification_setting.retry_policy
|
4043
|
+
|
4044
|
+
options.apply_defaults timeout: @config.timeout,
|
4045
|
+
metadata: @config.metadata,
|
4046
|
+
retry_policy: @config.retry_policy
|
4047
|
+
|
4048
|
+
@chat_service_stub.get_space_notification_setting request, options do |result, operation|
|
4049
|
+
yield result, operation if block_given?
|
4050
|
+
end
|
4051
|
+
rescue ::Gapic::Rest::Error => e
|
4052
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4053
|
+
end
|
4054
|
+
|
4055
|
+
##
|
4056
|
+
# Updates the space notification setting. For an example, see [Update
|
4057
|
+
# the caller's space notification
|
4058
|
+
# setting](https://developers.google.com/workspace/chat/update-space-notification-setting).
|
4059
|
+
#
|
4060
|
+
# Requires [user
|
4061
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
4062
|
+
#
|
4063
|
+
# @overload update_space_notification_setting(request, options = nil)
|
4064
|
+
# Pass arguments to `update_space_notification_setting` via a request object, either of type
|
4065
|
+
# {::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest} or an equivalent Hash.
|
4066
|
+
#
|
4067
|
+
# @param request [::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest, ::Hash]
|
4068
|
+
# A request object representing the call parameters. Required. To specify no
|
4069
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4070
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4071
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4072
|
+
#
|
4073
|
+
# @overload update_space_notification_setting(space_notification_setting: nil, update_mask: nil)
|
4074
|
+
# Pass arguments to `update_space_notification_setting` via keyword arguments. Note that at
|
4075
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4076
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4077
|
+
#
|
4078
|
+
# @param space_notification_setting [::Google::Apps::Chat::V1::SpaceNotificationSetting, ::Hash]
|
4079
|
+
# Required. The resource name for the space notification settings must be
|
4080
|
+
# populated in the form of
|
4081
|
+
# `users/{user}/spaces/{space}/spaceNotificationSetting`. Only fields
|
4082
|
+
# specified by `update_mask` are updated.
|
4083
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4084
|
+
# Required. Supported field paths:
|
4085
|
+
#
|
4086
|
+
# - `notification_setting`
|
4087
|
+
#
|
4088
|
+
# - `mute_setting`
|
4089
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4090
|
+
# @yieldparam result [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4091
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4092
|
+
#
|
4093
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
4094
|
+
#
|
4095
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4096
|
+
#
|
4097
|
+
# @example Basic example
|
4098
|
+
# require "google/apps/chat/v1"
|
4099
|
+
#
|
4100
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4101
|
+
# client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
|
4102
|
+
#
|
4103
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4104
|
+
# request = Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest.new
|
4105
|
+
#
|
4106
|
+
# # Call the update_space_notification_setting method.
|
4107
|
+
# result = client.update_space_notification_setting request
|
4108
|
+
#
|
4109
|
+
# # The returned object is of type Google::Apps::Chat::V1::SpaceNotificationSetting.
|
4110
|
+
# p result
|
4111
|
+
#
|
4112
|
+
def update_space_notification_setting request, options = nil
|
4113
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4114
|
+
|
4115
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest
|
4116
|
+
|
4117
|
+
# Converts hash and nil to an options object
|
4118
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4119
|
+
|
4120
|
+
# Customize the options with defaults
|
4121
|
+
call_metadata = @config.rpcs.update_space_notification_setting.metadata.to_h
|
4122
|
+
|
4123
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4124
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4125
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4126
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION,
|
4127
|
+
transports_version_send: [:rest]
|
4128
|
+
|
4129
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4130
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4131
|
+
|
4132
|
+
options.apply_defaults timeout: @config.rpcs.update_space_notification_setting.timeout,
|
4133
|
+
metadata: call_metadata,
|
4134
|
+
retry_policy: @config.rpcs.update_space_notification_setting.retry_policy
|
4135
|
+
|
4136
|
+
options.apply_defaults timeout: @config.timeout,
|
4137
|
+
metadata: @config.metadata,
|
4138
|
+
retry_policy: @config.retry_policy
|
4139
|
+
|
4140
|
+
@chat_service_stub.update_space_notification_setting request, options do |result, operation|
|
4141
|
+
yield result, operation if block_given?
|
4142
|
+
end
|
4143
|
+
rescue ::Gapic::Rest::Error => e
|
4144
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4145
|
+
end
|
4146
|
+
|
3957
4147
|
##
|
3958
4148
|
# Configuration class for the ChatService REST API.
|
3959
4149
|
#
|
@@ -4245,6 +4435,16 @@ module Google
|
|
4245
4435
|
# @return [::Gapic::Config::Method]
|
4246
4436
|
#
|
4247
4437
|
attr_reader :list_space_events
|
4438
|
+
##
|
4439
|
+
# RPC-specific configuration for `get_space_notification_setting`
|
4440
|
+
# @return [::Gapic::Config::Method]
|
4441
|
+
#
|
4442
|
+
attr_reader :get_space_notification_setting
|
4443
|
+
##
|
4444
|
+
# RPC-specific configuration for `update_space_notification_setting`
|
4445
|
+
# @return [::Gapic::Config::Method]
|
4446
|
+
#
|
4447
|
+
attr_reader :update_space_notification_setting
|
4248
4448
|
|
4249
4449
|
# @private
|
4250
4450
|
def initialize parent_rpcs = nil
|
@@ -4306,6 +4506,10 @@ module Google
|
|
4306
4506
|
@get_space_event = ::Gapic::Config::Method.new get_space_event_config
|
4307
4507
|
list_space_events_config = parent_rpcs.list_space_events if parent_rpcs.respond_to? :list_space_events
|
4308
4508
|
@list_space_events = ::Gapic::Config::Method.new list_space_events_config
|
4509
|
+
get_space_notification_setting_config = parent_rpcs.get_space_notification_setting if parent_rpcs.respond_to? :get_space_notification_setting
|
4510
|
+
@get_space_notification_setting = ::Gapic::Config::Method.new get_space_notification_setting_config
|
4511
|
+
update_space_notification_setting_config = parent_rpcs.update_space_notification_setting if parent_rpcs.respond_to? :update_space_notification_setting
|
4512
|
+
@update_space_notification_setting = ::Gapic::Config::Method.new update_space_notification_setting_config
|
4309
4513
|
|
4310
4514
|
yield self if block_given?
|
4311
4515
|
end
|
@@ -1233,6 +1233,86 @@ module Google
|
|
1233
1233
|
end
|
1234
1234
|
end
|
1235
1235
|
|
1236
|
+
##
|
1237
|
+
# Baseline implementation for the get_space_notification_setting REST call
|
1238
|
+
#
|
1239
|
+
# @param request_pb [::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest]
|
1240
|
+
# A request object representing the call parameters. Required.
|
1241
|
+
# @param options [::Gapic::CallOptions]
|
1242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1243
|
+
#
|
1244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1245
|
+
# @yieldparam result [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
1246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1247
|
+
#
|
1248
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
1249
|
+
# A result object deserialized from the server's reply
|
1250
|
+
def get_space_notification_setting request_pb, options = nil
|
1251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1252
|
+
|
1253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_space_notification_setting_request request_pb
|
1254
|
+
query_string_params = if query_string_params.any?
|
1255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1256
|
+
else
|
1257
|
+
{}
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
response = @client_stub.make_http_request(
|
1261
|
+
verb,
|
1262
|
+
uri: uri,
|
1263
|
+
body: body || "",
|
1264
|
+
params: query_string_params,
|
1265
|
+
method_name: "get_space_notification_setting",
|
1266
|
+
options: options
|
1267
|
+
)
|
1268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1269
|
+
result = ::Google::Apps::Chat::V1::SpaceNotificationSetting.decode_json response.body, ignore_unknown_fields: true
|
1270
|
+
catch :response do
|
1271
|
+
yield result, operation if block_given?
|
1272
|
+
result
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
##
|
1277
|
+
# Baseline implementation for the update_space_notification_setting REST call
|
1278
|
+
#
|
1279
|
+
# @param request_pb [::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest]
|
1280
|
+
# A request object representing the call parameters. Required.
|
1281
|
+
# @param options [::Gapic::CallOptions]
|
1282
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1283
|
+
#
|
1284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1285
|
+
# @yieldparam result [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
1286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1287
|
+
#
|
1288
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
1289
|
+
# A result object deserialized from the server's reply
|
1290
|
+
def update_space_notification_setting request_pb, options = nil
|
1291
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1292
|
+
|
1293
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_space_notification_setting_request request_pb
|
1294
|
+
query_string_params = if query_string_params.any?
|
1295
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1296
|
+
else
|
1297
|
+
{}
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
response = @client_stub.make_http_request(
|
1301
|
+
verb,
|
1302
|
+
uri: uri,
|
1303
|
+
body: body || "",
|
1304
|
+
params: query_string_params,
|
1305
|
+
method_name: "update_space_notification_setting",
|
1306
|
+
options: options
|
1307
|
+
)
|
1308
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1309
|
+
result = ::Google::Apps::Chat::V1::SpaceNotificationSetting.decode_json response.body, ignore_unknown_fields: true
|
1310
|
+
catch :response do
|
1311
|
+
yield result, operation if block_given?
|
1312
|
+
result
|
1313
|
+
end
|
1314
|
+
end
|
1315
|
+
|
1236
1316
|
##
|
1237
1317
|
# @private
|
1238
1318
|
#
|
@@ -1850,6 +1930,49 @@ module Google
|
|
1850
1930
|
)
|
1851
1931
|
transcoder.transcode request_pb
|
1852
1932
|
end
|
1933
|
+
|
1934
|
+
##
|
1935
|
+
# @private
|
1936
|
+
#
|
1937
|
+
# GRPC transcoding helper method for the get_space_notification_setting REST call
|
1938
|
+
#
|
1939
|
+
# @param request_pb [::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest]
|
1940
|
+
# A request object representing the call parameters. Required.
|
1941
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1942
|
+
# Uri, Body, Query string parameters
|
1943
|
+
def self.transcode_get_space_notification_setting_request request_pb
|
1944
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1945
|
+
.with_bindings(
|
1946
|
+
uri_method: :get,
|
1947
|
+
uri_template: "/v1/{name}",
|
1948
|
+
matches: [
|
1949
|
+
["name", %r{^users/[^/]+/spaces/[^/]+/spaceNotificationSetting/?$}, false]
|
1950
|
+
]
|
1951
|
+
)
|
1952
|
+
transcoder.transcode request_pb
|
1953
|
+
end
|
1954
|
+
|
1955
|
+
##
|
1956
|
+
# @private
|
1957
|
+
#
|
1958
|
+
# GRPC transcoding helper method for the update_space_notification_setting REST call
|
1959
|
+
#
|
1960
|
+
# @param request_pb [::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest]
|
1961
|
+
# A request object representing the call parameters. Required.
|
1962
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1963
|
+
# Uri, Body, Query string parameters
|
1964
|
+
def self.transcode_update_space_notification_setting_request request_pb
|
1965
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1966
|
+
.with_bindings(
|
1967
|
+
uri_method: :patch,
|
1968
|
+
uri_template: "/v1/{space_notification_setting.name}",
|
1969
|
+
body: "space_notification_setting",
|
1970
|
+
matches: [
|
1971
|
+
["space_notification_setting.name", %r{^users/[^/]+/spaces/[^/]+/spaceNotificationSetting/?$}, false]
|
1972
|
+
]
|
1973
|
+
)
|
1974
|
+
transcoder.transcode request_pb
|
1975
|
+
end
|
1853
1976
|
end
|
1854
1977
|
end
|
1855
1978
|
end
|
@@ -12,13 +12,14 @@ require 'google/chat/v1/message_pb'
|
|
12
12
|
require 'google/chat/v1/reaction_pb'
|
13
13
|
require 'google/chat/v1/space_pb'
|
14
14
|
require 'google/chat/v1/space_event_pb'
|
15
|
+
require 'google/chat/v1/space_notification_setting_pb'
|
15
16
|
require 'google/chat/v1/space_read_state_pb'
|
16
17
|
require 'google/chat/v1/space_setup_pb'
|
17
18
|
require 'google/chat/v1/thread_read_state_pb'
|
18
19
|
require 'google/protobuf/empty_pb'
|
19
20
|
|
20
21
|
|
21
|
-
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\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.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\
|
22
|
+
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\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\xb2.\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\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\x1a\xe2\t\xca\x41\x13\x63hat.googleapis.com\xd2\x41\xc8\thttps://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.bot,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.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"
|
22
23
|
|
23
24
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
24
25
|
|
@@ -518,6 +518,20 @@ module Google
|
|
518
518
|
# For an example, see [List events from a Google Chat
|
519
519
|
# space](https://developers.google.com/workspace/chat/list-space-events).
|
520
520
|
rpc :ListSpaceEvents, ::Google::Apps::Chat::V1::ListSpaceEventsRequest, ::Google::Apps::Chat::V1::ListSpaceEventsResponse
|
521
|
+
# Gets the space notification setting. For an example, see [Get the
|
522
|
+
# caller's space notification
|
523
|
+
# setting](https://developers.google.com/workspace/chat/get-space-notification-setting).
|
524
|
+
#
|
525
|
+
# Requires [user
|
526
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
527
|
+
rpc :GetSpaceNotificationSetting, ::Google::Apps::Chat::V1::GetSpaceNotificationSettingRequest, ::Google::Apps::Chat::V1::SpaceNotificationSetting
|
528
|
+
# Updates the space notification setting. For an example, see [Update
|
529
|
+
# the caller's space notification
|
530
|
+
# setting](https://developers.google.com/workspace/chat/update-space-notification-setting).
|
531
|
+
#
|
532
|
+
# Requires [user
|
533
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
534
|
+
rpc :UpdateSpaceNotificationSetting, ::Google::Apps::Chat::V1::UpdateSpaceNotificationSettingRequest, ::Google::Apps::Chat::V1::SpaceNotificationSetting
|
521
535
|
end
|
522
536
|
|
523
537
|
Stub = Service.rpc_stub_class
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/chat/v1/space_notification_setting.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf/field_mask_pb'
|
10
|
+
|
11
|
+
|
12
|
+
descriptor_data = "\n/google/chat/v1/space_notification_setting.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xc6\x04\n\x18SpaceNotificationSetting\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12_\n\x14notification_setting\x18\x02 \x01(\x0e\x32<.google.chat.v1.SpaceNotificationSetting.NotificationSettingH\x00\x88\x01\x01\x12O\n\x0cmute_setting\x18\x03 \x01(\x0e\x32\x34.google.chat.v1.SpaceNotificationSetting.MuteSettingH\x01\x88\x01\x01\"r\n\x13NotificationSetting\x12$\n NOTIFICATION_SETTING_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x16\n\x12MAIN_CONVERSATIONS\x10\x02\x12\x0b\n\x07\x46OR_YOU\x10\x03\x12\x07\n\x03OFF\x10\x04\"C\n\x0bMuteSetting\x12\x1c\n\x18MUTE_SETTING_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNMUTED\x10\x01\x12\t\n\x05MUTED\x10\x02:\x81\x01\xea\x41~\n,chat.googleapis.com/SpaceNotificationSetting\x12\x34users/{user}/spaces/{space}/spaceNotificationSetting2\x18spaceNotificationSettingB\x17\n\x15_notification_settingB\x0f\n\r_mute_setting\"h\n\"GetSpaceNotificationSettingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,chat.googleapis.com/SpaceNotificationSetting\"\xb0\x01\n%UpdateSpaceNotificationSettingRequest\x12Q\n\x1aspace_notification_setting\x18\x01 \x01(\x0b\x32(.google.chat.v1.SpaceNotificationSettingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\xb6\x01\n\x12\x63om.google.chat.v1B\x1dSpaceNotificationSettingProtoP\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"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
37
|
+
end
|
38
|
+
|
39
|
+
module Google
|
40
|
+
module Apps
|
41
|
+
module Chat
|
42
|
+
module V1
|
43
|
+
SpaceNotificationSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SpaceNotificationSetting").msgclass
|
44
|
+
SpaceNotificationSetting::NotificationSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SpaceNotificationSetting.NotificationSetting").enummodule
|
45
|
+
SpaceNotificationSetting::MuteSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SpaceNotificationSetting.MuteSetting").enummodule
|
46
|
+
GetSpaceNotificationSettingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.GetSpaceNotificationSettingRequest").msgclass
|
47
|
+
UpdateSpaceNotificationSettingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.UpdateSpaceNotificationSettingRequest").msgclass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apps
|
22
|
+
module Chat
|
23
|
+
module V1
|
24
|
+
# The notification setting of a user in a space.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Identifier. The resource name of the space notification setting.
|
28
|
+
# Format: `users/{user}/spaces/{space}/spaceNotificationSetting`.
|
29
|
+
# @!attribute [rw] notification_setting
|
30
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting::NotificationSetting]
|
31
|
+
# The notification setting.
|
32
|
+
# @!attribute [rw] mute_setting
|
33
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting::MuteSetting]
|
34
|
+
# The space notification mute setting.
|
35
|
+
class SpaceNotificationSetting
|
36
|
+
include ::Google::Protobuf::MessageExts
|
37
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
38
|
+
|
39
|
+
# The notification setting types. Other types might be supported in the
|
40
|
+
# future.
|
41
|
+
module NotificationSetting
|
42
|
+
# Reserved.
|
43
|
+
NOTIFICATION_SETTING_UNSPECIFIED = 0
|
44
|
+
|
45
|
+
# Notifications are triggered by @mentions, followed threads, first
|
46
|
+
# message of new threads. All new threads are automatically followed,
|
47
|
+
# unless manually unfollowed by the user.
|
48
|
+
ALL = 1
|
49
|
+
|
50
|
+
# The notification is triggered by @mentions, followed threads, first
|
51
|
+
# message of new threads. Not available for 1:1 direct messages.
|
52
|
+
MAIN_CONVERSATIONS = 2
|
53
|
+
|
54
|
+
# The notification is triggered by @mentions, followed threads. Not
|
55
|
+
# available for 1:1 direct messages.
|
56
|
+
FOR_YOU = 3
|
57
|
+
|
58
|
+
# Notification is off.
|
59
|
+
OFF = 4
|
60
|
+
end
|
61
|
+
|
62
|
+
# The space notification mute setting types.
|
63
|
+
module MuteSetting
|
64
|
+
# Reserved.
|
65
|
+
MUTE_SETTING_UNSPECIFIED = 0
|
66
|
+
|
67
|
+
# The user will receive notifications for the space based on the
|
68
|
+
# notification setting.
|
69
|
+
UNMUTED = 1
|
70
|
+
|
71
|
+
# The user will not receive any notifications for the space, regardless of
|
72
|
+
# the notification setting.
|
73
|
+
MUTED = 2
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Request message to get space notification setting.
|
78
|
+
# Only supports getting notification setting for the calling user.
|
79
|
+
# @!attribute [rw] name
|
80
|
+
# @return [::String]
|
81
|
+
# Required. Format: users/\\{user}/spaces/\\{space}/spaceNotificationSetting
|
82
|
+
#
|
83
|
+
# - `users/me/spaces/{space}/spaceNotificationSetting`, OR
|
84
|
+
# - `users/user@example.com/spaces/{space}/spaceNotificationSetting`, OR
|
85
|
+
# - `users/123456789/spaces/{space}/spaceNotificationSetting`.
|
86
|
+
# Note: Only the caller's user id or email is allowed in the path.
|
87
|
+
class GetSpaceNotificationSettingRequest
|
88
|
+
include ::Google::Protobuf::MessageExts
|
89
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
90
|
+
end
|
91
|
+
|
92
|
+
# Request to update the space notification settings.
|
93
|
+
# Only supports updating notification setting for the calling user.
|
94
|
+
# @!attribute [rw] space_notification_setting
|
95
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting]
|
96
|
+
# Required. The resource name for the space notification settings must be
|
97
|
+
# populated in the form of
|
98
|
+
# `users/{user}/spaces/{space}/spaceNotificationSetting`. Only fields
|
99
|
+
# specified by `update_mask` are updated.
|
100
|
+
# @!attribute [rw] update_mask
|
101
|
+
# @return [::Google::Protobuf::FieldMask]
|
102
|
+
# Required. Supported field paths:
|
103
|
+
#
|
104
|
+
# - `notification_setting`
|
105
|
+
#
|
106
|
+
# - `mute_setting`
|
107
|
+
class UpdateSpaceNotificationSettingRequest
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apps-chat-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-11 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: gapic-common
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/google/chat/v1/reaction_pb.rb
|
105
105
|
- lib/google/chat/v1/slash_command_pb.rb
|
106
106
|
- lib/google/chat/v1/space_event_pb.rb
|
107
|
+
- lib/google/chat/v1/space_notification_setting_pb.rb
|
107
108
|
- lib/google/chat/v1/space_pb.rb
|
108
109
|
- lib/google/chat/v1/space_read_state_pb.rb
|
109
110
|
- lib/google/chat/v1/space_setup_pb.rb
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- proto_docs/google/chat/v1/slash_command.rb
|
133
134
|
- proto_docs/google/chat/v1/space.rb
|
134
135
|
- proto_docs/google/chat/v1/space_event.rb
|
136
|
+
- proto_docs/google/chat/v1/space_notification_setting.rb
|
135
137
|
- proto_docs/google/chat/v1/space_read_state.rb
|
136
138
|
- proto_docs/google/chat/v1/space_setup.rb
|
137
139
|
- proto_docs/google/chat/v1/thread_read_state.rb
|