google-cloud-support-v2 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 332c8c250c5002d7d6c5950a16118b1bc3b6234eb87b0f85919cee7a55e18e70
4
- data.tar.gz: 54d5c49a681a94e7839840dfb75e4e7acd0742ded49364c7e7c0b321d585ae1f
3
+ metadata.gz: c2d7ad1cff26c341547448b776da32e550a7cfd835955426d960e2b1d76ebeaf
4
+ data.tar.gz: 8e1eb565ec3bd7a0a91312c7d118d92d4d6988b929eb24d83c4abece3798ce2f
5
5
  SHA512:
6
- metadata.gz: 380ff3ef935970012b226c46b1ce169b7bf70d29521293b02d63f9958fb3a47e8c4d0528da360ff7aff758b1048f9cbc7a65238c7a50453d89c80aac48f39db8
7
- data.tar.gz: 23571d670c9dc990915f2651dbcae1cc5c23f93b855c118960194ffc5103b00771a791031ceef6fe5c8b3886e797f9d713a2271ebd9a4393948ae5e28537236e
6
+ metadata.gz: e8aacfc61705ab8db0506e8392fac92828a0c144d6a1a8d893689545d82e0d4cc3c1844f1afabdba2a010f81a552a72a965b7b93934e4c5367f4795ce7faf65d
7
+ data.tar.gz: 9e168d1cdcaa9137734d897560fe8bfc0a558ddcf1f212369cfce15a03a4e46f50607158749b20de43037712be543a7901c975d5669fa0307728a6cc7308c219
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Manages Google Cloud technical support cases for Customer Care support offerings.
4
4
 
5
- Manages Google Cloud technical support cases for Customer Care support offerings.
6
5
 
7
6
  https://github.com/googleapis/google-cloud-ruby
8
7
 
