google-apps-meet-v2beta 0.a → 0.1.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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/apps/meet/v2beta/conference_records_service/client.rb +1595 -0
  6. data/lib/google/apps/meet/v2beta/conference_records_service/credentials.rb +44 -0
  7. data/lib/google/apps/meet/v2beta/conference_records_service/paths.rb +136 -0
  8. data/lib/google/apps/meet/v2beta/conference_records_service/rest/client.rb +1490 -0
  9. data/lib/google/apps/meet/v2beta/conference_records_service/rest/service_stub.rb +754 -0
  10. data/lib/google/apps/meet/v2beta/conference_records_service/rest.rb +52 -0
  11. data/lib/google/apps/meet/v2beta/conference_records_service.rb +55 -0
  12. data/lib/google/apps/meet/v2beta/resource_pb.rb +64 -0
  13. data/lib/google/apps/meet/v2beta/rest.rb +38 -0
  14. data/lib/google/apps/meet/v2beta/service_pb.rb +73 -0
  15. data/lib/google/apps/meet/v2beta/service_services_pb.rb +122 -0
  16. data/lib/google/apps/meet/v2beta/spaces_service/client.rb +687 -0
  17. data/lib/google/apps/meet/v2beta/spaces_service/credentials.rb +44 -0
  18. data/lib/google/apps/meet/v2beta/spaces_service/paths.rb +61 -0
  19. data/lib/google/apps/meet/v2beta/spaces_service/rest/client.rb +638 -0
  20. data/lib/google/apps/meet/v2beta/spaces_service/rest/service_stub.rb +285 -0
  21. data/lib/google/apps/meet/v2beta/spaces_service/rest.rb +52 -0
  22. data/lib/google/apps/meet/v2beta/spaces_service.rb +55 -0
  23. data/lib/google/apps/meet/v2beta/version.rb +7 -2
  24. data/lib/google/apps/meet/v2beta.rb +46 -0
  25. data/lib/google-apps-meet-v2beta.rb +21 -0
  26. data/proto_docs/README.md +4 -0
  27. data/proto_docs/google/api/client.rb +394 -0
  28. data/proto_docs/google/api/field_behavior.rb +85 -0
  29. data/proto_docs/google/api/launch_stage.rb +71 -0
  30. data/proto_docs/google/api/resource.rb +222 -0
  31. data/proto_docs/google/apps/meet/v2beta/resource.rb +375 -0
  32. data/proto_docs/google/apps/meet/v2beta/service.rb +350 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  36. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  37. metadata +190 -13
