google-apps-meet-v2 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/v2/conference_records_service/client.rb +1612 -0
  6. data/lib/google/apps/meet/v2/conference_records_service/credentials.rb +48 -0
  7. data/lib/google/apps/meet/v2/conference_records_service/paths.rb +136 -0
  8. data/lib/google/apps/meet/v2/conference_records_service/rest/client.rb +1510 -0
  9. data/lib/google/apps/meet/v2/conference_records_service/rest/service_stub.rb +775 -0
  10. data/lib/google/apps/meet/v2/conference_records_service/rest.rb +52 -0
  11. data/lib/google/apps/meet/v2/conference_records_service.rb +55 -0
  12. data/lib/google/apps/meet/v2/resource_pb.rb +64 -0
  13. data/lib/google/apps/meet/v2/rest.rb +38 -0
  14. data/lib/google/apps/meet/v2/service_pb.rb +73 -0
  15. data/lib/google/apps/meet/v2/service_services_pb.rb +109 -0
  16. data/lib/google/apps/meet/v2/spaces_service/client.rb +706 -0
  17. data/lib/google/apps/meet/v2/spaces_service/credentials.rb +48 -0
  18. data/lib/google/apps/meet/v2/spaces_service/paths.rb +61 -0
  19. data/lib/google/apps/meet/v2/spaces_service/rest/client.rb +660 -0
  20. data/lib/google/apps/meet/v2/spaces_service/rest/service_stub.rb +306 -0
  21. data/lib/google/apps/meet/v2/spaces_service/rest.rb +52 -0
  22. data/lib/google/apps/meet/v2/spaces_service.rb +55 -0
  23. data/lib/google/apps/meet/v2/version.rb +7 -2
  24. data/lib/google/apps/meet/v2.rb +46 -0
  25. data/lib/google-apps-meet-v2.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/v2/resource.rb +367 -0
  32. data/proto_docs/google/apps/meet/v2/service.rb +353 -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 +76 -11
