google-apps-meet-v2beta 0.a → 0.2.0

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