google-cloud-support-v2beta 0.a → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/support/v2beta/actor_pb.rb +44 -0
  6. data/lib/google/cloud/support/v2beta/attachment_pb.rb +49 -0
  7. data/lib/google/cloud/support/v2beta/attachment_service_pb.rb +50 -0
  8. data/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb +45 -0
  9. data/lib/google/cloud/support/v2beta/case_attachment_service/client.rb +480 -0
  10. data/lib/google/cloud/support/v2beta/case_attachment_service/credentials.rb +47 -0
  11. data/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb +72 -0
  12. data/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb +447 -0
  13. data/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb +149 -0
  14. data/lib/google/cloud/support/v2beta/case_attachment_service/rest.rb +52 -0
  15. data/lib/google/cloud/support/v2beta/case_attachment_service.rb +55 -0
  16. data/lib/google/cloud/support/v2beta/case_pb.rb +54 -0
  17. data/lib/google/cloud/support/v2beta/case_service/client.rb +1252 -0
  18. data/lib/google/cloud/support/v2beta/case_service/credentials.rb +47 -0
  19. data/lib/google/cloud/support/v2beta/case_service/paths.rb +100 -0
  20. data/lib/google/cloud/support/v2beta/case_service/rest/client.rb +1178 -0
  21. data/lib/google/cloud/support/v2beta/case_service/rest/service_stub.rb +624 -0
  22. data/lib/google/cloud/support/v2beta/case_service/rest.rb +52 -0
  23. data/lib/google/cloud/support/v2beta/case_service.rb +55 -0
  24. data/lib/google/cloud/support/v2beta/case_service_pb.rb +63 -0
  25. data/lib/google/cloud/support/v2beta/case_service_services_pb.rb +82 -0
  26. data/lib/google/cloud/support/v2beta/comment_pb.rb +49 -0
  27. data/lib/google/cloud/support/v2beta/comment_service/client.rb +571 -0
  28. data/lib/google/cloud/support/v2beta/comment_service/credentials.rb +47 -0
  29. data/lib/google/cloud/support/v2beta/comment_service/paths.rb +115 -0
  30. data/lib/google/cloud/support/v2beta/comment_service/rest/client.rb +531 -0
  31. data/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb +219 -0
  32. data/lib/google/cloud/support/v2beta/comment_service/rest.rb +52 -0
  33. data/lib/google/cloud/support/v2beta/comment_service.rb +55 -0
  34. data/lib/google/cloud/support/v2beta/comment_service_pb.rb +51 -0
  35. data/lib/google/cloud/support/v2beta/comment_service_services_pb.rb +49 -0
  36. data/lib/google/cloud/support/v2beta/content_pb.rb +42 -0
  37. data/lib/google/cloud/support/v2beta/email_message_pb.rb +51 -0
  38. data/lib/google/cloud/support/v2beta/escalation_pb.rb +45 -0
  39. data/lib/google/cloud/support/v2beta/feed_item_pb.rb +52 -0
  40. data/lib/google/cloud/support/v2beta/feed_service/client.rb +482 -0
  41. data/lib/google/cloud/support/v2beta/feed_service/credentials.rb +47 -0
  42. data/lib/google/cloud/support/v2beta/feed_service/paths.rb +72 -0
  43. data/lib/google/cloud/support/v2beta/feed_service/rest/client.rb +449 -0
  44. data/lib/google/cloud/support/v2beta/feed_service/rest/service_stub.rb +149 -0
  45. data/lib/google/cloud/support/v2beta/feed_service/rest.rb +52 -0
  46. data/lib/google/cloud/support/v2beta/feed_service.rb +55 -0
  47. data/lib/google/cloud/support/v2beta/feed_service_pb.rb +50 -0
  48. data/lib/google/cloud/support/v2beta/feed_service_services_pb.rb +46 -0
  49. data/lib/google/cloud/support/v2beta/rest.rb +40 -0
  50. data/lib/google/cloud/support/v2beta/version.rb +7 -2
  51. data/lib/google/cloud/support/v2beta.rb +48 -0
  52. data/lib/google-cloud-support-v2beta.rb +21 -0
  53. data/proto_docs/README.md +4 -0
  54. data/proto_docs/google/api/client.rb +473 -0
  55. data/proto_docs/google/api/field_behavior.rb +85 -0
  56. data/proto_docs/google/api/launch_stage.rb +71 -0
  57. data/proto_docs/google/api/resource.rb +227 -0
  58. data/proto_docs/google/cloud/support/v2beta/actor.rb +59 -0
  59. data/proto_docs/google/cloud/support/v2beta/attachment.rb +58 -0
  60. data/proto_docs/google/cloud/support/v2beta/attachment_service.rb +63 -0
  61. data/proto_docs/google/cloud/support/v2beta/case.rb +215 -0
  62. data/proto_docs/google/cloud/support/v2beta/case_service.rb +245 -0
  63. data/proto_docs/google/cloud/support/v2beta/comment.rb +58 -0
  64. data/proto_docs/google/cloud/support/v2beta/comment_service.rb +68 -0
  65. data/proto_docs/google/cloud/support/v2beta/content.rb +35 -0
  66. data/proto_docs/google/cloud/support/v2beta/email_message.rb +55 -0
  67. data/proto_docs/google/cloud/support/v2beta/escalation.rb +55 -0
  68. data/proto_docs/google/cloud/support/v2beta/feed_item.rb +56 -0
  69. data/proto_docs/google/cloud/support/v2beta/feed_service.rb +65 -0
  70. data/proto_docs/google/protobuf/duration.rb +98 -0
  71. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  72. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  73. metadata +106 -10