@@ -0,0 +1,687 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/errors"
20
+ require "google/apps/meet/v2beta/service_pb"
21
+
22
+ module Google
23
+ module Apps
24
+ module Meet
25
+ module V2beta
26
+ module SpacesService
27
+ ##
28
+ # Client for the SpacesService service.
29
+ #
30
+ # REST API for services dealing with spaces.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :spaces_service_stub
37
+
38
+ ##
39
+ # Configure the SpacesService Client class.
40
+ #
41
+ # See {::Google::Apps::Meet::V2beta::SpacesService::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all SpacesService clients
47
+ # ::Google::Apps::Meet::V2beta::SpacesService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Apps", "Meet", "V2beta"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config.rpcs.create_space.timeout = 60.0
68
+
69
+ default_config.rpcs.get_space.timeout = 60.0
70
+ default_config.rpcs.get_space.retry_policy = {
71
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
72
+ }
73
+
74
+ default_config.rpcs.update_space.timeout = 60.0
75
+
76
+ default_config.rpcs.end_active_conference.timeout = 60.0
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the SpacesService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Apps::Meet::V2beta::SpacesService::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # Create a new SpacesService client object.
106
+ #
107
+ # @example
108
+ #
109
+ # # Create a client using the default configuration
110
+ # client = ::Google::Apps::Meet::V2beta::SpacesService::Client.new
111
+ #
112
+ # # Create a client using a custom configuration
113
+ # client = ::Google::Apps::Meet::V2beta::SpacesService::Client.new do |config|
114
+ # config.timeout = 10.0
115
+ # end
116
+ #
117
+ # @yield [config] Configure the SpacesService client.
118
+ # @yieldparam config [Client::Configuration]
119
+ #
120
+ def initialize
121
+ # These require statements are intentionally placed here to initialize
122
+ # the gRPC module only when it's required.
123
+ # See https://github.com/googleapis/toolkit/issues/446
124
+ require "gapic/grpc"
125
+ require "google/apps/meet/v2beta/service_services_pb"
126
+
127
+ # Create the configuration object
128
+ @config = Configuration.new Client.configure
129
+
130
+ # Yield the configuration if needed
131
+ yield @config if block_given?
132
+
133
+ # Create credentials
134
+ credentials = @config.credentials
135
+ # Use self-signed JWT if the endpoint is unchanged from default,
136
+ # but only if the default endpoint does not have a region prefix.
137
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
138
+ !@config.endpoint.split(".").first.include?("-")
139
+ credentials ||= Credentials.default scope: @config.scope,
140
+ enable_self_signed_jwt: enable_self_signed_jwt
141
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
142
+ credentials = Credentials.new credentials, scope: @config.scope
143
+ end
144
+ @quota_project_id = @config.quota_project
145
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
+
147
+ @spaces_service_stub = ::Gapic::ServiceStub.new(
148
+ ::Google::Apps::Meet::V2beta::SpacesService::Stub,
149
+ credentials: credentials,
150
+ endpoint: @config.endpoint,
151
+ channel_args: @config.channel_args,
152
+ interceptors: @config.interceptors,
153
+ channel_pool_config: @config.channel_pool
154
+ )
155
+ end
156
+
157
+ # Service calls
158
+
159
+ ##
160
+ # [Developer Preview](https://developers.google.com/workspace/preview).
161
+ # Creates a space.
162
+ #
163
+ # @overload create_space(request, options = nil)
164
+ # Pass arguments to `create_space` via a request object, either of type
165
+ # {::Google::Apps::Meet::V2beta::CreateSpaceRequest} or an equivalent Hash.
166
+ #
167
+ # @param request [::Google::Apps::Meet::V2beta::CreateSpaceRequest, ::Hash]
168
+ # A request object representing the call parameters. Required. To specify no
169
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
170
+ # @param options [::Gapic::CallOptions, ::Hash]
171
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
172
+ #
173
+ # @overload create_space(space: nil)
174
+ # Pass arguments to `create_space` via keyword arguments. Note that at
175
+ # least one keyword argument is required. To specify no parameters, or to keep all
176
+ # the default parameter values, pass an empty Hash as a request object (see above).
177
+ #
178
+ # @param space [::Google::Apps::Meet::V2beta::Space, ::Hash]
179
+ # Space to be created. As of May 2023, the input space can be empty. Later on
180
+ # the input space can be non-empty when space configuration is introduced.
181
+ #
182
+ # @yield [response, operation] Access the result along with the RPC operation
183
+ # @yieldparam response [::Google::Apps::Meet::V2beta::Space]
184
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
185
+ #
186
+ # @return [::Google::Apps::Meet::V2beta::Space]
187
+ #
188
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
189
+ #
190
+ # @example Basic example
191
+ # require "google/apps/meet/v2beta"
192
+ #
193
+ # # Create a client object. The client can be reused for multiple calls.
194
+ # client = Google::Apps::Meet::V2beta::SpacesService::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Apps::Meet::V2beta::CreateSpaceRequest.new
198
+ #
199
+ # # Call the create_space method.
200
+ # result = client.create_space request
201
+ #
202
+ # # The returned object is of type Google::Apps::Meet::V2beta::Space.
203
+ # p result
204
+ #
205
+ def create_space request, options = nil
206
+ raise ::ArgumentError, "request must be provided" if request.nil?
207
+
208
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2beta::CreateSpaceRequest
209
+
210
+ # Converts hash and nil to an options object
211
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
212
+
213
+ # Customize the options with defaults
214
+ metadata = @config.rpcs.create_space.metadata.to_h
215
+
216
+ # Set x-goog-api-client and x-goog-user-project headers
217
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
218
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
219
+ gapic_version: ::Google::Apps::Meet::V2beta::VERSION
220
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
221
+
222
+ options.apply_defaults timeout: @config.rpcs.create_space.timeout,
223
+ metadata: metadata,
224
+ retry_policy: @config.rpcs.create_space.retry_policy
225
+
226
+ options.apply_defaults timeout: @config.timeout,
227
+ metadata: @config.metadata,
228
+ retry_policy: @config.retry_policy
229
+
230
+ @spaces_service_stub.call_rpc :create_space, request, options: options do |response, operation|
231
+ yield response, operation if block_given?
232
+ return response
233
+ end
234
+ rescue ::GRPC::BadStatus => e
235
+ raise ::Google::Cloud::Error.from_error(e)
236
+ end
237
+
238
+ ##
239
+ # [Developer Preview](https://developers.google.com/workspace/preview).
240
+ # Gets a space by `space_id` or `meeting_code`.
241
+ #
242
+ # @overload get_space(request, options = nil)
243
+ # Pass arguments to `get_space` via a request object, either of type
244
+ # {::Google::Apps::Meet::V2beta::GetSpaceRequest} or an equivalent Hash.
245
+ #
246
+ # @param request [::Google::Apps::Meet::V2beta::GetSpaceRequest, ::Hash]
247
+ # A request object representing the call parameters. Required. To specify no
248
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
249
+ # @param options [::Gapic::CallOptions, ::Hash]
250
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
251
+ #
252
+ # @overload get_space(name: nil)
253
+ # Pass arguments to `get_space` via keyword arguments. Note that at
254
+ # least one keyword argument is required. To specify no parameters, or to keep all
255
+ # the default parameter values, pass an empty Hash as a request object (see above).
256
+ #
257
+ # @param name [::String]
258
+ # Required. Resource name of the space.
259
+ #
260
+ # @yield [response, operation] Access the result along with the RPC operation
261
+ # @yieldparam response [::Google::Apps::Meet::V2beta::Space]
262
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
263
+ #
264
+ # @return [::Google::Apps::Meet::V2beta::Space]
265
+ #
266
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
267
+ #
268
+ # @example Basic example
269
+ # require "google/apps/meet/v2beta"
270
+ #
271
+ # # Create a client object. The client can be reused for multiple calls.
272
+ # client = Google::Apps::Meet::V2beta::SpacesService::Client.new
273
+ #
274
+ # # Create a request. To set request fields, pass in keyword arguments.
275
+ # request = Google::Apps::Meet::V2beta::GetSpaceRequest.new
276
+ #
277
+ # # Call the get_space method.
278
+ # result = client.get_space request
279
+ #
280
+ # # The returned object is of type Google::Apps::Meet::V2beta::Space.
281
+ # p result
282
+ #
283
+ def get_space request, options = nil
284
+ raise ::ArgumentError, "request must be provided" if request.nil?
285
+
286
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2beta::GetSpaceRequest
287
+
288
+ # Converts hash and nil to an options object
289
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
290
+
291
+ # Customize the options with defaults
292
+ metadata = @config.rpcs.get_space.metadata.to_h
293
+
294
+ # Set x-goog-api-client and x-goog-user-project headers
295
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
296
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
297
+ gapic_version: ::Google::Apps::Meet::V2beta::VERSION
298
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
299
+
300
+ header_params = {}
301
+ if request.name
302
+ header_params["name"] = request.name
303
+ end
304
+
305
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
+ metadata[:"x-goog-request-params"] ||= request_params_header
307
+
308
+ options.apply_defaults timeout: @config.rpcs.get_space.timeout,
309
+ metadata: metadata,
310
+ retry_policy: @config.rpcs.get_space.retry_policy
311
+
312
+ options.apply_defaults timeout: @config.timeout,
313
+ metadata: @config.metadata,
314
+ retry_policy: @config.retry_policy
315
+
316
+ @spaces_service_stub.call_rpc :get_space, request, options: options do |response, operation|
317
+ yield response, operation if block_given?
318
+ return response
319
+ end
320
+ rescue ::GRPC::BadStatus => e
321
+ raise ::Google::Cloud::Error.from_error(e)
322
+ end
323
+
324
+ ##
325
+ # [Developer Preview](https://developers.google.com/workspace/preview).
326
+ # Updates a space.
327
+ #
328
+ # @overload update_space(request, options = nil)
329
+ # Pass arguments to `update_space` via a request object, either of type
330
+ # {::Google::Apps::Meet::V2beta::UpdateSpaceRequest} or an equivalent Hash.
331
+ #
332
+ # @param request [::Google::Apps::Meet::V2beta::UpdateSpaceRequest, ::Hash]
333
+ # A request object representing the call parameters. Required. To specify no
334
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
335
+ # @param options [::Gapic::CallOptions, ::Hash]
336
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
337
+ #
338
+ # @overload update_space(space: nil, update_mask: nil)
339
+ # Pass arguments to `update_space` via keyword arguments. Note that at
340
+ # least one keyword argument is required. To specify no parameters, or to keep all
341
+ # the default parameter values, pass an empty Hash as a request object (see above).
342
+ #
343
+ # @param space [::Google::Apps::Meet::V2beta::Space, ::Hash]
344
+ # Required. Space to be updated.
345
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
346
+ # Optional. Field mask used to specify the fields to be updated in the space.
347
+ # If update_mask isn't provided, it defaults to '*' and updates all
348
+ # fields provided in the request, including deleting fields not set in the
349
+ # request.
350
+ #
351
+ # @yield [response, operation] Access the result along with the RPC operation
352
+ # @yieldparam response [::Google::Apps::Meet::V2beta::Space]
353
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
354
+ #
355
+ # @return [::Google::Apps::Meet::V2beta::Space]
356
+ #
357
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
358
+ #
359
+ # @example Basic example
360
+ # require "google/apps/meet/v2beta"
361
+ #
362
+ # # Create a client object. The client can be reused for multiple calls.
363
+ # client = Google::Apps::Meet::V2beta::SpacesService::Client.new
364
+ #
365
+ # # Create a request. To set request fields, pass in keyword arguments.
366
+ # request = Google::Apps::Meet::V2beta::UpdateSpaceRequest.new
367
+ #
368
+ # # Call the update_space method.
369
+ # result = client.update_space request
370
+ #
371
+ # # The returned object is of type Google::Apps::Meet::V2beta::Space.
372
+ # p result
373
+ #
374
+ def update_space request, options = nil
375
+ raise ::ArgumentError, "request must be provided" if request.nil?
376
+
377
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2beta::UpdateSpaceRequest
378
+
379
+ # Converts hash and nil to an options object
380
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
381
+
382
+ # Customize the options with defaults
383
+ metadata = @config.rpcs.update_space.metadata.to_h
384
+
385
+ # Set x-goog-api-client and x-goog-user-project headers
386
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
387
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
388
+ gapic_version: ::Google::Apps::Meet::V2beta::VERSION
389
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
390
+
391
+ header_params = {}
392
+ if request.space&.name
393
+ header_params["space.name"] = request.space.name
394
+ end
395
+
396
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
397
+ metadata[:"x-goog-request-params"] ||= request_params_header
398
+
399
+ options.apply_defaults timeout: @config.rpcs.update_space.timeout,
400
+ metadata: metadata,
401
+ retry_policy: @config.rpcs.update_space.retry_policy
402
+
403
+ options.apply_defaults timeout: @config.timeout,
404
+ metadata: @config.metadata,
405
+ retry_policy: @config.retry_policy
406
+
407
+ @spaces_service_stub.call_rpc :update_space, request, options: options do |response, operation|
408
+ yield response, operation if block_given?
409
+ return response
410
+ end
411
+ rescue ::GRPC::BadStatus => e
412
+ raise ::Google::Cloud::Error.from_error(e)
413
+ end
414
+
415
+ ##
416
+ # [Developer Preview](https://developers.google.com/workspace/preview).
417
+ # Ends an active conference (if there is one).
418
+ #
419
+ # @overload end_active_conference(request, options = nil)
420
+ # Pass arguments to `end_active_conference` via a request object, either of type
421
+ # {::Google::Apps::Meet::V2beta::EndActiveConferenceRequest} or an equivalent Hash.
422
+ #
423
+ # @param request [::Google::Apps::Meet::V2beta::EndActiveConferenceRequest, ::Hash]
424
+ # A request object representing the call parameters. Required. To specify no
425
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
426
+ # @param options [::Gapic::CallOptions, ::Hash]
427
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
428
+ #
429
+ # @overload end_active_conference(name: nil)
430
+ # Pass arguments to `end_active_conference` via keyword arguments. Note that at
431
+ # least one keyword argument is required. To specify no parameters, or to keep all
432
+ # the default parameter values, pass an empty Hash as a request object (see above).
433
+ #
434
+ # @param name [::String]
435
+ # Required. Resource name of the space.
436
+ #
437
+ # @yield [response, operation] Access the result along with the RPC operation
438
+ # @yieldparam response [::Google::Protobuf::Empty]
439
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
440
+ #
441
+ # @return [::Google::Protobuf::Empty]
442
+ #
443
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
444
+ #
445
+ # @example Basic example
446
+ # require "google/apps/meet/v2beta"
447
+ #
448
+ # # Create a client object. The client can be reused for multiple calls.
449
+ # client = Google::Apps::Meet::V2beta::SpacesService::Client.new
450
+ #
451
+ # # Create a request. To set request fields, pass in keyword arguments.
452
+ # request = Google::Apps::Meet::V2beta::EndActiveConferenceRequest.new
453
+ #
454
+ # # Call the end_active_conference method.
455
+ # result = client.end_active_conference request
456
+ #
457
+ # # The returned object is of type Google::Protobuf::Empty.
458
+ # p result
459
+ #
460
+ def end_active_conference request, options = nil
461
+ raise ::ArgumentError, "request must be provided" if request.nil?
462
+
463
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2beta::EndActiveConferenceRequest
464
+
465
+ # Converts hash and nil to an options object
466
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
467
+
468
+ # Customize the options with defaults
469
+ metadata = @config.rpcs.end_active_conference.metadata.to_h
470
+
471
+ # Set x-goog-api-client and x-goog-user-project headers
472
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
473
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
474
+ gapic_version: ::Google::Apps::Meet::V2beta::VERSION
475
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
+
477
+ header_params = {}
478
+ if request.name
479
+ header_params["name"] = request.name
480
+ end
481
+
482
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
483
+ metadata[:"x-goog-request-params"] ||= request_params_header
484
+
485
+ options.apply_defaults timeout: @config.rpcs.end_active_conference.timeout,
486
+ metadata: metadata,
487
+ retry_policy: @config.rpcs.end_active_conference.retry_policy
488
+
489
+ options.apply_defaults timeout: @config.timeout,
490
+ metadata: @config.metadata,
491
+ retry_policy: @config.retry_policy
492
+
493
+ @spaces_service_stub.call_rpc :end_active_conference, request, options: options do |response, operation|
494
+ yield response, operation if block_given?
495
+ return response
496
+ end
497
+ rescue ::GRPC::BadStatus => e
498
+ raise ::Google::Cloud::Error.from_error(e)
499
+ end
500
+
501
+ ##
502
+ # Configuration class for the SpacesService API.
503
+ #
504
+ # This class represents the configuration for SpacesService,
505
+ # providing control over timeouts, retry behavior, logging, transport
506
+ # parameters, and other low-level controls. Certain parameters can also be
507
+ # applied individually to specific RPCs. See
508
+ # {::Google::Apps::Meet::V2beta::SpacesService::Client::Configuration::Rpcs}
509
+ # for a list of RPCs that can be configured independently.
510
+ #
511
+ # Configuration can be applied globally to all clients, or to a single client
512
+ # on construction.
513
+ #
514
+ # @example
515
+ #
516
+ # # Modify the global config, setting the timeout for
517
+ # # create_space to 20 seconds,
518
+ # # and all remaining timeouts to 10 seconds.
519
+ # ::Google::Apps::Meet::V2beta::SpacesService::Client.configure do |config|
520
+ # config.timeout = 10.0
521
+ # config.rpcs.create_space.timeout = 20.0
522
+ # end
523
+ #
524
+ # # Apply the above configuration only to a new client.
525
+ # client = ::Google::Apps::Meet::V2beta::SpacesService::Client.new do |config|
526
+ # config.timeout = 10.0
527
+ # config.rpcs.create_space.timeout = 20.0
528
+ # end
529
+ #
530
+ # @!attribute [rw] endpoint
531
+ # The hostname or hostname:port of the service endpoint.
532
+ # Defaults to `"meet.googleapis.com"`.
533
+ # @return [::String]
534
+ # @!attribute [rw] credentials
535
+ # Credentials to send with calls. You may provide any of the following types:
536
+ # * (`String`) The path to a service account key file in JSON format
537
+ # * (`Hash`) A service account key as a Hash
538
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
539
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
540
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
541
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
542
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
543
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
544
+ # * (`nil`) indicating no credentials
545
+ # @return [::Object]
546
+ # @!attribute [rw] scope
547
+ # The OAuth scopes
548
+ # @return [::Array<::String>]
549
+ # @!attribute [rw] lib_name
550
+ # The library name as recorded in instrumentation and logging
551
+ # @return [::String]
552
+ # @!attribute [rw] lib_version
553
+ # The library version as recorded in instrumentation and logging
554
+ # @return [::String]
555
+ # @!attribute [rw] channel_args
556
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
557
+ # `GRPC::Core::Channel` object is provided as the credential.
558
+ # @return [::Hash]
559
+ # @!attribute [rw] interceptors
560
+ # An array of interceptors that are run before calls are executed.
561
+ # @return [::Array<::GRPC::ClientInterceptor>]
562
+ # @!attribute [rw] timeout
563
+ # The call timeout in seconds.
564
+ # @return [::Numeric]
565
+ # @!attribute [rw] metadata
566
+ # Additional gRPC headers to be sent with the call.
567
+ # @return [::Hash{::Symbol=>::String}]
568
+ # @!attribute [rw] retry_policy
569
+ # The retry policy. The value is a hash with the following keys:
570
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
571
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
572
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
573
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
574
+ # trigger a retry.
575
+ # @return [::Hash]
576
+ # @!attribute [rw] quota_project
577
+ # A separate project against which to charge quota.
578
+ # @return [::String]
579
+ #
580
+ class Configuration
581
+ extend ::Gapic::Config
582
+
583
+ DEFAULT_ENDPOINT = "meet.googleapis.com"
584
+
585
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
586
+ config_attr :credentials, nil do |value|
587
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
588
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
589
+ allowed.any? { |klass| klass === value }
590
+ end
591
+ config_attr :scope, nil, ::String, ::Array, nil
592
+ config_attr :lib_name, nil, ::String, nil
593
+ config_attr :lib_version, nil, ::String, nil
594
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
595
+ config_attr :interceptors, nil, ::Array, nil
596
+ config_attr :timeout, nil, ::Numeric, nil
597
+ config_attr :metadata, nil, ::Hash, nil
598
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
599
+ config_attr :quota_project, nil, ::String, nil
600
+
601
+ # @private
602
+ def initialize parent_config = nil
603
+ @parent_config = parent_config unless parent_config.nil?
604
+
605
+ yield self if block_given?
606
+ end
607
+
608
+ ##
609
+ # Configurations for individual RPCs
610
+ # @return [Rpcs]
611
+ #
612
+ def rpcs
613
+ @rpcs ||= begin
614
+ parent_rpcs = nil
615
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
616
+ Rpcs.new parent_rpcs
617
+ end
618
+ end
619
+
620
+ ##
621
+ # Configuration for the channel pool
622
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
623
+ #
624
+ def channel_pool
625
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
626
+ end
627
+
628
+ ##
629
+ # Configuration RPC class for the SpacesService API.
630
+ #
631
+ # Includes fields providing the configuration for each RPC in this service.
632
+ # Each configuration object is of type `Gapic::Config::Method` and includes
633
+ # the following configuration fields:
634
+ #
635
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
636
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
637
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
638
+ # include the following keys:
639
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
640
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
641
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
642
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
643
+ # trigger a retry.
644
+ #
645
+ class Rpcs
646
+ ##
647
+ # RPC-specific configuration for `create_space`
648
+ # @return [::Gapic::Config::Method]
649
+ #
650
+ attr_reader :create_space
651
+ ##
652
+ # RPC-specific configuration for `get_space`
653
+ # @return [::Gapic::Config::Method]
654
+ #
655
+ attr_reader :get_space
656
+ ##
657
+ # RPC-specific configuration for `update_space`
658
+ # @return [::Gapic::Config::Method]
659
+ #
660
+ attr_reader :update_space
661
+ ##
662
+ # RPC-specific configuration for `end_active_conference`
663
+ # @return [::Gapic::Config::Method]
664
+ #
665
+ attr_reader :end_active_conference
666
+
667
+ # @private
668
+ def initialize parent_rpcs = nil
669
+ create_space_config = parent_rpcs.create_space if parent_rpcs.respond_to? :create_space
670
+ @create_space = ::Gapic::Config::Method.new create_space_config
671
+ get_space_config = parent_rpcs.get_space if parent_rpcs.respond_to? :get_space
672
+ @get_space = ::Gapic::Config::Method.new get_space_config
673
+ update_space_config = parent_rpcs.update_space if parent_rpcs.respond_to? :update_space
674
+ @update_space = ::Gapic::Config::Method.new update_space_config
675
+ end_active_conference_config = parent_rpcs.end_active_conference if parent_rpcs.respond_to? :end_active_conference
676
+ @end_active_conference = ::Gapic::Config::Method.new end_active_conference_config
677
+
678
+ yield self if block_given?
679
+ end
680
+ end
681
+ end
682
+ end
683
+ end
684
+ end
685
+ end
686
+ end
687
+ end