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

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 +75 -0
  9. data/lib/google/cloud/support/v2beta/case_attachment_service/client.rb +510 -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 +477 -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 +1526 -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 +1452 -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 +356 -0
  26. data/lib/google/cloud/support/v2beta/comment_pb.rb +49 -0
  27. data/lib/google/cloud/support/v2beta/comment_service/client.rb +639 -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 +599 -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 +117 -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 +105 -9
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/support/v2beta/feed_item.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/cloud/support/v2beta/attachment_pb'
9
+ require 'google/cloud/support/v2beta/comment_pb'
10
+ require 'google/cloud/support/v2beta/email_message_pb'
11
+ require 'google/protobuf/timestamp_pb'
12
+
13
+
14
+ descriptor_data = "\n+google/cloud/support/v2beta/feed_item.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/support/v2beta/attachment.proto\x1a)google/cloud/support/v2beta/comment.proto\x1a/google/cloud/support/v2beta/email_message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x02\n\x08\x46\x65\x65\x64Item\x12<\n\x07\x63omment\x18\x64 \x01(\x0b\x32$.google.cloud.support.v2beta.CommentB\x03\xe0\x41\x03H\x00\x12\x42\n\nattachment\x18\x65 \x01(\x0b\x32\'.google.cloud.support.v2beta.AttachmentB\x03\xe0\x41\x03H\x00\x12G\n\remail_message\x18\x66 \x01(\x0b\x32).google.cloud.support.v2beta.EmailMessageB\x03\xe0\x41\x03H\x00\x12J\n\x12\x64\x65leted_attachment\x18g \x01(\x0b\x32\'.google.cloud.support.v2beta.AttachmentB\x03\xe0\x41\x03H\x00\x12\x33\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x0e\n\x0c\x65vent_objectB\xca\x01\n\x1f\x63om.google.cloud.support.v2betaB\rFeedItemProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.cloud.support.v2beta.Comment", "google/cloud/support/v2beta/comment.proto"],
30
+ ["google.cloud.support.v2beta.Attachment", "google/cloud/support/v2beta/attachment.proto"],
31
+ ["google.cloud.support.v2beta.EmailMessage", "google/cloud/support/v2beta/email_message.proto"],
32
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
38
+ end
39
+ end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
42
+ end
43
+
44
+ module Google
45
+ module Cloud
46
+ module Support
47
+ module V2beta
48
+ FeedItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.FeedItem").msgclass
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,482 @@
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/feed_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Support
25
+ module V2beta
26
+ module FeedService
27
+ ##
28
+ # Client for the FeedService service.
29
+ #
30
+ # A service to view case feed items.
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 :feed_service_stub
43
+
44
+ ##
45
+ # Configure the FeedService Client class.
46
+ #
47
+ # See {::Google::Cloud::Support::V2beta::FeedService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all FeedService clients
53
+ # ::Google::Cloud::Support::V2beta::FeedService::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.show_feed.timeout = 60.0
74
+ default_config.rpcs.show_feed.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 FeedService 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::FeedService::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
+ @feed_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new FeedService client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Cloud::Support::V2beta::FeedService::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Cloud::Support::V2beta::FeedService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the FeedService 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/feed_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
+ @feed_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Cloud::Support::V2beta::FeedService::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
+ @feed_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
+ @feed_service_stub.logger
187
+ end
188
+
189
+ # Service calls
190
+
191
+ ##
192
+ # Show items in the feed of this case, including case emails,
193
+ # attachments, and comments.
194
+ #
195
+ # @overload show_feed(request, options = nil)
196
+ # Pass arguments to `show_feed` via a request object, either of type
197
+ # {::Google::Cloud::Support::V2beta::ShowFeedRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Cloud::Support::V2beta::ShowFeedRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload show_feed(parent: nil, order_by: nil, page_size: nil, page_token: nil)
206
+ # Pass arguments to `show_feed` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param parent [::String]
211
+ # Required. The resource name of the case for which feed items should be
212
+ # listed.
213
+ # @param order_by [::String]
214
+ # Optional. Field to order feed items by, followed by `asc` or `desc`
215
+ # postfix. The only valid field is
216
+ # `creation_time`. This list is case-insensitive, default sorting order is
217
+ # ascending, and the redundant space characters are insignificant.
218
+ #
219
+ # Example: `creation_time desc`
220
+ # @param page_size [::Integer]
221
+ # Optional. The maximum number of feed items fetched with each request.
222
+ # @param page_token [::String]
223
+ # Optional. A token identifying the page of results to return. If
224
+ # unspecified, it retrieves the first page.
225
+ #
226
+ # @yield [response, operation] Access the result along with the RPC operation
227
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::FeedItem>]
228
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
229
+ #
230
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::FeedItem>]
231
+ #
232
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
233
+ #
234
+ # @example Basic example
235
+ # require "google/cloud/support/v2beta"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Cloud::Support::V2beta::FeedService::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Cloud::Support::V2beta::ShowFeedRequest.new
242
+ #
243
+ # # Call the show_feed method.
244
+ # result = client.show_feed request
245
+ #
246
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
247
+ # # over elements, and API calls will be issued to fetch pages as needed.
248
+ # result.each do |item|
249
+ # # Each element is of type ::Google::Cloud::Support::V2beta::FeedItem.
250
+ # p item
251
+ # end
252
+ #
253
+ def show_feed request, options = nil
254
+ raise ::ArgumentError, "request must be provided" if request.nil?
255
+
256
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::ShowFeedRequest
257
+
258
+ # Converts hash and nil to an options object
259
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
260
+
261
+ # Customize the options with defaults
262
+ metadata = @config.rpcs.show_feed.metadata.to_h
263
+
264
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
265
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
266
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
267
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
268
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
269
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
270
+
271
+ header_params = {}
272
+ if request.parent
273
+ header_params["parent"] = request.parent
274
+ end
275
+
276
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
277
+ metadata[:"x-goog-request-params"] ||= request_params_header
278
+
279
+ options.apply_defaults timeout: @config.rpcs.show_feed.timeout,
280
+ metadata: metadata,
281
+ retry_policy: @config.rpcs.show_feed.retry_policy
282
+
283
+ options.apply_defaults timeout: @config.timeout,
284
+ metadata: @config.metadata,
285
+ retry_policy: @config.retry_policy
286
+
287
+ @feed_service_stub.call_rpc :show_feed, request, options: options do |response, operation|
288
+ response = ::Gapic::PagedEnumerable.new @feed_service_stub, :show_feed, request, response, operation, options
289
+ yield response, operation if block_given?
290
+ throw :response, response
291
+ end
292
+ rescue ::GRPC::BadStatus => e
293
+ raise ::Google::Cloud::Error.from_error(e)
294
+ end
295
+
296
+ ##
297
+ # Configuration class for the FeedService API.
298
+ #
299
+ # This class represents the configuration for FeedService,
300
+ # providing control over timeouts, retry behavior, logging, transport
301
+ # parameters, and other low-level controls. Certain parameters can also be
302
+ # applied individually to specific RPCs. See
303
+ # {::Google::Cloud::Support::V2beta::FeedService::Client::Configuration::Rpcs}
304
+ # for a list of RPCs that can be configured independently.
305
+ #
306
+ # Configuration can be applied globally to all clients, or to a single client
307
+ # on construction.
308
+ #
309
+ # @example
310
+ #
311
+ # # Modify the global config, setting the timeout for
312
+ # # show_feed to 20 seconds,
313
+ # # and all remaining timeouts to 10 seconds.
314
+ # ::Google::Cloud::Support::V2beta::FeedService::Client.configure do |config|
315
+ # config.timeout = 10.0
316
+ # config.rpcs.show_feed.timeout = 20.0
317
+ # end
318
+ #
319
+ # # Apply the above configuration only to a new client.
320
+ # client = ::Google::Cloud::Support::V2beta::FeedService::Client.new do |config|
321
+ # config.timeout = 10.0
322
+ # config.rpcs.show_feed.timeout = 20.0
323
+ # end
324
+ #
325
+ # @!attribute [rw] endpoint
326
+ # A custom service endpoint, as a hostname or hostname:port. The default is
327
+ # nil, indicating to use the default endpoint in the current universe domain.
328
+ # @return [::String,nil]
329
+ # @!attribute [rw] credentials
330
+ # Credentials to send with calls. You may provide any of the following types:
331
+ # * (`String`) The path to a service account key file in JSON format
332
+ # * (`Hash`) A service account key as a Hash
333
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
334
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
335
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
336
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
337
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
338
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
339
+ # * (`nil`) indicating no credentials
340
+ #
341
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
342
+ # external source for authentication to Google Cloud, you must validate it before
343
+ # providing it to a Google API client library. Providing an unvalidated credential
344
+ # configuration to Google APIs can compromise the security of your systems and data.
345
+ # For more information, refer to [Validate credential configurations from external
346
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
347
+ # @return [::Object]
348
+ # @!attribute [rw] scope
349
+ # The OAuth scopes
350
+ # @return [::Array<::String>]
351
+ # @!attribute [rw] lib_name
352
+ # The library name as recorded in instrumentation and logging
353
+ # @return [::String]
354
+ # @!attribute [rw] lib_version
355
+ # The library version as recorded in instrumentation and logging
356
+ # @return [::String]
357
+ # @!attribute [rw] channel_args
358
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
359
+ # `GRPC::Core::Channel` object is provided as the credential.
360
+ # @return [::Hash]
361
+ # @!attribute [rw] interceptors
362
+ # An array of interceptors that are run before calls are executed.
363
+ # @return [::Array<::GRPC::ClientInterceptor>]
364
+ # @!attribute [rw] timeout
365
+ # The call timeout in seconds.
366
+ # @return [::Numeric]
367
+ # @!attribute [rw] metadata
368
+ # Additional gRPC headers to be sent with the call.
369
+ # @return [::Hash{::Symbol=>::String}]
370
+ # @!attribute [rw] retry_policy
371
+ # The retry policy. The value is a hash with the following keys:
372
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
373
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
374
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
375
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
376
+ # trigger a retry.
377
+ # @return [::Hash]
378
+ # @!attribute [rw] quota_project
379
+ # A separate project against which to charge quota.
380
+ # @return [::String]
381
+ # @!attribute [rw] universe_domain
382
+ # The universe domain within which to make requests. This determines the
383
+ # default endpoint URL. The default value of nil uses the environment
384
+ # universe (usually the default "googleapis.com" universe).
385
+ # @return [::String,nil]
386
+ # @!attribute [rw] logger
387
+ # A custom logger to use for request/response debug logging, or the value
388
+ # `:default` (the default) to construct a default logger, or `nil` to
389
+ # explicitly disable logging.
390
+ # @return [::Logger,:default,nil]
391
+ #
392
+ class Configuration
393
+ extend ::Gapic::Config
394
+
395
+ # @private
396
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
397
+ DEFAULT_ENDPOINT = "cloudsupport.googleapis.com"
398
+
399
+ config_attr :endpoint, nil, ::String, nil
400
+ config_attr :credentials, nil do |value|
401
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
402
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
403
+ allowed.any? { |klass| klass === value }
404
+ end
405
+ config_attr :scope, nil, ::String, ::Array, nil
406
+ config_attr :lib_name, nil, ::String, nil
407
+ config_attr :lib_version, nil, ::String, nil
408
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
409
+ config_attr :interceptors, nil, ::Array, nil
410
+ config_attr :timeout, nil, ::Numeric, nil
411
+ config_attr :metadata, nil, ::Hash, nil
412
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
413
+ config_attr :quota_project, nil, ::String, nil
414
+ config_attr :universe_domain, nil, ::String, nil
415
+ config_attr :logger, :default, ::Logger, nil, :default
416
+
417
+ # @private
418
+ def initialize parent_config = nil
419
+ @parent_config = parent_config unless parent_config.nil?
420
+
421
+ yield self if block_given?
422
+ end
423
+
424
+ ##
425
+ # Configurations for individual RPCs
426
+ # @return [Rpcs]
427
+ #
428
+ def rpcs
429
+ @rpcs ||= begin
430
+ parent_rpcs = nil
431
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
432
+ Rpcs.new parent_rpcs
433
+ end
434
+ end
435
+
436
+ ##
437
+ # Configuration for the channel pool
438
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
439
+ #
440
+ def channel_pool
441
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
442
+ end
443
+
444
+ ##
445
+ # Configuration RPC class for the FeedService API.
446
+ #
447
+ # Includes fields providing the configuration for each RPC in this service.
448
+ # Each configuration object is of type `Gapic::Config::Method` and includes
449
+ # the following configuration fields:
450
+ #
451
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
452
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
453
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
454
+ # include 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
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
459
+ # trigger a retry.
460
+ #
461
+ class Rpcs
462
+ ##
463
+ # RPC-specific configuration for `show_feed`
464
+ # @return [::Gapic::Config::Method]
465
+ #
466
+ attr_reader :show_feed
467
+
468
+ # @private
469
+ def initialize parent_rpcs = nil
470
+ show_feed_config = parent_rpcs.show_feed if parent_rpcs.respond_to? :show_feed
471
+ @show_feed = ::Gapic::Config::Method.new show_feed_config
472
+
473
+ yield self if block_given?
474
+ end
475
+ end
476
+ end
477
+ end
478
+ end
479
+ end
480
+ end
481
+ end
482
+ 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 FeedService
26
+ # Credentials for the FeedService 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 FeedService
25
+ # Path helper methods for the FeedService 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