@@ -0,0 +1,660 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/v2/service_pb"
21
+ require "google/apps/meet/v2/spaces_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Apps
25
+ module Meet
26
+ module V2
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::V2::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::V2::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", "V2"]
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::V2::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::V2::SpacesService::Rest::Client.new
125
+ #
126
+ # # Create a client using a custom configuration
127
+ # client = ::Google::Apps::Meet::V2::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::V2::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
+ # Creates a space.
169
+ #
170
+ # @overload create_space(request, options = nil)
171
+ # Pass arguments to `create_space` via a request object, either of type
172
+ # {::Google::Apps::Meet::V2::CreateSpaceRequest} or an equivalent Hash.
173
+ #
174
+ # @param request [::Google::Apps::Meet::V2::CreateSpaceRequest, ::Hash]
175
+ # A request object representing the call parameters. Required. To specify no
176
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
177
+ # @param options [::Gapic::CallOptions, ::Hash]
178
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
179
+ #
180
+ # @overload create_space(space: nil)
181
+ # Pass arguments to `create_space` via keyword arguments. Note that at
182
+ # least one keyword argument is required. To specify no parameters, or to keep all
183
+ # the default parameter values, pass an empty Hash as a request object (see above).
184
+ #
185
+ # @param space [::Google::Apps::Meet::V2::Space, ::Hash]
186
+ # Space to be created. As of May 2023, the input space can be empty. Later on
187
+ # the input space can be non-empty when space configuration is introduced.
188
+ # @yield [result, operation] Access the result along with the TransportOperation object
189
+ # @yieldparam result [::Google::Apps::Meet::V2::Space]
190
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
191
+ #
192
+ # @return [::Google::Apps::Meet::V2::Space]
193
+ #
194
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
195
+ #
196
+ # @example Basic example
197
+ # require "google/apps/meet/v2"
198
+ #
199
+ # # Create a client object. The client can be reused for multiple calls.
200
+ # client = Google::Apps::Meet::V2::SpacesService::Rest::Client.new
201
+ #
202
+ # # Create a request. To set request fields, pass in keyword arguments.
203
+ # request = Google::Apps::Meet::V2::CreateSpaceRequest.new
204
+ #
205
+ # # Call the create_space method.
206
+ # result = client.create_space request
207
+ #
208
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
209
+ # p result
210
+ #
211
+ def create_space request, options = nil
212
+ raise ::ArgumentError, "request must be provided" if request.nil?
213
+
214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::CreateSpaceRequest
215
+
216
+ # Converts hash and nil to an options object
217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
218
+
219
+ # Customize the options with defaults
220
+ call_metadata = @config.rpcs.create_space.metadata.to_h
221
+
222
+ # Set x-goog-api-client and x-goog-user-project headers
223
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
224
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
225
+ gapic_version: ::Google::Apps::Meet::V2::VERSION,
226
+ transports_version_send: [:rest]
227
+
228
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
229
+
230
+ options.apply_defaults timeout: @config.rpcs.create_space.timeout,
231
+ metadata: call_metadata,
232
+ retry_policy: @config.rpcs.create_space.retry_policy
233
+
234
+ options.apply_defaults timeout: @config.timeout,
235
+ metadata: @config.metadata,
236
+ retry_policy: @config.retry_policy
237
+
238
+ @spaces_service_stub.create_space request, options do |result, operation|
239
+ yield result, operation if block_given?
240
+ return result
241
+ end
242
+ rescue ::Gapic::Rest::Error => e
243
+ raise ::Google::Cloud::Error.from_error(e)
244
+ end
245
+
246
+ ##
247
+ # Gets a space by `space_id` or `meeting_code`.
248
+ #
249
+ # @overload get_space(request, options = nil)
250
+ # Pass arguments to `get_space` via a request object, either of type
251
+ # {::Google::Apps::Meet::V2::GetSpaceRequest} or an equivalent Hash.
252
+ #
253
+ # @param request [::Google::Apps::Meet::V2::GetSpaceRequest, ::Hash]
254
+ # A request object representing the call parameters. Required. To specify no
255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
256
+ # @param options [::Gapic::CallOptions, ::Hash]
257
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
258
+ #
259
+ # @overload get_space(name: nil)
260
+ # Pass arguments to `get_space` via keyword arguments. Note that at
261
+ # least one keyword argument is required. To specify no parameters, or to keep all
262
+ # the default parameter values, pass an empty Hash as a request object (see above).
263
+ #
264
+ # @param name [::String]
265
+ # Required. Resource name of the space.
266
+ # @yield [result, operation] Access the result along with the TransportOperation object
267
+ # @yieldparam result [::Google::Apps::Meet::V2::Space]
268
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
269
+ #
270
+ # @return [::Google::Apps::Meet::V2::Space]
271
+ #
272
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
273
+ #
274
+ # @example Basic example
275
+ # require "google/apps/meet/v2"
276
+ #
277
+ # # Create a client object. The client can be reused for multiple calls.
278
+ # client = Google::Apps::Meet::V2::SpacesService::Rest::Client.new
279
+ #
280
+ # # Create a request. To set request fields, pass in keyword arguments.
281
+ # request = Google::Apps::Meet::V2::GetSpaceRequest.new
282
+ #
283
+ # # Call the get_space method.
284
+ # result = client.get_space request
285
+ #
286
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
287
+ # p result
288
+ #
289
+ def get_space request, options = nil
290
+ raise ::ArgumentError, "request must be provided" if request.nil?
291
+
292
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::GetSpaceRequest
293
+
294
+ # Converts hash and nil to an options object
295
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
296
+
297
+ # Customize the options with defaults
298
+ call_metadata = @config.rpcs.get_space.metadata.to_h
299
+
300
+ # Set x-goog-api-client and x-goog-user-project headers
301
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
302
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
303
+ gapic_version: ::Google::Apps::Meet::V2::VERSION,
304
+ transports_version_send: [:rest]
305
+
306
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
+
308
+ options.apply_defaults timeout: @config.rpcs.get_space.timeout,
309
+ metadata: call_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.get_space request, options do |result, operation|
317
+ yield result, operation if block_given?
318
+ return result
319
+ end
320
+ rescue ::Gapic::Rest::Error => e
321
+ raise ::Google::Cloud::Error.from_error(e)
322
+ end
323
+
324
+ ##
325
+ # Updates a space.
326
+ #
327
+ # @overload update_space(request, options = nil)
328
+ # Pass arguments to `update_space` via a request object, either of type
329
+ # {::Google::Apps::Meet::V2::UpdateSpaceRequest} or an equivalent Hash.
330
+ #
331
+ # @param request [::Google::Apps::Meet::V2::UpdateSpaceRequest, ::Hash]
332
+ # A request object representing the call parameters. Required. To specify no
333
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
334
+ # @param options [::Gapic::CallOptions, ::Hash]
335
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
336
+ #
337
+ # @overload update_space(space: nil, update_mask: nil)
338
+ # Pass arguments to `update_space` via keyword arguments. Note that at
339
+ # least one keyword argument is required. To specify no parameters, or to keep all
340
+ # the default parameter values, pass an empty Hash as a request object (see above).
341
+ #
342
+ # @param space [::Google::Apps::Meet::V2::Space, ::Hash]
343
+ # Required. Space to be updated.
344
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
345
+ # Optional. Field mask used to specify the fields to be updated in the space.
346
+ # If update_mask isn't provided, it defaults to '*' and updates all
347
+ # fields provided in the request, including deleting fields not set in the
348
+ # request.
349
+ # @yield [result, operation] Access the result along with the TransportOperation object
350
+ # @yieldparam result [::Google::Apps::Meet::V2::Space]
351
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
352
+ #
353
+ # @return [::Google::Apps::Meet::V2::Space]
354
+ #
355
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
356
+ #
357
+ # @example Basic example
358
+ # require "google/apps/meet/v2"
359
+ #
360
+ # # Create a client object. The client can be reused for multiple calls.
361
+ # client = Google::Apps::Meet::V2::SpacesService::Rest::Client.new
362
+ #
363
+ # # Create a request. To set request fields, pass in keyword arguments.
364
+ # request = Google::Apps::Meet::V2::UpdateSpaceRequest.new
365
+ #
366
+ # # Call the update_space method.
367
+ # result = client.update_space request
368
+ #
369
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
370
+ # p result
371
+ #
372
+ def update_space request, options = nil
373
+ raise ::ArgumentError, "request must be provided" if request.nil?
374
+
375
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::UpdateSpaceRequest
376
+
377
+ # Converts hash and nil to an options object
378
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
379
+
380
+ # Customize the options with defaults
381
+ call_metadata = @config.rpcs.update_space.metadata.to_h
382
+
383
+ # Set x-goog-api-client and x-goog-user-project headers
384
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
385
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
386
+ gapic_version: ::Google::Apps::Meet::V2::VERSION,
387
+ transports_version_send: [:rest]
388
+
389
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
390
+
391
+ options.apply_defaults timeout: @config.rpcs.update_space.timeout,
392
+ metadata: call_metadata,
393
+ retry_policy: @config.rpcs.update_space.retry_policy
394
+
395
+ options.apply_defaults timeout: @config.timeout,
396
+ metadata: @config.metadata,
397
+ retry_policy: @config.retry_policy
398
+
399
+ @spaces_service_stub.update_space request, options do |result, operation|
400
+ yield result, operation if block_given?
401
+ return result
402
+ end
403
+ rescue ::Gapic::Rest::Error => e
404
+ raise ::Google::Cloud::Error.from_error(e)
405
+ end
406
+
407
+ ##
408
+ # Ends an active conference (if there's one).
409
+ #
410
+ # @overload end_active_conference(request, options = nil)
411
+ # Pass arguments to `end_active_conference` via a request object, either of type
412
+ # {::Google::Apps::Meet::V2::EndActiveConferenceRequest} or an equivalent Hash.
413
+ #
414
+ # @param request [::Google::Apps::Meet::V2::EndActiveConferenceRequest, ::Hash]
415
+ # A request object representing the call parameters. Required. To specify no
416
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
417
+ # @param options [::Gapic::CallOptions, ::Hash]
418
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
419
+ #
420
+ # @overload end_active_conference(name: nil)
421
+ # Pass arguments to `end_active_conference` via keyword arguments. Note that at
422
+ # least one keyword argument is required. To specify no parameters, or to keep all
423
+ # the default parameter values, pass an empty Hash as a request object (see above).
424
+ #
425
+ # @param name [::String]
426
+ # Required. Resource name of the space.
427
+ # @yield [result, operation] Access the result along with the TransportOperation object
428
+ # @yieldparam result [::Google::Protobuf::Empty]
429
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
430
+ #
431
+ # @return [::Google::Protobuf::Empty]
432
+ #
433
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
434
+ #
435
+ # @example Basic example
436
+ # require "google/apps/meet/v2"
437
+ #
438
+ # # Create a client object. The client can be reused for multiple calls.
439
+ # client = Google::Apps::Meet::V2::SpacesService::Rest::Client.new
440
+ #
441
+ # # Create a request. To set request fields, pass in keyword arguments.
442
+ # request = Google::Apps::Meet::V2::EndActiveConferenceRequest.new
443
+ #
444
+ # # Call the end_active_conference method.
445
+ # result = client.end_active_conference request
446
+ #
447
+ # # The returned object is of type Google::Protobuf::Empty.
448
+ # p result
449
+ #
450
+ def end_active_conference request, options = nil
451
+ raise ::ArgumentError, "request must be provided" if request.nil?
452
+
453
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::EndActiveConferenceRequest
454
+
455
+ # Converts hash and nil to an options object
456
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
457
+
458
+ # Customize the options with defaults
459
+ call_metadata = @config.rpcs.end_active_conference.metadata.to_h
460
+
461
+ # Set x-goog-api-client and x-goog-user-project headers
462
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
463
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
464
+ gapic_version: ::Google::Apps::Meet::V2::VERSION,
465
+ transports_version_send: [:rest]
466
+
467
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
468
+
469
+ options.apply_defaults timeout: @config.rpcs.end_active_conference.timeout,
470
+ metadata: call_metadata,
471
+ retry_policy: @config.rpcs.end_active_conference.retry_policy
472
+
473
+ options.apply_defaults timeout: @config.timeout,
474
+ metadata: @config.metadata,
475
+ retry_policy: @config.retry_policy
476
+
477
+ @spaces_service_stub.end_active_conference request, options do |result, operation|
478
+ yield result, operation if block_given?
479
+ return result
480
+ end
481
+ rescue ::Gapic::Rest::Error => e
482
+ raise ::Google::Cloud::Error.from_error(e)
483
+ end
484
+
485
+ ##
486
+ # Configuration class for the SpacesService REST API.
487
+ #
488
+ # This class represents the configuration for SpacesService REST,
489
+ # providing control over timeouts, retry behavior, logging, transport
490
+ # parameters, and other low-level controls. Certain parameters can also be
491
+ # applied individually to specific RPCs. See
492
+ # {::Google::Apps::Meet::V2::SpacesService::Rest::Client::Configuration::Rpcs}
493
+ # for a list of RPCs that can be configured independently.
494
+ #
495
+ # Configuration can be applied globally to all clients, or to a single client
496
+ # on construction.
497
+ #
498
+ # @example
499
+ #
500
+ # # Modify the global config, setting the timeout for
501
+ # # create_space to 20 seconds,
502
+ # # and all remaining timeouts to 10 seconds.
503
+ # ::Google::Apps::Meet::V2::SpacesService::Rest::Client.configure do |config|
504
+ # config.timeout = 10.0
505
+ # config.rpcs.create_space.timeout = 20.0
506
+ # end
507
+ #
508
+ # # Apply the above configuration only to a new client.
509
+ # client = ::Google::Apps::Meet::V2::SpacesService::Rest::Client.new do |config|
510
+ # config.timeout = 10.0
511
+ # config.rpcs.create_space.timeout = 20.0
512
+ # end
513
+ #
514
+ # @!attribute [rw] endpoint
515
+ # A custom service endpoint, as a hostname or hostname:port. The default is
516
+ # nil, indicating to use the default endpoint in the current universe domain.
517
+ # @return [::String,nil]
518
+ # @!attribute [rw] credentials
519
+ # Credentials to send with calls. You may provide any of the following types:
520
+ # * (`String`) The path to a service account key file in JSON format
521
+ # * (`Hash`) A service account key as a Hash
522
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
523
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
524
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
525
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
526
+ # * (`nil`) indicating no credentials
527
+ # @return [::Object]
528
+ # @!attribute [rw] scope
529
+ # The OAuth scopes
530
+ # @return [::Array<::String>]
531
+ # @!attribute [rw] lib_name
532
+ # The library name as recorded in instrumentation and logging
533
+ # @return [::String]
534
+ # @!attribute [rw] lib_version
535
+ # The library version as recorded in instrumentation and logging
536
+ # @return [::String]
537
+ # @!attribute [rw] timeout
538
+ # The call timeout in seconds.
539
+ # @return [::Numeric]
540
+ # @!attribute [rw] metadata
541
+ # Additional headers to be sent with the call.
542
+ # @return [::Hash{::Symbol=>::String}]
543
+ # @!attribute [rw] retry_policy
544
+ # The retry policy. The value is a hash with the following keys:
545
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
546
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
547
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
548
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
549
+ # trigger a retry.
550
+ # @return [::Hash]
551
+ # @!attribute [rw] quota_project
552
+ # A separate project against which to charge quota.
553
+ # @return [::String]
554
+ # @!attribute [rw] universe_domain
555
+ # The universe domain within which to make requests. This determines the
556
+ # default endpoint URL. The default value of nil uses the environment
557
+ # universe (usually the default "googleapis.com" universe).
558
+ # @return [::String,nil]
559
+ #
560
+ class Configuration
561
+ extend ::Gapic::Config
562
+
563
+ # @private
564
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
565
+ DEFAULT_ENDPOINT = "meet.googleapis.com"
566
+
567
+ config_attr :endpoint, nil, ::String, nil
568
+ config_attr :credentials, nil do |value|
569
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
570
+ allowed.any? { |klass| klass === value }
571
+ end
572
+ config_attr :scope, nil, ::String, ::Array, nil
573
+ config_attr :lib_name, nil, ::String, nil
574
+ config_attr :lib_version, nil, ::String, nil
575
+ config_attr :timeout, nil, ::Numeric, nil
576
+ config_attr :metadata, nil, ::Hash, nil
577
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
578
+ config_attr :quota_project, nil, ::String, nil
579
+ config_attr :universe_domain, nil, ::String, nil
580
+
581
+ # @private
582
+ def initialize parent_config = nil
583
+ @parent_config = parent_config unless parent_config.nil?
584
+
585
+ yield self if block_given?
586
+ end
587
+
588
+ ##
589
+ # Configurations for individual RPCs
590
+ # @return [Rpcs]
591
+ #
592
+ def rpcs
593
+ @rpcs ||= begin
594
+ parent_rpcs = nil
595
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
596
+ Rpcs.new parent_rpcs
597
+ end
598
+ end
599
+
600
+ ##
601
+ # Configuration RPC class for the SpacesService API.
602
+ #
603
+ # Includes fields providing the configuration for each RPC in this service.
604
+ # Each configuration object is of type `Gapic::Config::Method` and includes
605
+ # the following configuration fields:
606
+ #
607
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
608
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
609
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
610
+ # include the following keys:
611
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
612
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
613
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
614
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
615
+ # trigger a retry.
616
+ #
617
+ class Rpcs
618
+ ##
619
+ # RPC-specific configuration for `create_space`
620
+ # @return [::Gapic::Config::Method]
621
+ #
622
+ attr_reader :create_space
623
+ ##
624
+ # RPC-specific configuration for `get_space`
625
+ # @return [::Gapic::Config::Method]
626
+ #
627
+ attr_reader :get_space
628
+ ##
629
+ # RPC-specific configuration for `update_space`
630
+ # @return [::Gapic::Config::Method]
631
+ #
632
+ attr_reader :update_space
633
+ ##
634
+ # RPC-specific configuration for `end_active_conference`
635
+ # @return [::Gapic::Config::Method]
636
+ #
637
+ attr_reader :end_active_conference
638
+
639
+ # @private
640
+ def initialize parent_rpcs = nil
641
+ create_space_config = parent_rpcs.create_space if parent_rpcs.respond_to? :create_space
642
+ @create_space = ::Gapic::Config::Method.new create_space_config
643
+ get_space_config = parent_rpcs.get_space if parent_rpcs.respond_to? :get_space
644
+ @get_space = ::Gapic::Config::Method.new get_space_config
645
+ update_space_config = parent_rpcs.update_space if parent_rpcs.respond_to? :update_space
646
+ @update_space = ::Gapic::Config::Method.new update_space_config
647
+ end_active_conference_config = parent_rpcs.end_active_conference if parent_rpcs.respond_to? :end_active_conference
648
+ @end_active_conference = ::Gapic::Config::Method.new end_active_conference_config
649
+
650
+ yield self if block_given?
651
+ end
652
+ end
653
+ end
654
+ end
655
+ end
656
+ end
657
+ end
658
+ end
659
+ end
660
+ end