@@ -0,0 +1,480 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/v2beta/attachment_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Support
25
+ module V2beta
26
+ module CaseAttachmentService
27
+ ##
28
+ # Client for the CaseAttachmentService service.
29
+ #
30
+ # A service to manage file attachments for Google Cloud support cases.
31
+ #
32
+ class Client
33
+ # @private
34
+ API_VERSION = ""
35
+
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudsupport.$UNIVERSE_DOMAIN$"
38
+
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :case_attachment_service_stub
43
+
44
+ ##
45
+ # Configure the CaseAttachmentService Client class.
46
+ #
47
+ # See {::Google::Cloud::Support::V2beta::CaseAttachmentService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all CaseAttachmentService clients
53
+ # ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "Support", "V2beta"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.rpcs.list_attachments.timeout = 60.0
74
+ default_config.rpcs.list_attachments.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the CaseAttachmentService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Cloud::Support::V2beta::CaseAttachmentService::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # The effective universe domain
106
+ #
107
+ # @return [String]
108
+ #
109
+ def universe_domain
110
+ @case_attachment_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new CaseAttachmentService client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the CaseAttachmentService client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ def initialize
130
+ # These require statements are intentionally placed here to initialize
131
+ # the gRPC module only when it's required.
132
+ # See https://github.com/googleapis/toolkit/issues/446
133
+ require "gapic/grpc"
134
+ require "google/cloud/support/v2beta/attachment_service_services_pb"
135
+
136
+ # Create the configuration object
137
+ @config = Configuration.new Client.configure
138
+
139
+ # Yield the configuration if needed
140
+ yield @config if block_given?
141
+
142
+ # Create credentials
143
+ credentials = @config.credentials
144
+ # Use self-signed JWT if the endpoint is unchanged from default,
145
+ # but only if the default endpoint does not have a region prefix.
146
+ enable_self_signed_jwt = @config.endpoint.nil? ||
147
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
+ !@config.endpoint.split(".").first.include?("-"))
149
+ credentials ||= Credentials.default scope: @config.scope,
150
+ enable_self_signed_jwt: enable_self_signed_jwt
151
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
152
+ credentials = Credentials.new credentials, scope: @config.scope
153
+ end
154
+ @quota_project_id = @config.quota_project
155
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
156
+
157
+ @case_attachment_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Cloud::Support::V2beta::CaseAttachmentService::Stub,
159
+ credentials: credentials,
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ channel_args: @config.channel_args,
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool,
166
+ logger: @config.logger
167
+ )
168
+
169
+ @case_attachment_service_stub.stub_logger&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+ end
179
+
180
+ ##
181
+ # The logger used for request/response debug logging.
182
+ #
183
+ # @return [Logger]
184
+ #
185
+ def logger
186
+ @case_attachment_service_stub.logger
187
+ end
188
+
189
+ # Service calls
190
+
191
+ ##
192
+ # List all the attachments associated with a support case.
193
+ #
194
+ # @overload list_attachments(request, options = nil)
195
+ # Pass arguments to `list_attachments` via a request object, either of type
196
+ # {::Google::Cloud::Support::V2beta::ListAttachmentsRequest} or an equivalent Hash.
197
+ #
198
+ # @param request [::Google::Cloud::Support::V2beta::ListAttachmentsRequest, ::Hash]
199
+ # A request object representing the call parameters. Required. To specify no
200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
201
+ # @param options [::Gapic::CallOptions, ::Hash]
202
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
203
+ #
204
+ # @overload list_attachments(parent: nil, page_size: nil, page_token: nil)
205
+ # Pass arguments to `list_attachments` via keyword arguments. Note that at
206
+ # least one keyword argument is required. To specify no parameters, or to keep all
207
+ # the default parameter values, pass an empty Hash as a request object (see above).
208
+ #
209
+ # @param parent [::String]
210
+ # Required. The name of the case for which attachments should be listed.
211
+ # @param page_size [::Integer]
212
+ # The maximum number of attachments fetched with each request.
213
+ #
214
+ # If not provided, the default is 10. The maximum page size that will be
215
+ # returned is 100.
216
+ #
217
+ # The size of each page can be smaller than the requested page size and can
218
+ # include zero. For example, you could request 100 attachments on one page,
219
+ # receive 0, and then on the next page, receive 90.
220
+ # @param page_token [::String]
221
+ # A token identifying the page of results to return. If unspecified, the
222
+ # first page is retrieved.
223
+ #
224
+ # @yield [response, operation] Access the result along with the RPC operation
225
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Attachment>]
226
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
227
+ #
228
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Attachment>]
229
+ #
230
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
231
+ #
232
+ # @example Basic example
233
+ # require "google/cloud/support/v2beta"
234
+ #
235
+ # # Create a client object. The client can be reused for multiple calls.
236
+ # client = Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new
237
+ #
238
+ # # Create a request. To set request fields, pass in keyword arguments.
239
+ # request = Google::Cloud::Support::V2beta::ListAttachmentsRequest.new
240
+ #
241
+ # # Call the list_attachments method.
242
+ # result = client.list_attachments request
243
+ #
244
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
245
+ # # over elements, and API calls will be issued to fetch pages as needed.
246
+ # result.each do |item|
247
+ # # Each element is of type ::Google::Cloud::Support::V2beta::Attachment.
248
+ # p item
249
+ # end
250
+ #
251
+ def list_attachments request, options = nil
252
+ raise ::ArgumentError, "request must be provided" if request.nil?
253
+
254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::ListAttachmentsRequest
255
+
256
+ # Converts hash and nil to an options object
257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
258
+
259
+ # Customize the options with defaults
260
+ metadata = @config.rpcs.list_attachments.metadata.to_h
261
+
262
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
263
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
265
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
266
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
267
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
268
+
269
+ header_params = {}
270
+ if request.parent
271
+ header_params["parent"] = request.parent
272
+ end
273
+
274
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
275
+ metadata[:"x-goog-request-params"] ||= request_params_header
276
+
277
+ options.apply_defaults timeout: @config.rpcs.list_attachments.timeout,
278
+ metadata: metadata,
279
+ retry_policy: @config.rpcs.list_attachments.retry_policy
280
+
281
+ options.apply_defaults timeout: @config.timeout,
282
+ metadata: @config.metadata,
283
+ retry_policy: @config.retry_policy
284
+
285
+ @case_attachment_service_stub.call_rpc :list_attachments, request, options: options do |response, operation|
286
+ response = ::Gapic::PagedEnumerable.new @case_attachment_service_stub, :list_attachments, request, response, operation, options
287
+ yield response, operation if block_given?
288
+ throw :response, response
289
+ end
290
+ rescue ::GRPC::BadStatus => e
291
+ raise ::Google::Cloud::Error.from_error(e)
292
+ end
293
+
294
+ ##
295
+ # Configuration class for the CaseAttachmentService API.
296
+ #
297
+ # This class represents the configuration for CaseAttachmentService,
298
+ # providing control over timeouts, retry behavior, logging, transport
299
+ # parameters, and other low-level controls. Certain parameters can also be
300
+ # applied individually to specific RPCs. See
301
+ # {::Google::Cloud::Support::V2beta::CaseAttachmentService::Client::Configuration::Rpcs}
302
+ # for a list of RPCs that can be configured independently.
303
+ #
304
+ # Configuration can be applied globally to all clients, or to a single client
305
+ # on construction.
306
+ #
307
+ # @example
308
+ #
309
+ # # Modify the global config, setting the timeout for
310
+ # # list_attachments to 20 seconds,
311
+ # # and all remaining timeouts to 10 seconds.
312
+ # ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.configure do |config|
313
+ # config.timeout = 10.0
314
+ # config.rpcs.list_attachments.timeout = 20.0
315
+ # end
316
+ #
317
+ # # Apply the above configuration only to a new client.
318
+ # client = ::Google::Cloud::Support::V2beta::CaseAttachmentService::Client.new do |config|
319
+ # config.timeout = 10.0
320
+ # config.rpcs.list_attachments.timeout = 20.0
321
+ # end
322
+ #
323
+ # @!attribute [rw] endpoint
324
+ # A custom service endpoint, as a hostname or hostname:port. The default is
325
+ # nil, indicating to use the default endpoint in the current universe domain.
326
+ # @return [::String,nil]
327
+ # @!attribute [rw] credentials
328
+ # Credentials to send with calls. You may provide any of the following types:
329
+ # * (`String`) The path to a service account key file in JSON format
330
+ # * (`Hash`) A service account key as a Hash
331
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
332
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
333
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
334
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
335
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
336
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
337
+ # * (`nil`) indicating no credentials
338
+ #
339
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
340
+ # external source for authentication to Google Cloud, you must validate it before
341
+ # providing it to a Google API client library. Providing an unvalidated credential
342
+ # configuration to Google APIs can compromise the security of your systems and data.
343
+ # For more information, refer to [Validate credential configurations from external
344
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
345
+ # @return [::Object]
346
+ # @!attribute [rw] scope
347
+ # The OAuth scopes
348
+ # @return [::Array<::String>]
349
+ # @!attribute [rw] lib_name
350
+ # The library name as recorded in instrumentation and logging
351
+ # @return [::String]
352
+ # @!attribute [rw] lib_version
353
+ # The library version as recorded in instrumentation and logging
354
+ # @return [::String]
355
+ # @!attribute [rw] channel_args
356
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
357
+ # `GRPC::Core::Channel` object is provided as the credential.
358
+ # @return [::Hash]
359
+ # @!attribute [rw] interceptors
360
+ # An array of interceptors that are run before calls are executed.
361
+ # @return [::Array<::GRPC::ClientInterceptor>]
362
+ # @!attribute [rw] timeout
363
+ # The call timeout in seconds.
364
+ # @return [::Numeric]
365
+ # @!attribute [rw] metadata
366
+ # Additional gRPC headers to be sent with the call.
367
+ # @return [::Hash{::Symbol=>::String}]
368
+ # @!attribute [rw] retry_policy
369
+ # The retry policy. The value is a hash with the following keys:
370
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
371
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
372
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
373
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
374
+ # trigger a retry.
375
+ # @return [::Hash]
376
+ # @!attribute [rw] quota_project
377
+ # A separate project against which to charge quota.
378
+ # @return [::String]
379
+ # @!attribute [rw] universe_domain
380
+ # The universe domain within which to make requests. This determines the
381
+ # default endpoint URL. The default value of nil uses the environment
382
+ # universe (usually the default "googleapis.com" universe).
383
+ # @return [::String,nil]
384
+ # @!attribute [rw] logger
385
+ # A custom logger to use for request/response debug logging, or the value
386
+ # `:default` (the default) to construct a default logger, or `nil` to
387
+ # explicitly disable logging.
388
+ # @return [::Logger,:default,nil]
389
+ #
390
+ class Configuration
391
+ extend ::Gapic::Config
392
+
393
+ # @private
394
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
395
+ DEFAULT_ENDPOINT = "cloudsupport.googleapis.com"
396
+
397
+ config_attr :endpoint, nil, ::String, nil
398
+ config_attr :credentials, nil do |value|
399
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
400
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
401
+ allowed.any? { |klass| klass === value }
402
+ end
403
+ config_attr :scope, nil, ::String, ::Array, nil
404
+ config_attr :lib_name, nil, ::String, nil
405
+ config_attr :lib_version, nil, ::String, nil
406
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
407
+ config_attr :interceptors, nil, ::Array, nil
408
+ config_attr :timeout, nil, ::Numeric, nil
409
+ config_attr :metadata, nil, ::Hash, nil
410
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
411
+ config_attr :quota_project, nil, ::String, nil
412
+ config_attr :universe_domain, nil, ::String, nil
413
+ config_attr :logger, :default, ::Logger, nil, :default
414
+
415
+ # @private
416
+ def initialize parent_config = nil
417
+ @parent_config = parent_config unless parent_config.nil?
418
+
419
+ yield self if block_given?
420
+ end
421
+
422
+ ##
423
+ # Configurations for individual RPCs
424
+ # @return [Rpcs]
425
+ #
426
+ def rpcs
427
+ @rpcs ||= begin
428
+ parent_rpcs = nil
429
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
430
+ Rpcs.new parent_rpcs
431
+ end
432
+ end
433
+
434
+ ##
435
+ # Configuration for the channel pool
436
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
437
+ #
438
+ def channel_pool
439
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
440
+ end
441
+
442
+ ##
443
+ # Configuration RPC class for the CaseAttachmentService API.
444
+ #
445
+ # Includes fields providing the configuration for each RPC in this service.
446
+ # Each configuration object is of type `Gapic::Config::Method` and includes
447
+ # the following configuration fields:
448
+ #
449
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
450
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
451
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
452
+ # include the following keys:
453
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
454
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
455
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
456
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
457
+ # trigger a retry.
458
+ #
459
+ class Rpcs
460
+ ##
461
+ # RPC-specific configuration for `list_attachments`
462
+ # @return [::Gapic::Config::Method]
463
+ #
464
+ attr_reader :list_attachments
465
+
466
+ # @private
467
+ def initialize parent_rpcs = nil
468
+ list_attachments_config = parent_rpcs.list_attachments if parent_rpcs.respond_to? :list_attachments
469
+ @list_attachments = ::Gapic::Config::Method.new list_attachments_config
470
+
471
+ yield self if block_given?
472
+ end
473
+ end
474
+ end
475
+ end
476
+ end
477
+ end
478
+ end
479
+ end
480
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Support
24
+ module V2beta
25
+ module CaseAttachmentService
26
+ # Credentials for the CaseAttachmentService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+
20
+ module Google
21
+ module Cloud
22
+ module Support
23
+ module V2beta
24
+ module CaseAttachmentService
25
+ # Path helper methods for the CaseAttachmentService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Case resource string.
29
+ #
30
+ # @overload case_path(organization:, case:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `organizations/{organization}/cases/{case}`
34
+ #
35
+ # @param organization [String]
36
+ # @param case [String]
37
+ #
38
+ # @overload case_path(project:, case:)
39
+ # The resource will be in the following format:
40
+ #
41
+ # `projects/{project}/cases/{case}`
42
+ #
43
+ # @param project [String]
44
+ # @param case [String]
45
+ #
46
+ # @return [::String]
47
+ def case_path **args
48
+ resources = {
49
+ "case:organization" => (proc do |organization:, case:|
50
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
51
+
52
+ "organizations/#{organization}/cases/#{binding.local_variable_get :case}"
53
+ end),
54
+ "case:project" => (proc do |project:, case:|
55
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
56
+
57
+ "projects/#{project}/cases/#{binding.local_variable_get :case}"
58
+ end)
59
+ }
60
+
61
+ resource = resources[args.keys.sort.join(":")]
62
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
63
+ resource.call(**args)
64
+ end
65
+
66
+ extend self
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end