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