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,1526 @@
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/case_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Support
25
+ module V2beta
26
+ module CaseService
27
+ ##
28
+ # Client for the CaseService service.
29
+ #
30
+ # A service to manage 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_service_stub
43
+
44
+ ##
45
+ # Configure the CaseService Client class.
46
+ #
47
+ # See {::Google::Cloud::Support::V2beta::CaseService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all CaseService clients
53
+ # ::Google::Cloud::Support::V2beta::CaseService::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.get_case.timeout = 60.0
74
+ default_config.rpcs.get_case.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config.rpcs.list_cases.timeout = 60.0
79
+ default_config.rpcs.list_cases.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
83
+ default_config.rpcs.search_cases.timeout = 60.0
84
+ default_config.rpcs.search_cases.retry_policy = {
85
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
86
+ }
87
+
88
+ default_config.rpcs.create_case.timeout = 60.0
89
+
90
+ default_config.rpcs.update_case.timeout = 60.0
91
+
92
+ default_config.rpcs.escalate_case.timeout = 60.0
93
+
94
+ default_config.rpcs.close_case.timeout = 60.0
95
+
96
+ default_config.rpcs.search_case_classifications.timeout = 60.0
97
+ default_config.rpcs.search_case_classifications.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config
102
+ end
103
+ yield @configure if block_given?
104
+ @configure
105
+ end
106
+
107
+ ##
108
+ # Configure the CaseService Client instance.
109
+ #
110
+ # The configuration is set to the derived mode, meaning that values can be changed,
111
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
112
+ # should be made on {Client.configure}.
113
+ #
114
+ # See {::Google::Cloud::Support::V2beta::CaseService::Client::Configuration}
115
+ # for a description of the configuration fields.
116
+ #
117
+ # @yield [config] Configure the Client client.
118
+ # @yieldparam config [Client::Configuration]
119
+ #
120
+ # @return [Client::Configuration]
121
+ #
122
+ def configure
123
+ yield @config if block_given?
124
+ @config
125
+ end
126
+
127
+ ##
128
+ # The effective universe domain
129
+ #
130
+ # @return [String]
131
+ #
132
+ def universe_domain
133
+ @case_service_stub.universe_domain
134
+ end
135
+
136
+ ##
137
+ # Create a new CaseService client object.
138
+ #
139
+ # @example
140
+ #
141
+ # # Create a client using the default configuration
142
+ # client = ::Google::Cloud::Support::V2beta::CaseService::Client.new
143
+ #
144
+ # # Create a client using a custom configuration
145
+ # client = ::Google::Cloud::Support::V2beta::CaseService::Client.new do |config|
146
+ # config.timeout = 10.0
147
+ # end
148
+ #
149
+ # @yield [config] Configure the CaseService client.
150
+ # @yieldparam config [Client::Configuration]
151
+ #
152
+ def initialize
153
+ # These require statements are intentionally placed here to initialize
154
+ # the gRPC module only when it's required.
155
+ # See https://github.com/googleapis/toolkit/issues/446
156
+ require "gapic/grpc"
157
+ require "google/cloud/support/v2beta/case_service_services_pb"
158
+
159
+ # Create the configuration object
160
+ @config = Configuration.new Client.configure
161
+
162
+ # Yield the configuration if needed
163
+ yield @config if block_given?
164
+
165
+ # Create credentials
166
+ credentials = @config.credentials
167
+ # Use self-signed JWT if the endpoint is unchanged from default,
168
+ # but only if the default endpoint does not have a region prefix.
169
+ enable_self_signed_jwt = @config.endpoint.nil? ||
170
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
171
+ !@config.endpoint.split(".").first.include?("-"))
172
+ credentials ||= Credentials.default scope: @config.scope,
173
+ enable_self_signed_jwt: enable_self_signed_jwt
174
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
175
+ credentials = Credentials.new credentials, scope: @config.scope
176
+ end
177
+ @quota_project_id = @config.quota_project
178
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
179
+
180
+ @case_service_stub = ::Gapic::ServiceStub.new(
181
+ ::Google::Cloud::Support::V2beta::CaseService::Stub,
182
+ credentials: credentials,
183
+ endpoint: @config.endpoint,
184
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
185
+ universe_domain: @config.universe_domain,
186
+ channel_args: @config.channel_args,
187
+ interceptors: @config.interceptors,
188
+ channel_pool_config: @config.channel_pool,
189
+ logger: @config.logger
190
+ )
191
+
192
+ @case_service_stub.stub_logger&.info do |entry|
193
+ entry.set_system_name
194
+ entry.set_service
195
+ entry.message = "Created client for #{entry.service}"
196
+ entry.set_credentials_fields credentials
197
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
198
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
199
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
200
+ end
201
+ end
202
+
203
+ ##
204
+ # The logger used for request/response debug logging.
205
+ #
206
+ # @return [Logger]
207
+ #
208
+ def logger
209
+ @case_service_stub.logger
210
+ end
211
+
212
+ # Service calls
213
+
214
+ ##
215
+ # Retrieve a case.
216
+ #
217
+ # EXAMPLES:
218
+ #
219
+ # cURL:
220
+ #
221
+ # ```shell
222
+ # case="projects/some-project/cases/16033687"
223
+ # curl \
224
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
225
+ # "https://cloudsupport.googleapis.com/v2/$case"
226
+ # ```
227
+ #
228
+ # Python:
229
+ #
230
+ # ```python
231
+ # import googleapiclient.discovery
232
+ #
233
+ # api_version = "v2"
234
+ # supportApiService = googleapiclient.discovery.build(
235
+ # serviceName="cloudsupport",
236
+ # version=api_version,
237
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
238
+ # )
239
+ #
240
+ # request = supportApiService.cases().get(
241
+ # name="projects/some-project/cases/43595344",
242
+ # )
243
+ # print(request.execute())
244
+ # ```
245
+ #
246
+ # @overload get_case(request, options = nil)
247
+ # Pass arguments to `get_case` via a request object, either of type
248
+ # {::Google::Cloud::Support::V2beta::GetCaseRequest} or an equivalent Hash.
249
+ #
250
+ # @param request [::Google::Cloud::Support::V2beta::GetCaseRequest, ::Hash]
251
+ # A request object representing the call parameters. Required. To specify no
252
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
253
+ # @param options [::Gapic::CallOptions, ::Hash]
254
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
255
+ #
256
+ # @overload get_case(name: nil)
257
+ # Pass arguments to `get_case` via keyword arguments. Note that at
258
+ # least one keyword argument is required. To specify no parameters, or to keep all
259
+ # the default parameter values, pass an empty Hash as a request object (see above).
260
+ #
261
+ # @param name [::String]
262
+ # Required. The full name of a case to be retrieved.
263
+ #
264
+ # @yield [response, operation] Access the result along with the RPC operation
265
+ # @yieldparam response [::Google::Cloud::Support::V2beta::Case]
266
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
267
+ #
268
+ # @return [::Google::Cloud::Support::V2beta::Case]
269
+ #
270
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
+ #
272
+ # @example Basic example
273
+ # require "google/cloud/support/v2beta"
274
+ #
275
+ # # Create a client object. The client can be reused for multiple calls.
276
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
277
+ #
278
+ # # Create a request. To set request fields, pass in keyword arguments.
279
+ # request = Google::Cloud::Support::V2beta::GetCaseRequest.new
280
+ #
281
+ # # Call the get_case method.
282
+ # result = client.get_case request
283
+ #
284
+ # # The returned object is of type Google::Cloud::Support::V2beta::Case.
285
+ # p result
286
+ #
287
+ def get_case request, options = nil
288
+ raise ::ArgumentError, "request must be provided" if request.nil?
289
+
290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::GetCaseRequest
291
+
292
+ # Converts hash and nil to an options object
293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
294
+
295
+ # Customize the options with defaults
296
+ metadata = @config.rpcs.get_case.metadata.to_h
297
+
298
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
299
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
301
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
302
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
303
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
304
+
305
+ header_params = {}
306
+ if request.name
307
+ header_params["name"] = request.name
308
+ end
309
+
310
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
+ metadata[:"x-goog-request-params"] ||= request_params_header
312
+
313
+ options.apply_defaults timeout: @config.rpcs.get_case.timeout,
314
+ metadata: metadata,
315
+ retry_policy: @config.rpcs.get_case.retry_policy
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
319
+ retry_policy: @config.retry_policy
320
+
321
+ @case_service_stub.call_rpc :get_case, request, options: options do |response, operation|
322
+ yield response, operation if block_given?
323
+ end
324
+ rescue ::GRPC::BadStatus => e
325
+ raise ::Google::Cloud::Error.from_error(e)
326
+ end
327
+
328
+ ##
329
+ # Retrieve all cases under a parent, but not its children.
330
+ #
331
+ # For example, listing cases under an organization only returns the cases
332
+ # that are directly parented by that organization. To retrieve cases
333
+ # under an organization and its projects, use `cases.search`.
334
+ #
335
+ # EXAMPLES:
336
+ #
337
+ # cURL:
338
+ #
339
+ # ```shell
340
+ # parent="projects/some-project"
341
+ # curl \
342
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
343
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases"
344
+ # ```
345
+ #
346
+ # Python:
347
+ #
348
+ # ```python
349
+ # import googleapiclient.discovery
350
+ #
351
+ # api_version = "v2"
352
+ # supportApiService = googleapiclient.discovery.build(
353
+ # serviceName="cloudsupport",
354
+ # version=api_version,
355
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
356
+ # )
357
+ #
358
+ # request =
359
+ # supportApiService.cases().list(parent="projects/some-project")
360
+ # print(request.execute())
361
+ # ```
362
+ #
363
+ # @overload list_cases(request, options = nil)
364
+ # Pass arguments to `list_cases` via a request object, either of type
365
+ # {::Google::Cloud::Support::V2beta::ListCasesRequest} or an equivalent Hash.
366
+ #
367
+ # @param request [::Google::Cloud::Support::V2beta::ListCasesRequest, ::Hash]
368
+ # A request object representing the call parameters. Required. To specify no
369
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
370
+ # @param options [::Gapic::CallOptions, ::Hash]
371
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
372
+ #
373
+ # @overload list_cases(parent: nil, filter: nil, page_size: nil, page_token: nil, product_line: nil)
374
+ # Pass arguments to `list_cases` via keyword arguments. Note that at
375
+ # least one keyword argument is required. To specify no parameters, or to keep all
376
+ # the default parameter values, pass an empty Hash as a request object (see above).
377
+ #
378
+ # @param parent [::String]
379
+ # Required. The name of a parent to list cases under.
380
+ # @param filter [::String]
381
+ # An expression used to filter cases.
382
+ #
383
+ # If it's an empty string, then no filtering happens. Otherwise, the endpoint
384
+ # returns the cases that match the filter.
385
+ #
386
+ # Expressions use the following fields separated by `AND` and specified with
387
+ # `=`:
388
+ #
389
+ # - `state`: Can be `OPEN` or `CLOSED`.
390
+ # - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You
391
+ # can specify multiple values for priority using the `OR` operator. For
392
+ # example, `priority=P1 OR priority=P2`.
393
+ # - `creator.email`: The email address of the case creator.
394
+ #
395
+ # EXAMPLES:
396
+ #
397
+ # - `state=CLOSED`
398
+ # - `state=OPEN AND creator.email="tester@example.com"`
399
+ # - `state=OPEN AND (priority=P0 OR priority=P1)`
400
+ # @param page_size [::Integer]
401
+ # The maximum number of cases fetched with each request. Defaults to 10.
402
+ # @param page_token [::String]
403
+ # A token identifying the page of results to return. If unspecified, the
404
+ # first page is retrieved.
405
+ # @param product_line [::Google::Cloud::Support::V2beta::ProductLine]
406
+ # The product line to request cases for. If unspecified, only
407
+ # Google Cloud cases will be returned.
408
+ #
409
+ # @yield [response, operation] Access the result along with the RPC operation
410
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Case>]
411
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
412
+ #
413
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Case>]
414
+ #
415
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
416
+ #
417
+ # @example Basic example
418
+ # require "google/cloud/support/v2beta"
419
+ #
420
+ # # Create a client object. The client can be reused for multiple calls.
421
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
422
+ #
423
+ # # Create a request. To set request fields, pass in keyword arguments.
424
+ # request = Google::Cloud::Support::V2beta::ListCasesRequest.new
425
+ #
426
+ # # Call the list_cases method.
427
+ # result = client.list_cases request
428
+ #
429
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
430
+ # # over elements, and API calls will be issued to fetch pages as needed.
431
+ # result.each do |item|
432
+ # # Each element is of type ::Google::Cloud::Support::V2beta::Case.
433
+ # p item
434
+ # end
435
+ #
436
+ def list_cases request, options = nil
437
+ raise ::ArgumentError, "request must be provided" if request.nil?
438
+
439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::ListCasesRequest
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
+ metadata = @config.rpcs.list_cases.metadata.to_h
446
+
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
448
+ 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::Cloud::Support::V2beta::VERSION
451
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
452
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
453
+
454
+ header_params = {}
455
+ if request.parent
456
+ header_params["parent"] = request.parent
457
+ end
458
+
459
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
460
+ metadata[:"x-goog-request-params"] ||= request_params_header
461
+
462
+ options.apply_defaults timeout: @config.rpcs.list_cases.timeout,
463
+ metadata: metadata,
464
+ retry_policy: @config.rpcs.list_cases.retry_policy
465
+
466
+ options.apply_defaults timeout: @config.timeout,
467
+ metadata: @config.metadata,
468
+ retry_policy: @config.retry_policy
469
+
470
+ @case_service_stub.call_rpc :list_cases, request, options: options do |response, operation|
471
+ response = ::Gapic::PagedEnumerable.new @case_service_stub, :list_cases, request, response, operation, options
472
+ yield response, operation if block_given?
473
+ throw :response, response
474
+ end
475
+ rescue ::GRPC::BadStatus => e
476
+ raise ::Google::Cloud::Error.from_error(e)
477
+ end
478
+
479
+ ##
480
+ # Search for cases using a query.
481
+ #
482
+ # EXAMPLES:
483
+ #
484
+ # cURL:
485
+ #
486
+ # ```shell
487
+ # parent="projects/some-project"
488
+ # curl \
489
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
490
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases:search"
491
+ # ```
492
+ #
493
+ # Python:
494
+ #
495
+ # ```python
496
+ # import googleapiclient.discovery
497
+ #
498
+ # api_version = "v2"
499
+ # supportApiService = googleapiclient.discovery.build(
500
+ # serviceName="cloudsupport",
501
+ # version=api_version,
502
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
503
+ # )
504
+ # request = supportApiService.cases().search(
505
+ # parent="projects/some-project", query="state=OPEN"
506
+ # )
507
+ # print(request.execute())
508
+ # ```
509
+ #
510
+ # @overload search_cases(request, options = nil)
511
+ # Pass arguments to `search_cases` via a request object, either of type
512
+ # {::Google::Cloud::Support::V2beta::SearchCasesRequest} or an equivalent Hash.
513
+ #
514
+ # @param request [::Google::Cloud::Support::V2beta::SearchCasesRequest, ::Hash]
515
+ # A request object representing the call parameters. Required. To specify no
516
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
517
+ # @param options [::Gapic::CallOptions, ::Hash]
518
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
519
+ #
520
+ # @overload search_cases(parent: nil, query: nil, page_size: nil, page_token: nil)
521
+ # Pass arguments to `search_cases` via keyword arguments. Note that at
522
+ # least one keyword argument is required. To specify no parameters, or to keep all
523
+ # the default parameter values, pass an empty Hash as a request object (see above).
524
+ #
525
+ # @param parent [::String]
526
+ # The name of the parent resource to search for cases under.
527
+ # @param query [::String]
528
+ # An expression used to filter cases.
529
+ #
530
+ # Expressions use the following fields separated by `AND` and specified with
531
+ # `=`:
532
+ #
533
+ # - `organization`: An organization name in the form
534
+ # `organizations/<organization_id>`.
535
+ # - `project`: A project name in the form `projects/<project_id>`.
536
+ # - `state`: Can be `OPEN` or `CLOSED`.
537
+ # - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You
538
+ # can specify multiple values for priority using the `OR` operator. For
539
+ # example, `priority=P1 OR priority=P2`.
540
+ # - `creator.email`: The email address of the case creator.
541
+ #
542
+ # You must specify either `organization` or `project`.
543
+ #
544
+ # To search across `displayName`, `description`, and comments, use a global
545
+ # restriction with no keyword or operator. For example, `"my search"`.
546
+ #
547
+ # To search only cases updated after a certain date, use `update_time`
548
+ # restricted with that particular date, time, and timezone in ISO datetime
549
+ # format. For example, `update_time>"2020-01-01T00:00:00-05:00"`.
550
+ # `update_time` only supports the greater than operator (`>`).
551
+ #
552
+ # Examples:
553
+ #
554
+ # - `organization="organizations/123456789"`
555
+ # - `project="projects/my-project-id"`
556
+ # - `project="projects/123456789"`
557
+ # - `organization="organizations/123456789" AND state=CLOSED`
558
+ # - `project="projects/my-project-id" AND creator.email="tester@example.com"`
559
+ # - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)`
560
+ # @param page_size [::Integer]
561
+ # The maximum number of cases fetched with each request. The default page
562
+ # size is 10.
563
+ # @param page_token [::String]
564
+ # A token identifying the page of results to return. If unspecified, the
565
+ # first page is retrieved.
566
+ #
567
+ # @yield [response, operation] Access the result along with the RPC operation
568
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Case>]
569
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
570
+ #
571
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::Case>]
572
+ #
573
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
+ #
575
+ # @example Basic example
576
+ # require "google/cloud/support/v2beta"
577
+ #
578
+ # # Create a client object. The client can be reused for multiple calls.
579
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
580
+ #
581
+ # # Create a request. To set request fields, pass in keyword arguments.
582
+ # request = Google::Cloud::Support::V2beta::SearchCasesRequest.new
583
+ #
584
+ # # Call the search_cases method.
585
+ # result = client.search_cases request
586
+ #
587
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
588
+ # # over elements, and API calls will be issued to fetch pages as needed.
589
+ # result.each do |item|
590
+ # # Each element is of type ::Google::Cloud::Support::V2beta::Case.
591
+ # p item
592
+ # end
593
+ #
594
+ def search_cases request, options = nil
595
+ raise ::ArgumentError, "request must be provided" if request.nil?
596
+
597
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::SearchCasesRequest
598
+
599
+ # Converts hash and nil to an options object
600
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
601
+
602
+ # Customize the options with defaults
603
+ metadata = @config.rpcs.search_cases.metadata.to_h
604
+
605
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
606
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
607
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
608
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
609
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
610
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
611
+
612
+ header_params = {}
613
+ if request.parent
614
+ header_params["parent"] = request.parent
615
+ end
616
+
617
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
618
+ metadata[:"x-goog-request-params"] ||= request_params_header
619
+
620
+ options.apply_defaults timeout: @config.rpcs.search_cases.timeout,
621
+ metadata: metadata,
622
+ retry_policy: @config.rpcs.search_cases.retry_policy
623
+
624
+ options.apply_defaults timeout: @config.timeout,
625
+ metadata: @config.metadata,
626
+ retry_policy: @config.retry_policy
627
+
628
+ @case_service_stub.call_rpc :search_cases, request, options: options do |response, operation|
629
+ response = ::Gapic::PagedEnumerable.new @case_service_stub, :search_cases, request, response, operation, options
630
+ yield response, operation if block_given?
631
+ throw :response, response
632
+ end
633
+ rescue ::GRPC::BadStatus => e
634
+ raise ::Google::Cloud::Error.from_error(e)
635
+ end
636
+
637
+ ##
638
+ # Create a new case and associate it with a parent.
639
+ #
640
+ # It must have the following fields set: `display_name`, `description`,
641
+ # `classification`, and `priority`. If you're just testing the API and don't
642
+ # want to route your case to an agent, set `testCase=true`.
643
+ #
644
+ # EXAMPLES:
645
+ #
646
+ # cURL:
647
+ #
648
+ # ```shell
649
+ # parent="projects/some-project"
650
+ # curl \
651
+ # --request POST \
652
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
653
+ # --header 'Content-Type: application/json' \
654
+ # --data '{
655
+ # "display_name": "Test case created by me.",
656
+ # "description": "a random test case, feel free to close",
657
+ # "classification": {
658
+ # "id":
659
+ # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
660
+ # },
661
+ # "time_zone": "-07:00",
662
+ # "subscriber_email_addresses": [
663
+ # "foo@domain.com",
664
+ # "bar@domain.com"
665
+ # ],
666
+ # "testCase": true,
667
+ # "priority": "P3"
668
+ # }' \
669
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases"
670
+ # ```
671
+ #
672
+ # Python:
673
+ #
674
+ # ```python
675
+ # import googleapiclient.discovery
676
+ #
677
+ # api_version = "v2"
678
+ # supportApiService = googleapiclient.discovery.build(
679
+ # serviceName="cloudsupport",
680
+ # version=api_version,
681
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
682
+ # )
683
+ # request = supportApiService.cases().create(
684
+ # parent="projects/some-project",
685
+ # body={
686
+ # "displayName": "A Test Case",
687
+ # "description": "This is a test case.",
688
+ # "testCase": True,
689
+ # "priority": "P2",
690
+ # "classification": {
691
+ # "id":
692
+ # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
693
+ # },
694
+ # },
695
+ # )
696
+ # print(request.execute())
697
+ # ```
698
+ #
699
+ # @overload create_case(request, options = nil)
700
+ # Pass arguments to `create_case` via a request object, either of type
701
+ # {::Google::Cloud::Support::V2beta::CreateCaseRequest} or an equivalent Hash.
702
+ #
703
+ # @param request [::Google::Cloud::Support::V2beta::CreateCaseRequest, ::Hash]
704
+ # A request object representing the call parameters. Required. To specify no
705
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
706
+ # @param options [::Gapic::CallOptions, ::Hash]
707
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
708
+ #
709
+ # @overload create_case(parent: nil, case: nil)
710
+ # Pass arguments to `create_case` via keyword arguments. Note that at
711
+ # least one keyword argument is required. To specify no parameters, or to keep all
712
+ # the default parameter values, pass an empty Hash as a request object (see above).
713
+ #
714
+ # @param parent [::String]
715
+ # Required. The name of the parent under which the case should be created.
716
+ # @param case [::Google::Cloud::Support::V2beta::Case, ::Hash]
717
+ # Required. The case to be created.
718
+ #
719
+ # @yield [response, operation] Access the result along with the RPC operation
720
+ # @yieldparam response [::Google::Cloud::Support::V2beta::Case]
721
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
722
+ #
723
+ # @return [::Google::Cloud::Support::V2beta::Case]
724
+ #
725
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
726
+ #
727
+ # @example Basic example
728
+ # require "google/cloud/support/v2beta"
729
+ #
730
+ # # Create a client object. The client can be reused for multiple calls.
731
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
732
+ #
733
+ # # Create a request. To set request fields, pass in keyword arguments.
734
+ # request = Google::Cloud::Support::V2beta::CreateCaseRequest.new
735
+ #
736
+ # # Call the create_case method.
737
+ # result = client.create_case request
738
+ #
739
+ # # The returned object is of type Google::Cloud::Support::V2beta::Case.
740
+ # p result
741
+ #
742
+ def create_case request, options = nil
743
+ raise ::ArgumentError, "request must be provided" if request.nil?
744
+
745
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::CreateCaseRequest
746
+
747
+ # Converts hash and nil to an options object
748
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
749
+
750
+ # Customize the options with defaults
751
+ metadata = @config.rpcs.create_case.metadata.to_h
752
+
753
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
754
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
755
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
756
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
757
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
758
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
759
+
760
+ header_params = {}
761
+ if request.parent
762
+ header_params["parent"] = request.parent
763
+ end
764
+
765
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
766
+ metadata[:"x-goog-request-params"] ||= request_params_header
767
+
768
+ options.apply_defaults timeout: @config.rpcs.create_case.timeout,
769
+ metadata: metadata,
770
+ retry_policy: @config.rpcs.create_case.retry_policy
771
+
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata,
774
+ retry_policy: @config.retry_policy
775
+
776
+ @case_service_stub.call_rpc :create_case, request, options: options do |response, operation|
777
+ yield response, operation if block_given?
778
+ end
779
+ rescue ::GRPC::BadStatus => e
780
+ raise ::Google::Cloud::Error.from_error(e)
781
+ end
782
+
783
+ ##
784
+ # Update a case. Only some fields can be updated.
785
+ #
786
+ # EXAMPLES:
787
+ #
788
+ # cURL:
789
+ #
790
+ # ```shell
791
+ # case="projects/some-project/cases/43595344"
792
+ # curl \
793
+ # --request PATCH \
794
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
795
+ # --header "Content-Type: application/json" \
796
+ # --data '{
797
+ # "priority": "P1"
798
+ # }' \
799
+ # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
800
+ # ```
801
+ #
802
+ # Python:
803
+ #
804
+ # ```python
805
+ # import googleapiclient.discovery
806
+ #
807
+ # api_version = "v2"
808
+ # supportApiService = googleapiclient.discovery.build(
809
+ # serviceName="cloudsupport",
810
+ # version=api_version,
811
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
812
+ # )
813
+ # request = supportApiService.cases().patch(
814
+ # name="projects/some-project/cases/43112854",
815
+ # body={
816
+ # "displayName": "This is Now a New Title",
817
+ # "priority": "P2",
818
+ # },
819
+ # )
820
+ # print(request.execute())
821
+ # ```
822
+ #
823
+ # @overload update_case(request, options = nil)
824
+ # Pass arguments to `update_case` via a request object, either of type
825
+ # {::Google::Cloud::Support::V2beta::UpdateCaseRequest} or an equivalent Hash.
826
+ #
827
+ # @param request [::Google::Cloud::Support::V2beta::UpdateCaseRequest, ::Hash]
828
+ # A request object representing the call parameters. Required. To specify no
829
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
830
+ # @param options [::Gapic::CallOptions, ::Hash]
831
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
832
+ #
833
+ # @overload update_case(case: nil, update_mask: nil)
834
+ # Pass arguments to `update_case` via keyword arguments. Note that at
835
+ # least one keyword argument is required. To specify no parameters, or to keep all
836
+ # the default parameter values, pass an empty Hash as a request object (see above).
837
+ #
838
+ # @param case [::Google::Cloud::Support::V2beta::Case, ::Hash]
839
+ # Required. The case to update.
840
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
841
+ # A list of attributes of the case that should be updated. Supported values
842
+ # are `priority`, `display_name`, and `subscriber_email_addresses`. If no
843
+ # fields are specified, all supported fields are updated.
844
+ #
845
+ # Be careful - if you do not provide a field mask, then you might
846
+ # accidentally clear some fields. For example, if you leave the field mask
847
+ # empty and do not provide a value for `subscriber_email_addresses`, then
848
+ # `subscriber_email_addresses` is updated to empty.
849
+ #
850
+ # @yield [response, operation] Access the result along with the RPC operation
851
+ # @yieldparam response [::Google::Cloud::Support::V2beta::Case]
852
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
853
+ #
854
+ # @return [::Google::Cloud::Support::V2beta::Case]
855
+ #
856
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
857
+ #
858
+ # @example Basic example
859
+ # require "google/cloud/support/v2beta"
860
+ #
861
+ # # Create a client object. The client can be reused for multiple calls.
862
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
863
+ #
864
+ # # Create a request. To set request fields, pass in keyword arguments.
865
+ # request = Google::Cloud::Support::V2beta::UpdateCaseRequest.new
866
+ #
867
+ # # Call the update_case method.
868
+ # result = client.update_case request
869
+ #
870
+ # # The returned object is of type Google::Cloud::Support::V2beta::Case.
871
+ # p result
872
+ #
873
+ def update_case request, options = nil
874
+ raise ::ArgumentError, "request must be provided" if request.nil?
875
+
876
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::UpdateCaseRequest
877
+
878
+ # Converts hash and nil to an options object
879
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
880
+
881
+ # Customize the options with defaults
882
+ metadata = @config.rpcs.update_case.metadata.to_h
883
+
884
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
885
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
886
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
887
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
888
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
889
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
890
+
891
+ header_params = {}
892
+ if request.case&.name
893
+ header_params["case.name"] = request.case.name
894
+ end
895
+
896
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
897
+ metadata[:"x-goog-request-params"] ||= request_params_header
898
+
899
+ options.apply_defaults timeout: @config.rpcs.update_case.timeout,
900
+ metadata: metadata,
901
+ retry_policy: @config.rpcs.update_case.retry_policy
902
+
903
+ options.apply_defaults timeout: @config.timeout,
904
+ metadata: @config.metadata,
905
+ retry_policy: @config.retry_policy
906
+
907
+ @case_service_stub.call_rpc :update_case, request, options: options do |response, operation|
908
+ yield response, operation if block_given?
909
+ end
910
+ rescue ::GRPC::BadStatus => e
911
+ raise ::Google::Cloud::Error.from_error(e)
912
+ end
913
+
914
+ ##
915
+ # Escalate a case, starting the Google Cloud Support escalation management
916
+ # process.
917
+ #
918
+ # This operation is only available for some support services. Go to
919
+ # https://cloud.google.com/support and look for 'Technical support
920
+ # escalations' in the feature list to find out which ones let you
921
+ # do that.
922
+ #
923
+ # EXAMPLES:
924
+ #
925
+ # cURL:
926
+ #
927
+ # ```shell
928
+ # case="projects/some-project/cases/43595344"
929
+ # curl \
930
+ # --request POST \
931
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
932
+ # --header "Content-Type: application/json" \
933
+ # --data '{
934
+ # "escalation": {
935
+ # "reason": "BUSINESS_IMPACT",
936
+ # "justification": "This is a test escalation."
937
+ # }
938
+ # }' \
939
+ # "https://cloudsupport.googleapis.com/v2/$case:escalate"
940
+ # ```
941
+ #
942
+ # Python:
943
+ #
944
+ # ```python
945
+ # import googleapiclient.discovery
946
+ #
947
+ # api_version = "v2"
948
+ # supportApiService = googleapiclient.discovery.build(
949
+ # serviceName="cloudsupport",
950
+ # version=api_version,
951
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
952
+ # )
953
+ # request = supportApiService.cases().escalate(
954
+ # name="projects/some-project/cases/43595344",
955
+ # body={
956
+ # "escalation": {
957
+ # "reason": "BUSINESS_IMPACT",
958
+ # "justification": "This is a test escalation.",
959
+ # },
960
+ # },
961
+ # )
962
+ # print(request.execute())
963
+ # ```
964
+ #
965
+ # @overload escalate_case(request, options = nil)
966
+ # Pass arguments to `escalate_case` via a request object, either of type
967
+ # {::Google::Cloud::Support::V2beta::EscalateCaseRequest} or an equivalent Hash.
968
+ #
969
+ # @param request [::Google::Cloud::Support::V2beta::EscalateCaseRequest, ::Hash]
970
+ # A request object representing the call parameters. Required. To specify no
971
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
972
+ # @param options [::Gapic::CallOptions, ::Hash]
973
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
974
+ #
975
+ # @overload escalate_case(name: nil, escalation: nil)
976
+ # Pass arguments to `escalate_case` via keyword arguments. Note that at
977
+ # least one keyword argument is required. To specify no parameters, or to keep all
978
+ # the default parameter values, pass an empty Hash as a request object (see above).
979
+ #
980
+ # @param name [::String]
981
+ # Required. The name of the case to be escalated.
982
+ # @param escalation [::Google::Cloud::Support::V2beta::Escalation, ::Hash]
983
+ # The escalation information to be sent with the escalation request.
984
+ #
985
+ # @yield [response, operation] Access the result along with the RPC operation
986
+ # @yieldparam response [::Google::Cloud::Support::V2beta::Case]
987
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
988
+ #
989
+ # @return [::Google::Cloud::Support::V2beta::Case]
990
+ #
991
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
992
+ #
993
+ # @example Basic example
994
+ # require "google/cloud/support/v2beta"
995
+ #
996
+ # # Create a client object. The client can be reused for multiple calls.
997
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
998
+ #
999
+ # # Create a request. To set request fields, pass in keyword arguments.
1000
+ # request = Google::Cloud::Support::V2beta::EscalateCaseRequest.new
1001
+ #
1002
+ # # Call the escalate_case method.
1003
+ # result = client.escalate_case request
1004
+ #
1005
+ # # The returned object is of type Google::Cloud::Support::V2beta::Case.
1006
+ # p result
1007
+ #
1008
+ def escalate_case request, options = nil
1009
+ raise ::ArgumentError, "request must be provided" if request.nil?
1010
+
1011
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::EscalateCaseRequest
1012
+
1013
+ # Converts hash and nil to an options object
1014
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1015
+
1016
+ # Customize the options with defaults
1017
+ metadata = @config.rpcs.escalate_case.metadata.to_h
1018
+
1019
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1020
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1021
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1022
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
1023
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1024
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1025
+
1026
+ header_params = {}
1027
+ if request.name
1028
+ header_params["name"] = request.name
1029
+ end
1030
+
1031
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1032
+ metadata[:"x-goog-request-params"] ||= request_params_header
1033
+
1034
+ options.apply_defaults timeout: @config.rpcs.escalate_case.timeout,
1035
+ metadata: metadata,
1036
+ retry_policy: @config.rpcs.escalate_case.retry_policy
1037
+
1038
+ options.apply_defaults timeout: @config.timeout,
1039
+ metadata: @config.metadata,
1040
+ retry_policy: @config.retry_policy
1041
+
1042
+ @case_service_stub.call_rpc :escalate_case, request, options: options do |response, operation|
1043
+ yield response, operation if block_given?
1044
+ end
1045
+ rescue ::GRPC::BadStatus => e
1046
+ raise ::Google::Cloud::Error.from_error(e)
1047
+ end
1048
+
1049
+ ##
1050
+ # Close a case.
1051
+ #
1052
+ # EXAMPLES:
1053
+ #
1054
+ # cURL:
1055
+ #
1056
+ # ```shell
1057
+ # case="projects/some-project/cases/43595344"
1058
+ # curl \
1059
+ # --request POST \
1060
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1061
+ # "https://cloudsupport.googleapis.com/v2/$case:close"
1062
+ # ```
1063
+ #
1064
+ # Python:
1065
+ #
1066
+ # ```python
1067
+ # import googleapiclient.discovery
1068
+ #
1069
+ # api_version = "v2"
1070
+ # supportApiService = googleapiclient.discovery.build(
1071
+ # serviceName="cloudsupport",
1072
+ # version=api_version,
1073
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
1074
+ # )
1075
+ # request = supportApiService.cases().close(
1076
+ # name="projects/some-project/cases/43595344"
1077
+ # )
1078
+ # print(request.execute())
1079
+ # ```
1080
+ #
1081
+ # @overload close_case(request, options = nil)
1082
+ # Pass arguments to `close_case` via a request object, either of type
1083
+ # {::Google::Cloud::Support::V2beta::CloseCaseRequest} or an equivalent Hash.
1084
+ #
1085
+ # @param request [::Google::Cloud::Support::V2beta::CloseCaseRequest, ::Hash]
1086
+ # A request object representing the call parameters. Required. To specify no
1087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1088
+ # @param options [::Gapic::CallOptions, ::Hash]
1089
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1090
+ #
1091
+ # @overload close_case(name: nil)
1092
+ # Pass arguments to `close_case` via keyword arguments. Note that at
1093
+ # least one keyword argument is required. To specify no parameters, or to keep all
1094
+ # the default parameter values, pass an empty Hash as a request object (see above).
1095
+ #
1096
+ # @param name [::String]
1097
+ # Required. The name of the case to close.
1098
+ #
1099
+ # @yield [response, operation] Access the result along with the RPC operation
1100
+ # @yieldparam response [::Google::Cloud::Support::V2beta::Case]
1101
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1102
+ #
1103
+ # @return [::Google::Cloud::Support::V2beta::Case]
1104
+ #
1105
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1106
+ #
1107
+ # @example Basic example
1108
+ # require "google/cloud/support/v2beta"
1109
+ #
1110
+ # # Create a client object. The client can be reused for multiple calls.
1111
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
1112
+ #
1113
+ # # Create a request. To set request fields, pass in keyword arguments.
1114
+ # request = Google::Cloud::Support::V2beta::CloseCaseRequest.new
1115
+ #
1116
+ # # Call the close_case method.
1117
+ # result = client.close_case request
1118
+ #
1119
+ # # The returned object is of type Google::Cloud::Support::V2beta::Case.
1120
+ # p result
1121
+ #
1122
+ def close_case request, options = nil
1123
+ raise ::ArgumentError, "request must be provided" if request.nil?
1124
+
1125
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::CloseCaseRequest
1126
+
1127
+ # Converts hash and nil to an options object
1128
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1129
+
1130
+ # Customize the options with defaults
1131
+ metadata = @config.rpcs.close_case.metadata.to_h
1132
+
1133
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1134
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1135
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1136
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
1137
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1138
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1139
+
1140
+ header_params = {}
1141
+ if request.name
1142
+ header_params["name"] = request.name
1143
+ end
1144
+
1145
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1146
+ metadata[:"x-goog-request-params"] ||= request_params_header
1147
+
1148
+ options.apply_defaults timeout: @config.rpcs.close_case.timeout,
1149
+ metadata: metadata,
1150
+ retry_policy: @config.rpcs.close_case.retry_policy
1151
+
1152
+ options.apply_defaults timeout: @config.timeout,
1153
+ metadata: @config.metadata,
1154
+ retry_policy: @config.retry_policy
1155
+
1156
+ @case_service_stub.call_rpc :close_case, request, options: options do |response, operation|
1157
+ yield response, operation if block_given?
1158
+ end
1159
+ rescue ::GRPC::BadStatus => e
1160
+ raise ::Google::Cloud::Error.from_error(e)
1161
+ end
1162
+
1163
+ ##
1164
+ # Retrieve valid classifications to use when creating a support case.
1165
+ #
1166
+ # Classifications are hierarchical. Each classification is a string
1167
+ # containing all levels of the hierarchy separated by `" > "`. For example,
1168
+ # `"Technical Issue > Compute > Compute Engine"`.
1169
+ #
1170
+ # Classification IDs returned by this endpoint are valid for at least six
1171
+ # months. When a classification is deactivated, this endpoint immediately
1172
+ # stops returning it. After six months, `case.create` requests using the
1173
+ # classification will fail.
1174
+ #
1175
+ # EXAMPLES:
1176
+ #
1177
+ # cURL:
1178
+ #
1179
+ # ```shell
1180
+ # curl \
1181
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1182
+ # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"'
1183
+ # ```
1184
+ #
1185
+ # Python:
1186
+ #
1187
+ # ```python
1188
+ # import googleapiclient.discovery
1189
+ #
1190
+ # supportApiService = googleapiclient.discovery.build(
1191
+ # serviceName="cloudsupport",
1192
+ # version="v2",
1193
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2",
1194
+ # )
1195
+ # request = supportApiService.caseClassifications().search(
1196
+ # query='display_name:"*Compute Engine*"'
1197
+ # )
1198
+ # print(request.execute())
1199
+ # ```
1200
+ #
1201
+ # @overload search_case_classifications(request, options = nil)
1202
+ # Pass arguments to `search_case_classifications` via a request object, either of type
1203
+ # {::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest} or an equivalent Hash.
1204
+ #
1205
+ # @param request [::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest, ::Hash]
1206
+ # A request object representing the call parameters. Required. To specify no
1207
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1208
+ # @param options [::Gapic::CallOptions, ::Hash]
1209
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1210
+ #
1211
+ # @overload search_case_classifications(query: nil, page_size: nil, page_token: nil, product: nil)
1212
+ # Pass arguments to `search_case_classifications` via keyword arguments. Note that at
1213
+ # least one keyword argument is required. To specify no parameters, or to keep all
1214
+ # the default parameter values, pass an empty Hash as a request object (see above).
1215
+ #
1216
+ # @param query [::String]
1217
+ # An expression used to filter case classifications.
1218
+ #
1219
+ # If it's an empty string, then no filtering happens. Otherwise, case
1220
+ # classifications will be returned that match the filter.
1221
+ # @param page_size [::Integer]
1222
+ # The maximum number of classifications fetched with each request.
1223
+ # @param page_token [::String]
1224
+ # A token identifying the page of results to return. If unspecified, the
1225
+ # first page is retrieved.
1226
+ # @param product [::Google::Cloud::Support::V2beta::Product, ::Hash]
1227
+ # Optional. The product to return case classifications for.
1228
+ #
1229
+ # @yield [response, operation] Access the result along with the RPC operation
1230
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::CaseClassification>]
1231
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1232
+ #
1233
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::CaseClassification>]
1234
+ #
1235
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1236
+ #
1237
+ # @example Basic example
1238
+ # require "google/cloud/support/v2beta"
1239
+ #
1240
+ # # Create a client object. The client can be reused for multiple calls.
1241
+ # client = Google::Cloud::Support::V2beta::CaseService::Client.new
1242
+ #
1243
+ # # Create a request. To set request fields, pass in keyword arguments.
1244
+ # request = Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest.new
1245
+ #
1246
+ # # Call the search_case_classifications method.
1247
+ # result = client.search_case_classifications request
1248
+ #
1249
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1250
+ # # over elements, and API calls will be issued to fetch pages as needed.
1251
+ # result.each do |item|
1252
+ # # Each element is of type ::Google::Cloud::Support::V2beta::CaseClassification.
1253
+ # p item
1254
+ # end
1255
+ #
1256
+ def search_case_classifications request, options = nil
1257
+ raise ::ArgumentError, "request must be provided" if request.nil?
1258
+
1259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest
1260
+
1261
+ # Converts hash and nil to an options object
1262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1263
+
1264
+ # Customize the options with defaults
1265
+ metadata = @config.rpcs.search_case_classifications.metadata.to_h
1266
+
1267
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1268
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1270
+ gapic_version: ::Google::Cloud::Support::V2beta::VERSION
1271
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1272
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1273
+
1274
+ options.apply_defaults timeout: @config.rpcs.search_case_classifications.timeout,
1275
+ metadata: metadata,
1276
+ retry_policy: @config.rpcs.search_case_classifications.retry_policy
1277
+
1278
+ options.apply_defaults timeout: @config.timeout,
1279
+ metadata: @config.metadata,
1280
+ retry_policy: @config.retry_policy
1281
+
1282
+ @case_service_stub.call_rpc :search_case_classifications, request, options: options do |response, operation|
1283
+ response = ::Gapic::PagedEnumerable.new @case_service_stub, :search_case_classifications, request, response, operation, options
1284
+ yield response, operation if block_given?
1285
+ throw :response, response
1286
+ end
1287
+ rescue ::GRPC::BadStatus => e
1288
+ raise ::Google::Cloud::Error.from_error(e)
1289
+ end
1290
+
1291
+ ##
1292
+ # Configuration class for the CaseService API.
1293
+ #
1294
+ # This class represents the configuration for CaseService,
1295
+ # providing control over timeouts, retry behavior, logging, transport
1296
+ # parameters, and other low-level controls. Certain parameters can also be
1297
+ # applied individually to specific RPCs. See
1298
+ # {::Google::Cloud::Support::V2beta::CaseService::Client::Configuration::Rpcs}
1299
+ # for a list of RPCs that can be configured independently.
1300
+ #
1301
+ # Configuration can be applied globally to all clients, or to a single client
1302
+ # on construction.
1303
+ #
1304
+ # @example
1305
+ #
1306
+ # # Modify the global config, setting the timeout for
1307
+ # # get_case to 20 seconds,
1308
+ # # and all remaining timeouts to 10 seconds.
1309
+ # ::Google::Cloud::Support::V2beta::CaseService::Client.configure do |config|
1310
+ # config.timeout = 10.0
1311
+ # config.rpcs.get_case.timeout = 20.0
1312
+ # end
1313
+ #
1314
+ # # Apply the above configuration only to a new client.
1315
+ # client = ::Google::Cloud::Support::V2beta::CaseService::Client.new do |config|
1316
+ # config.timeout = 10.0
1317
+ # config.rpcs.get_case.timeout = 20.0
1318
+ # end
1319
+ #
1320
+ # @!attribute [rw] endpoint
1321
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1322
+ # nil, indicating to use the default endpoint in the current universe domain.
1323
+ # @return [::String,nil]
1324
+ # @!attribute [rw] credentials
1325
+ # Credentials to send with calls. You may provide any of the following types:
1326
+ # * (`String`) The path to a service account key file in JSON format
1327
+ # * (`Hash`) A service account key as a Hash
1328
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1329
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1330
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1331
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1332
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1333
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1334
+ # * (`nil`) indicating no credentials
1335
+ #
1336
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1337
+ # external source for authentication to Google Cloud, you must validate it before
1338
+ # providing it to a Google API client library. Providing an unvalidated credential
1339
+ # configuration to Google APIs can compromise the security of your systems and data.
1340
+ # For more information, refer to [Validate credential configurations from external
1341
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1342
+ # @return [::Object]
1343
+ # @!attribute [rw] scope
1344
+ # The OAuth scopes
1345
+ # @return [::Array<::String>]
1346
+ # @!attribute [rw] lib_name
1347
+ # The library name as recorded in instrumentation and logging
1348
+ # @return [::String]
1349
+ # @!attribute [rw] lib_version
1350
+ # The library version as recorded in instrumentation and logging
1351
+ # @return [::String]
1352
+ # @!attribute [rw] channel_args
1353
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1354
+ # `GRPC::Core::Channel` object is provided as the credential.
1355
+ # @return [::Hash]
1356
+ # @!attribute [rw] interceptors
1357
+ # An array of interceptors that are run before calls are executed.
1358
+ # @return [::Array<::GRPC::ClientInterceptor>]
1359
+ # @!attribute [rw] timeout
1360
+ # The call timeout in seconds.
1361
+ # @return [::Numeric]
1362
+ # @!attribute [rw] metadata
1363
+ # Additional gRPC headers to be sent with the call.
1364
+ # @return [::Hash{::Symbol=>::String}]
1365
+ # @!attribute [rw] retry_policy
1366
+ # The retry policy. The value is a hash with the following keys:
1367
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1368
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1369
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1370
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1371
+ # trigger a retry.
1372
+ # @return [::Hash]
1373
+ # @!attribute [rw] quota_project
1374
+ # A separate project against which to charge quota.
1375
+ # @return [::String]
1376
+ # @!attribute [rw] universe_domain
1377
+ # The universe domain within which to make requests. This determines the
1378
+ # default endpoint URL. The default value of nil uses the environment
1379
+ # universe (usually the default "googleapis.com" universe).
1380
+ # @return [::String,nil]
1381
+ # @!attribute [rw] logger
1382
+ # A custom logger to use for request/response debug logging, or the value
1383
+ # `:default` (the default) to construct a default logger, or `nil` to
1384
+ # explicitly disable logging.
1385
+ # @return [::Logger,:default,nil]
1386
+ #
1387
+ class Configuration
1388
+ extend ::Gapic::Config
1389
+
1390
+ # @private
1391
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1392
+ DEFAULT_ENDPOINT = "cloudsupport.googleapis.com"
1393
+
1394
+ config_attr :endpoint, nil, ::String, nil
1395
+ config_attr :credentials, nil do |value|
1396
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1397
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
1398
+ allowed.any? { |klass| klass === value }
1399
+ end
1400
+ config_attr :scope, nil, ::String, ::Array, nil
1401
+ config_attr :lib_name, nil, ::String, nil
1402
+ config_attr :lib_version, nil, ::String, nil
1403
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1404
+ config_attr :interceptors, nil, ::Array, nil
1405
+ config_attr :timeout, nil, ::Numeric, nil
1406
+ config_attr :metadata, nil, ::Hash, nil
1407
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1408
+ config_attr :quota_project, nil, ::String, nil
1409
+ config_attr :universe_domain, nil, ::String, nil
1410
+ config_attr :logger, :default, ::Logger, nil, :default
1411
+
1412
+ # @private
1413
+ def initialize parent_config = nil
1414
+ @parent_config = parent_config unless parent_config.nil?
1415
+
1416
+ yield self if block_given?
1417
+ end
1418
+
1419
+ ##
1420
+ # Configurations for individual RPCs
1421
+ # @return [Rpcs]
1422
+ #
1423
+ def rpcs
1424
+ @rpcs ||= begin
1425
+ parent_rpcs = nil
1426
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1427
+ Rpcs.new parent_rpcs
1428
+ end
1429
+ end
1430
+
1431
+ ##
1432
+ # Configuration for the channel pool
1433
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1434
+ #
1435
+ def channel_pool
1436
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1437
+ end
1438
+
1439
+ ##
1440
+ # Configuration RPC class for the CaseService API.
1441
+ #
1442
+ # Includes fields providing the configuration for each RPC in this service.
1443
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1444
+ # the following configuration fields:
1445
+ #
1446
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1447
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1448
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1449
+ # include the following keys:
1450
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1451
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1452
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1453
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1454
+ # trigger a retry.
1455
+ #
1456
+ class Rpcs
1457
+ ##
1458
+ # RPC-specific configuration for `get_case`
1459
+ # @return [::Gapic::Config::Method]
1460
+ #
1461
+ attr_reader :get_case
1462
+ ##
1463
+ # RPC-specific configuration for `list_cases`
1464
+ # @return [::Gapic::Config::Method]
1465
+ #
1466
+ attr_reader :list_cases
1467
+ ##
1468
+ # RPC-specific configuration for `search_cases`
1469
+ # @return [::Gapic::Config::Method]
1470
+ #
1471
+ attr_reader :search_cases
1472
+ ##
1473
+ # RPC-specific configuration for `create_case`
1474
+ # @return [::Gapic::Config::Method]
1475
+ #
1476
+ attr_reader :create_case
1477
+ ##
1478
+ # RPC-specific configuration for `update_case`
1479
+ # @return [::Gapic::Config::Method]
1480
+ #
1481
+ attr_reader :update_case
1482
+ ##
1483
+ # RPC-specific configuration for `escalate_case`
1484
+ # @return [::Gapic::Config::Method]
1485
+ #
1486
+ attr_reader :escalate_case
1487
+ ##
1488
+ # RPC-specific configuration for `close_case`
1489
+ # @return [::Gapic::Config::Method]
1490
+ #
1491
+ attr_reader :close_case
1492
+ ##
1493
+ # RPC-specific configuration for `search_case_classifications`
1494
+ # @return [::Gapic::Config::Method]
1495
+ #
1496
+ attr_reader :search_case_classifications
1497
+
1498
+ # @private
1499
+ def initialize parent_rpcs = nil
1500
+ get_case_config = parent_rpcs.get_case if parent_rpcs.respond_to? :get_case
1501
+ @get_case = ::Gapic::Config::Method.new get_case_config
1502
+ list_cases_config = parent_rpcs.list_cases if parent_rpcs.respond_to? :list_cases
1503
+ @list_cases = ::Gapic::Config::Method.new list_cases_config
1504
+ search_cases_config = parent_rpcs.search_cases if parent_rpcs.respond_to? :search_cases
1505
+ @search_cases = ::Gapic::Config::Method.new search_cases_config
1506
+ create_case_config = parent_rpcs.create_case if parent_rpcs.respond_to? :create_case
1507
+ @create_case = ::Gapic::Config::Method.new create_case_config
1508
+ update_case_config = parent_rpcs.update_case if parent_rpcs.respond_to? :update_case
1509
+ @update_case = ::Gapic::Config::Method.new update_case_config
1510
+ escalate_case_config = parent_rpcs.escalate_case if parent_rpcs.respond_to? :escalate_case
1511
+ @escalate_case = ::Gapic::Config::Method.new escalate_case_config
1512
+ close_case_config = parent_rpcs.close_case if parent_rpcs.respond_to? :close_case
1513
+ @close_case = ::Gapic::Config::Method.new close_case_config
1514
+ search_case_classifications_config = parent_rpcs.search_case_classifications if parent_rpcs.respond_to? :search_case_classifications
1515
+ @search_case_classifications = ::Gapic::Config::Method.new search_case_classifications_config
1516
+
1517
+ yield self if block_given?
1518
+ end
1519
+ end
1520
+ end
1521
+ end
1522
+ end
1523
+ end
1524
+ end
1525
+ end
1526
+ end