@@ -0,0 +1,564 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/cloud/support/v2/attachment_service_pb"
21
+ require "google/cloud/support/v2/case_attachment_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Support
26
+ module V2
27
+ module CaseAttachmentService
28
+ module Rest
29
+ ##
30
+ # REST client for the CaseAttachmentService service.
31
+ #
32
+ # A service to manage file attachments for Google Cloud support cases.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudsupport.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :case_attachment_service_stub
45
+
46
+ ##
47
+ # Configure the CaseAttachmentService Client class.
48
+ #
49
+ # See {::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all CaseAttachmentService clients
55
+ # ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Support", "V2"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.list_attachments.timeout = 60.0
76
+ default_config.rpcs.list_attachments.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the CaseAttachmentService 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::Cloud::Support::V2::CaseAttachmentService::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
+ # The effective universe domain
108
+ #
109
+ # @return [String]
110
+ #
111
+ def universe_domain
112
+ @case_attachment_service_stub.universe_domain
113
+ end
114
+
115
+ ##
116
+ # Create a new CaseAttachmentService REST client object.
117
+ #
118
+ # @example
119
+ #
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.new
122
+ #
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
127
+ #
128
+ # @yield [config] Configure the CaseAttachmentService client.
129
+ # @yieldparam config [Client::Configuration]
130
+ #
131
+ def initialize
132
+ # Create the configuration object
133
+ @config = Configuration.new Client.configure
134
+
135
+ # Yield the configuration if needed
136
+ yield @config if block_given?
137
+
138
+ # Create credentials
139
+ credentials = @config.credentials
140
+ # Use self-signed JWT if the endpoint is unchanged from default,
141
+ # but only if the default endpoint does not have a region prefix.
142
+ enable_self_signed_jwt = @config.endpoint.nil? ||
143
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
144
+ !@config.endpoint.split(".").first.include?("-"))
145
+ credentials ||= Credentials.default scope: @config.scope,
146
+ enable_self_signed_jwt: enable_self_signed_jwt
147
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
148
+ credentials = Credentials.new credentials, scope: @config.scope
149
+ end
150
+
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @case_attachment_service_stub = ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::ServiceStub.new(
155
+ endpoint: @config.endpoint,
156
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
+ universe_domain: @config.universe_domain,
158
+ credentials: credentials,
159
+ logger: @config.logger
160
+ )
161
+
162
+ @case_attachment_service_stub.logger(stub: true)&.info do |entry|
163
+ entry.set_system_name
164
+ entry.set_service
165
+ entry.message = "Created client for #{entry.service}"
166
+ entry.set_credentials_fields credentials
167
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
168
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
169
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
170
+ end
171
+ end
172
+
173
+ ##
174
+ # The logger used for request/response debug logging.
175
+ #
176
+ # @return [Logger]
177
+ #
178
+ def logger
179
+ @case_attachment_service_stub.logger
180
+ end
181
+
182
+ # Service calls
183
+
184
+ ##
185
+ # List all the attachments associated with a support case.
186
+ #
187
+ # @overload list_attachments(request, options = nil)
188
+ # Pass arguments to `list_attachments` via a request object, either of type
189
+ # {::Google::Cloud::Support::V2::ListAttachmentsRequest} or an equivalent Hash.
190
+ #
191
+ # @param request [::Google::Cloud::Support::V2::ListAttachmentsRequest, ::Hash]
192
+ # A request object representing the call parameters. Required. To specify no
193
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
194
+ # @param options [::Gapic::CallOptions, ::Hash]
195
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
196
+ #
197
+ # @overload list_attachments(parent: nil, page_size: nil, page_token: nil)
198
+ # Pass arguments to `list_attachments` via keyword arguments. Note that at
199
+ # least one keyword argument is required. To specify no parameters, or to keep all
200
+ # the default parameter values, pass an empty Hash as a request object (see above).
201
+ #
202
+ # @param parent [::String]
203
+ # Required. The name of the case for which attachments should be listed.
204
+ # @param page_size [::Integer]
205
+ # The maximum number of attachments fetched with each request.
206
+ #
207
+ # If not provided, the default is 10. The maximum page size that will be
208
+ # returned is 100.
209
+ #
210
+ # The size of each page can be smaller than the requested page size and can
211
+ # include zero. For example, you could request 100 attachments on one page,
212
+ # receive 0, and then on the next page, receive 90.
213
+ # @param page_token [::String]
214
+ # A token identifying the page of results to return. If unspecified, the
215
+ # first page is retrieved.
216
+ # @yield [result, operation] Access the result along with the TransportOperation object
217
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>]
218
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
219
+ #
220
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Support::V2::Attachment>]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/cloud/support/v2"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Cloud::Support::V2::ListAttachmentsRequest.new
232
+ #
233
+ # # Call the list_attachments method.
234
+ # result = client.list_attachments request
235
+ #
236
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
237
+ # # over elements, and API calls will be issued to fetch pages as needed.
238
+ # result.each do |item|
239
+ # # Each element is of type ::Google::Cloud::Support::V2::Attachment.
240
+ # p item
241
+ # end
242
+ #
243
+ def list_attachments request, options = nil
244
+ raise ::ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2::ListAttachmentsRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ call_metadata = @config.rpcs.list_attachments.metadata.to_h
253
+
254
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
255
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Cloud::Support::V2::VERSION,
258
+ transports_version_send: [:rest]
259
+
260
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
261
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
+
263
+ options.apply_defaults timeout: @config.rpcs.list_attachments.timeout,
264
+ metadata: call_metadata,
265
+ retry_policy: @config.rpcs.list_attachments.retry_policy
266
+
267
+ options.apply_defaults timeout: @config.timeout,
268
+ metadata: @config.metadata,
269
+ retry_policy: @config.retry_policy
270
+
271
+ @case_attachment_service_stub.list_attachments request, options do |result, operation|
272
+ result = ::Gapic::Rest::PagedEnumerable.new @case_attachment_service_stub, :list_attachments, "attachments", request, result, options
273
+ yield result, operation if block_given?
274
+ throw :response, result
275
+ end
276
+ rescue ::Gapic::Rest::Error => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Retrieve an attachment associated with a support case.
282
+ #
283
+ # EXAMPLES:
284
+ #
285
+ # cURL:
286
+ #
287
+ # ```shell
288
+ # attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB"
289
+ # curl \
290
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
291
+ # "https://cloudsupport.googleapis.com/v2/$attachment"
292
+ # ```
293
+ #
294
+ # Python:
295
+ #
296
+ # ```python
297
+ # import googleapiclient.discovery
298
+ #
299
+ # api_version = "v2"
300
+ # supportApiService = googleapiclient.discovery.build(
301
+ # serviceName="cloudsupport",
302
+ # version=api_version,
303
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
304
+ # )
305
+ # request = (
306
+ # supportApiService.cases()
307
+ # .attachments()
308
+ # .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB")
309
+ # )
310
+ # print(request.execute())
311
+ # ```
312
+ #
313
+ # @overload get_attachment(request, options = nil)
314
+ # Pass arguments to `get_attachment` via a request object, either of type
315
+ # {::Google::Cloud::Support::V2::GetAttachmentRequest} or an equivalent Hash.
316
+ #
317
+ # @param request [::Google::Cloud::Support::V2::GetAttachmentRequest, ::Hash]
318
+ # A request object representing the call parameters. Required. To specify no
319
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
322
+ #
323
+ # @overload get_attachment(name: nil)
324
+ # Pass arguments to `get_attachment` via keyword arguments. Note that at
325
+ # least one keyword argument is required. To specify no parameters, or to keep all
326
+ # the default parameter values, pass an empty Hash as a request object (see above).
327
+ #
328
+ # @param name [::String]
329
+ # Required. The name of the attachment to get.
330
+ # @yield [result, operation] Access the result along with the TransportOperation object
331
+ # @yieldparam result [::Google::Cloud::Support::V2::Attachment]
332
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
333
+ #
334
+ # @return [::Google::Cloud::Support::V2::Attachment]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
337
+ #
338
+ # @example Basic example
339
+ # require "google/cloud/support/v2"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Cloud::Support::V2::GetAttachmentRequest.new
346
+ #
347
+ # # Call the get_attachment method.
348
+ # result = client.get_attachment request
349
+ #
350
+ # # The returned object is of type Google::Cloud::Support::V2::Attachment.
351
+ # p result
352
+ #
353
+ def get_attachment request, options = nil
354
+ raise ::ArgumentError, "request must be provided" if request.nil?
355
+
356
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2::GetAttachmentRequest
357
+
358
+ # Converts hash and nil to an options object
359
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
360
+
361
+ # Customize the options with defaults
362
+ call_metadata = @config.rpcs.get_attachment.metadata.to_h
363
+
364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
365
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
366
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
367
+ gapic_version: ::Google::Cloud::Support::V2::VERSION,
368
+ transports_version_send: [:rest]
369
+
370
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
371
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
372
+
373
+ options.apply_defaults timeout: @config.rpcs.get_attachment.timeout,
374
+ metadata: call_metadata,
375
+ retry_policy: @config.rpcs.get_attachment.retry_policy
376
+
377
+ options.apply_defaults timeout: @config.timeout,
378
+ metadata: @config.metadata,
379
+ retry_policy: @config.retry_policy
380
+
381
+ @case_attachment_service_stub.get_attachment request, options do |result, operation|
382
+ yield result, operation if block_given?
383
+ end
384
+ rescue ::Gapic::Rest::Error => e
385
+ raise ::Google::Cloud::Error.from_error(e)
386
+ end
387
+
388
+ ##
389
+ # Configuration class for the CaseAttachmentService REST API.
390
+ #
391
+ # This class represents the configuration for CaseAttachmentService REST,
392
+ # providing control over timeouts, retry behavior, logging, transport
393
+ # parameters, and other low-level controls. Certain parameters can also be
394
+ # applied individually to specific RPCs. See
395
+ # {::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client::Configuration::Rpcs}
396
+ # for a list of RPCs that can be configured independently.
397
+ #
398
+ # Configuration can be applied globally to all clients, or to a single client
399
+ # on construction.
400
+ #
401
+ # @example
402
+ #
403
+ # # Modify the global config, setting the timeout for
404
+ # # list_attachments to 20 seconds,
405
+ # # and all remaining timeouts to 10 seconds.
406
+ # ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.configure do |config|
407
+ # config.timeout = 10.0
408
+ # config.rpcs.list_attachments.timeout = 20.0
409
+ # end
410
+ #
411
+ # # Apply the above configuration only to a new client.
412
+ # client = ::Google::Cloud::Support::V2::CaseAttachmentService::Rest::Client.new do |config|
413
+ # config.timeout = 10.0
414
+ # config.rpcs.list_attachments.timeout = 20.0
415
+ # end
416
+ #
417
+ # @!attribute [rw] endpoint
418
+ # A custom service endpoint, as a hostname or hostname:port. The default is
419
+ # nil, indicating to use the default endpoint in the current universe domain.
420
+ # @return [::String,nil]
421
+ # @!attribute [rw] credentials
422
+ # Credentials to send with calls. You may provide any of the following types:
423
+ # * (`String`) The path to a service account key file in JSON format
424
+ # * (`Hash`) A service account key as a Hash
425
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
426
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
427
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
428
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
429
+ # * (`nil`) indicating no credentials
430
+ #
431
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
432
+ # external source for authentication to Google Cloud, you must validate it before
433
+ # providing it to a Google API client library. Providing an unvalidated credential
434
+ # configuration to Google APIs can compromise the security of your systems and data.
435
+ # For more information, refer to [Validate credential configurations from external
436
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
437
+ # @return [::Object]
438
+ # @!attribute [rw] scope
439
+ # The OAuth scopes
440
+ # @return [::Array<::String>]
441
+ # @!attribute [rw] lib_name
442
+ # The library name as recorded in instrumentation and logging
443
+ # @return [::String]
444
+ # @!attribute [rw] lib_version
445
+ # The library version as recorded in instrumentation and logging
446
+ # @return [::String]
447
+ # @!attribute [rw] timeout
448
+ # The call timeout in seconds.
449
+ # @return [::Numeric]
450
+ # @!attribute [rw] metadata
451
+ # Additional headers to be sent with the call.
452
+ # @return [::Hash{::Symbol=>::String}]
453
+ # @!attribute [rw] retry_policy
454
+ # The retry policy. The value is a hash with the following keys:
455
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
456
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
457
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
458
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
459
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
460
+ # trigger a retry.
461
+ # @return [::Hash]
462
+ # @!attribute [rw] quota_project
463
+ # A separate project against which to charge quota.
464
+ # @return [::String]
465
+ # @!attribute [rw] universe_domain
466
+ # The universe domain within which to make requests. This determines the
467
+ # default endpoint URL. The default value of nil uses the environment
468
+ # universe (usually the default "googleapis.com" universe).
469
+ # @return [::String,nil]
470
+ # @!attribute [rw] logger
471
+ # A custom logger to use for request/response debug logging, or the value
472
+ # `:default` (the default) to construct a default logger, or `nil` to
473
+ # explicitly disable logging.
474
+ # @return [::Logger,:default,nil]
475
+ #
476
+ class Configuration
477
+ extend ::Gapic::Config
478
+
479
+ # @private
480
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
481
+ DEFAULT_ENDPOINT = "cloudsupport.googleapis.com"
482
+
483
+ config_attr :endpoint, nil, ::String, nil
484
+ config_attr :credentials, nil do |value|
485
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
486
+ allowed.any? { |klass| klass === value }
487
+ end
488
+ config_attr :scope, nil, ::String, ::Array, nil
489
+ config_attr :lib_name, nil, ::String, nil
490
+ config_attr :lib_version, nil, ::String, nil
491
+ config_attr :timeout, nil, ::Numeric, nil
492
+ config_attr :metadata, nil, ::Hash, nil
493
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
494
+ config_attr :quota_project, nil, ::String, nil
495
+ config_attr :universe_domain, nil, ::String, nil
496
+ config_attr :logger, :default, ::Logger, nil, :default
497
+
498
+ # @private
499
+ def initialize parent_config = nil
500
+ @parent_config = parent_config unless parent_config.nil?
501
+
502
+ yield self if block_given?
503
+ end
504
+
505
+ ##
506
+ # Configurations for individual RPCs
507
+ # @return [Rpcs]
508
+ #
509
+ def rpcs
510
+ @rpcs ||= begin
511
+ parent_rpcs = nil
512
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
513
+ Rpcs.new parent_rpcs
514
+ end
515
+ end
516
+
517
+ ##
518
+ # Configuration RPC class for the CaseAttachmentService API.
519
+ #
520
+ # Includes fields providing the configuration for each RPC in this service.
521
+ # Each configuration object is of type `Gapic::Config::Method` and includes
522
+ # the following configuration fields:
523
+ #
524
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
525
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
526
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
527
+ # include the following keys:
528
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
529
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
530
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
531
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
532
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
533
+ # trigger a retry.
534
+ #
535
+ class Rpcs
536
+ ##
537
+ # RPC-specific configuration for `list_attachments`
538
+ # @return [::Gapic::Config::Method]
539
+ #
540
+ attr_reader :list_attachments
541
+ ##
542
+ # RPC-specific configuration for `get_attachment`
543
+ # @return [::Gapic::Config::Method]
544
+ #
545
+ attr_reader :get_attachment
546
+
547
+ # @private
548
+ def initialize parent_rpcs = nil
549
+ list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments
550
+ @list_attachments = ::Gapic::Config::Method.new list_attachments_config
551
+ get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
552
+ @get_attachment = ::Gapic::Config::Method.new get_attachment_config
553
+
554
+ yield self if block_given?
555
+ end
556
+ end
557
+ end
558
+ end
559
+ end
560
+ end
561
+ end
562
+ end
563
+ end
564
+ end