google-cloud-gdc_hardware_management-v1alpha 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 (43) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb +102 -0
  7. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb +3998 -0
  8. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb +47 -0
  9. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb +809 -0
  10. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb +208 -0
  11. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb +3741 -0
  12. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb +902 -0
  13. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb +2029 -0
  14. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb +54 -0
  15. data/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb +56 -0
  16. data/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb +38 -0
  17. data/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb +28 -0
  18. data/lib/google/cloud/gdc_hardware_management/v1alpha.rb +45 -0
  19. data/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb +89 -0
  20. data/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb +98 -0
  21. data/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb +109 -0
  22. data/lib/google-cloud-gdc_hardware_management-v1alpha.rb +21 -0
  23. data/proto_docs/README.md +4 -0
  24. data/proto_docs/google/api/client.rb +399 -0
  25. data/proto_docs/google/api/field_behavior.rb +85 -0
  26. data/proto_docs/google/api/field_info.rb +65 -0
  27. data/proto_docs/google/api/launch_stage.rb +71 -0
  28. data/proto_docs/google/api/resource.rb +222 -0
  29. data/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb +917 -0
  30. data/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb +803 -0
  31. data/proto_docs/google/longrunning/operations.rb +164 -0
  32. data/proto_docs/google/protobuf/any.rb +145 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  36. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  37. data/proto_docs/google/rpc/status.rb +48 -0
  38. data/proto_docs/google/type/date.rb +53 -0
  39. data/proto_docs/google/type/datetime.rb +99 -0
  40. data/proto_docs/google/type/dayofweek.rb +49 -0
  41. data/proto_docs/google/type/postal_address.rb +135 -0
  42. data/proto_docs/google/type/timeofday.rb +45 -0
  43. metadata +141 -0
@@ -0,0 +1,3998 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/gdchardwaremanagement/v1alpha/service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module GDCHardwareManagement
26
+ module V1alpha
27
+ module GDCHardwareManagement
28
+ ##
29
+ # Client for the GDCHardwareManagement service.
30
+ #
31
+ # The GDC Hardware Management service.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :gdc_hardware_management_stub
44
+
45
+ ##
46
+ # Configure the GDCHardwareManagement Client class.
47
+ #
48
+ # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all GDCHardwareManagement clients
54
+ # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "GDCHardwareManagement", "V1alpha"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.list_orders.timeout = 60.0
75
+ default_config.rpcs.list_orders.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config.rpcs.get_order.timeout = 60.0
80
+ default_config.rpcs.get_order.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.create_order.timeout = 60.0
85
+
86
+ default_config.rpcs.update_order.timeout = 60.0
87
+ default_config.rpcs.update_order.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.delete_order.timeout = 60.0
92
+ default_config.rpcs.delete_order.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.submit_order.timeout = 60.0
97
+ default_config.rpcs.submit_order.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.list_sites.timeout = 60.0
102
+ default_config.rpcs.list_sites.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.get_site.timeout = 60.0
107
+ default_config.rpcs.get_site.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config.rpcs.create_site.timeout = 60.0
112
+
113
+ default_config.rpcs.update_site.timeout = 60.0
114
+ default_config.rpcs.update_site.retry_policy = {
115
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
116
+ }
117
+
118
+ default_config.rpcs.list_hardware_groups.timeout = 60.0
119
+ default_config.rpcs.list_hardware_groups.retry_policy = {
120
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
121
+ }
122
+
123
+ default_config.rpcs.get_hardware_group.timeout = 60.0
124
+ default_config.rpcs.get_hardware_group.retry_policy = {
125
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
126
+ }
127
+
128
+ default_config.rpcs.create_hardware_group.timeout = 60.0
129
+
130
+ default_config.rpcs.update_hardware_group.timeout = 60.0
131
+ default_config.rpcs.update_hardware_group.retry_policy = {
132
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
133
+ }
134
+
135
+ default_config.rpcs.delete_hardware_group.timeout = 60.0
136
+ default_config.rpcs.delete_hardware_group.retry_policy = {
137
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
138
+ }
139
+
140
+ default_config.rpcs.list_hardware.timeout = 60.0
141
+ default_config.rpcs.list_hardware.retry_policy = {
142
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
143
+ }
144
+
145
+ default_config.rpcs.get_hardware.timeout = 60.0
146
+ default_config.rpcs.get_hardware.retry_policy = {
147
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
148
+ }
149
+
150
+ default_config.rpcs.create_hardware.timeout = 60.0
151
+
152
+ default_config.rpcs.update_hardware.timeout = 60.0
153
+ default_config.rpcs.update_hardware.retry_policy = {
154
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
155
+ }
156
+
157
+ default_config.rpcs.delete_hardware.timeout = 60.0
158
+ default_config.rpcs.delete_hardware.retry_policy = {
159
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
160
+ }
161
+
162
+ default_config.rpcs.list_comments.timeout = 60.0
163
+ default_config.rpcs.list_comments.retry_policy = {
164
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
165
+ }
166
+
167
+ default_config.rpcs.get_comment.timeout = 60.0
168
+ default_config.rpcs.get_comment.retry_policy = {
169
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
170
+ }
171
+
172
+ default_config.rpcs.create_comment.timeout = 60.0
173
+
174
+ default_config.rpcs.list_change_log_entries.timeout = 60.0
175
+ default_config.rpcs.list_change_log_entries.retry_policy = {
176
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
177
+ }
178
+
179
+ default_config.rpcs.get_change_log_entry.timeout = 60.0
180
+ default_config.rpcs.get_change_log_entry.retry_policy = {
181
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
182
+ }
183
+
184
+ default_config.rpcs.list_skus.timeout = 60.0
185
+ default_config.rpcs.list_skus.retry_policy = {
186
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
187
+ }
188
+
189
+ default_config.rpcs.get_sku.timeout = 60.0
190
+ default_config.rpcs.get_sku.retry_policy = {
191
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
192
+ }
193
+
194
+ default_config.rpcs.list_zones.timeout = 60.0
195
+ default_config.rpcs.list_zones.retry_policy = {
196
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
197
+ }
198
+
199
+ default_config.rpcs.get_zone.timeout = 60.0
200
+ default_config.rpcs.get_zone.retry_policy = {
201
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
202
+ }
203
+
204
+ default_config.rpcs.create_zone.timeout = 60.0
205
+
206
+ default_config.rpcs.update_zone.timeout = 60.0
207
+ default_config.rpcs.update_zone.retry_policy = {
208
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
209
+ }
210
+
211
+ default_config.rpcs.delete_zone.timeout = 60.0
212
+ default_config.rpcs.delete_zone.retry_policy = {
213
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
214
+ }
215
+
216
+ default_config
217
+ end
218
+ yield @configure if block_given?
219
+ @configure
220
+ end
221
+
222
+ ##
223
+ # Configure the GDCHardwareManagement Client instance.
224
+ #
225
+ # The configuration is set to the derived mode, meaning that values can be changed,
226
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
227
+ # should be made on {Client.configure}.
228
+ #
229
+ # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client::Configuration}
230
+ # for a description of the configuration fields.
231
+ #
232
+ # @yield [config] Configure the Client client.
233
+ # @yieldparam config [Client::Configuration]
234
+ #
235
+ # @return [Client::Configuration]
236
+ #
237
+ def configure
238
+ yield @config if block_given?
239
+ @config
240
+ end
241
+
242
+ ##
243
+ # The effective universe domain
244
+ #
245
+ # @return [String]
246
+ #
247
+ def universe_domain
248
+ @gdc_hardware_management_stub.universe_domain
249
+ end
250
+
251
+ ##
252
+ # Create a new GDCHardwareManagement client object.
253
+ #
254
+ # @example
255
+ #
256
+ # # Create a client using the default configuration
257
+ # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
258
+ #
259
+ # # Create a client using a custom configuration
260
+ # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config|
261
+ # config.timeout = 10.0
262
+ # end
263
+ #
264
+ # @yield [config] Configure the GDCHardwareManagement client.
265
+ # @yieldparam config [Client::Configuration]
266
+ #
267
+ def initialize
268
+ # These require statements are intentionally placed here to initialize
269
+ # the gRPC module only when it's required.
270
+ # See https://github.com/googleapis/toolkit/issues/446
271
+ require "gapic/grpc"
272
+ require "google/cloud/gdchardwaremanagement/v1alpha/service_services_pb"
273
+
274
+ # Create the configuration object
275
+ @config = Configuration.new Client.configure
276
+
277
+ # Yield the configuration if needed
278
+ yield @config if block_given?
279
+
280
+ # Create credentials
281
+ credentials = @config.credentials
282
+ # Use self-signed JWT if the endpoint is unchanged from default,
283
+ # but only if the default endpoint does not have a region prefix.
284
+ enable_self_signed_jwt = @config.endpoint.nil? ||
285
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
286
+ !@config.endpoint.split(".").first.include?("-"))
287
+ credentials ||= Credentials.default scope: @config.scope,
288
+ enable_self_signed_jwt: enable_self_signed_jwt
289
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
290
+ credentials = Credentials.new credentials, scope: @config.scope
291
+ end
292
+ @quota_project_id = @config.quota_project
293
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
294
+
295
+ @operations_client = Operations.new do |config|
296
+ config.credentials = credentials
297
+ config.quota_project = @quota_project_id
298
+ config.endpoint = @config.endpoint
299
+ config.universe_domain = @config.universe_domain
300
+ end
301
+
302
+ @gdc_hardware_management_stub = ::Gapic::ServiceStub.new(
303
+ ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Stub,
304
+ credentials: credentials,
305
+ endpoint: @config.endpoint,
306
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
307
+ universe_domain: @config.universe_domain,
308
+ channel_args: @config.channel_args,
309
+ interceptors: @config.interceptors,
310
+ channel_pool_config: @config.channel_pool
311
+ )
312
+
313
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
314
+ config.credentials = credentials
315
+ config.quota_project = @quota_project_id
316
+ config.endpoint = @gdc_hardware_management_stub.endpoint
317
+ config.universe_domain = @gdc_hardware_management_stub.universe_domain
318
+ end
319
+ end
320
+
321
+ ##
322
+ # Get the associated client for long-running operations.
323
+ #
324
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations]
325
+ #
326
+ attr_reader :operations_client
327
+
328
+ ##
329
+ # Get the associated client for mix-in of the Locations.
330
+ #
331
+ # @return [Google::Cloud::Location::Locations::Client]
332
+ #
333
+ attr_reader :location_client
334
+
335
+ # Service calls
336
+
337
+ ##
338
+ # Lists orders in a given project and location.
339
+ #
340
+ # @overload list_orders(request, options = nil)
341
+ # Pass arguments to `list_orders` via a request object, either of type
342
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest} or an equivalent Hash.
343
+ #
344
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Hash]
345
+ # A request object representing the call parameters. Required. To specify no
346
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
347
+ # @param options [::Gapic::CallOptions, ::Hash]
348
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
349
+ #
350
+ # @overload list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
351
+ # Pass arguments to `list_orders` via keyword arguments. Note that at
352
+ # least one keyword argument is required. To specify no parameters, or to keep all
353
+ # the default parameter values, pass an empty Hash as a request object (see above).
354
+ #
355
+ # @param parent [::String]
356
+ # Required. The project and location to list orders in.
357
+ # Format: `projects/{project}/locations/{location}`
358
+ # @param page_size [::Integer]
359
+ # Optional. Requested page size. Server may return fewer items than
360
+ # requested. If unspecified, server will pick an appropriate default.
361
+ # @param page_token [::String]
362
+ # Optional. A token identifying a page of results the server should return.
363
+ # @param filter [::String]
364
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
365
+ # @param order_by [::String]
366
+ # Optional. Hint for how to order the results.
367
+ #
368
+ # @yield [response, operation] Access the result along with the RPC operation
369
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>]
370
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
371
+ #
372
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>]
373
+ #
374
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
375
+ #
376
+ # @example Basic example
377
+ # require "google/cloud/gdc_hardware_management/v1alpha"
378
+ #
379
+ # # Create a client object. The client can be reused for multiple calls.
380
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
381
+ #
382
+ # # Create a request. To set request fields, pass in keyword arguments.
383
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new
384
+ #
385
+ # # Call the list_orders method.
386
+ # result = client.list_orders request
387
+ #
388
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
389
+ # # over elements, and API calls will be issued to fetch pages as needed.
390
+ # result.each do |item|
391
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.
392
+ # p item
393
+ # end
394
+ #
395
+ def list_orders request, options = nil
396
+ raise ::ArgumentError, "request must be provided" if request.nil?
397
+
398
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest
399
+
400
+ # Converts hash and nil to an options object
401
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
402
+
403
+ # Customize the options with defaults
404
+ metadata = @config.rpcs.list_orders.metadata.to_h
405
+
406
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
407
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
408
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
409
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
410
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
411
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
412
+
413
+ header_params = {}
414
+ if request.parent
415
+ header_params["parent"] = request.parent
416
+ end
417
+
418
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
419
+ metadata[:"x-goog-request-params"] ||= request_params_header
420
+
421
+ options.apply_defaults timeout: @config.rpcs.list_orders.timeout,
422
+ metadata: metadata,
423
+ retry_policy: @config.rpcs.list_orders.retry_policy
424
+
425
+ options.apply_defaults timeout: @config.timeout,
426
+ metadata: @config.metadata,
427
+ retry_policy: @config.retry_policy
428
+
429
+ @gdc_hardware_management_stub.call_rpc :list_orders, request, options: options do |response, operation|
430
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, request, response, operation, options
431
+ yield response, operation if block_given?
432
+ return response
433
+ end
434
+ rescue ::GRPC::BadStatus => e
435
+ raise ::Google::Cloud::Error.from_error(e)
436
+ end
437
+
438
+ ##
439
+ # Gets details of an order.
440
+ #
441
+ # @overload get_order(request, options = nil)
442
+ # Pass arguments to `get_order` via a request object, either of type
443
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest} or an equivalent Hash.
444
+ #
445
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Hash]
446
+ # A request object representing the call parameters. Required. To specify no
447
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
448
+ # @param options [::Gapic::CallOptions, ::Hash]
449
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
450
+ #
451
+ # @overload get_order(name: nil)
452
+ # Pass arguments to `get_order` via keyword arguments. Note that at
453
+ # least one keyword argument is required. To specify no parameters, or to keep all
454
+ # the default parameter values, pass an empty Hash as a request object (see above).
455
+ #
456
+ # @param name [::String]
457
+ # Required. Name of the resource
458
+ #
459
+ # @yield [response, operation] Access the result along with the RPC operation
460
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Order]
461
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
462
+ #
463
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order]
464
+ #
465
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
466
+ #
467
+ # @example Basic example
468
+ # require "google/cloud/gdc_hardware_management/v1alpha"
469
+ #
470
+ # # Create a client object. The client can be reused for multiple calls.
471
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
472
+ #
473
+ # # Create a request. To set request fields, pass in keyword arguments.
474
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new
475
+ #
476
+ # # Call the get_order method.
477
+ # result = client.get_order request
478
+ #
479
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order.
480
+ # p result
481
+ #
482
+ def get_order request, options = nil
483
+ raise ::ArgumentError, "request must be provided" if request.nil?
484
+
485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest
486
+
487
+ # Converts hash and nil to an options object
488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
489
+
490
+ # Customize the options with defaults
491
+ metadata = @config.rpcs.get_order.metadata.to_h
492
+
493
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
494
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
496
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
497
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
498
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
499
+
500
+ header_params = {}
501
+ if request.name
502
+ header_params["name"] = request.name
503
+ end
504
+
505
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
506
+ metadata[:"x-goog-request-params"] ||= request_params_header
507
+
508
+ options.apply_defaults timeout: @config.rpcs.get_order.timeout,
509
+ metadata: metadata,
510
+ retry_policy: @config.rpcs.get_order.retry_policy
511
+
512
+ options.apply_defaults timeout: @config.timeout,
513
+ metadata: @config.metadata,
514
+ retry_policy: @config.retry_policy
515
+
516
+ @gdc_hardware_management_stub.call_rpc :get_order, request, options: options do |response, operation|
517
+ yield response, operation if block_given?
518
+ return response
519
+ end
520
+ rescue ::GRPC::BadStatus => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Creates a new order in a given project and location.
526
+ #
527
+ # @overload create_order(request, options = nil)
528
+ # Pass arguments to `create_order` via a request object, either of type
529
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest} or an equivalent Hash.
530
+ #
531
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Hash]
532
+ # A request object representing the call parameters. Required. To specify no
533
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
534
+ # @param options [::Gapic::CallOptions, ::Hash]
535
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
536
+ #
537
+ # @overload create_order(parent: nil, order_id: nil, order: nil, request_id: nil)
538
+ # Pass arguments to `create_order` via keyword arguments. Note that at
539
+ # least one keyword argument is required. To specify no parameters, or to keep all
540
+ # the default parameter values, pass an empty Hash as a request object (see above).
541
+ #
542
+ # @param parent [::String]
543
+ # Required. The project and location to create the order in.
544
+ # Format: `projects/{project}/locations/{location}`
545
+ # @param order_id [::String]
546
+ # Optional. ID used to uniquely identify the Order within its parent scope.
547
+ # This field should contain at most 63 characters and must start with
548
+ # lowercase characters.
549
+ # Only lowercase characters, numbers and `-` are accepted.
550
+ # The `-` character cannot be the first or the last one.
551
+ # A system generated ID will be used if the field is not set.
552
+ #
553
+ # The order.name field in the request will be ignored.
554
+ # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash]
555
+ # Required. The order to create.
556
+ # @param request_id [::String]
557
+ # Optional. An optional unique identifier for this request. See
558
+ # [AIP-155](https://google.aip.dev/155).
559
+ #
560
+ # @yield [response, operation] Access the result along with the RPC operation
561
+ # @yieldparam response [::Gapic::Operation]
562
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
563
+ #
564
+ # @return [::Gapic::Operation]
565
+ #
566
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
567
+ #
568
+ # @example Basic example
569
+ # require "google/cloud/gdc_hardware_management/v1alpha"
570
+ #
571
+ # # Create a client object. The client can be reused for multiple calls.
572
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
573
+ #
574
+ # # Create a request. To set request fields, pass in keyword arguments.
575
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new
576
+ #
577
+ # # Call the create_order method.
578
+ # result = client.create_order request
579
+ #
580
+ # # The returned object is of type Gapic::Operation. You can use it to
581
+ # # check the status of an operation, cancel it, or wait for results.
582
+ # # Here is how to wait for a response.
583
+ # result.wait_until_done! timeout: 60
584
+ # if result.response?
585
+ # p result.response
586
+ # else
587
+ # puts "No response received."
588
+ # end
589
+ #
590
+ def create_order request, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request.nil?
592
+
593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest
594
+
595
+ # Converts hash and nil to an options object
596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
597
+
598
+ # Customize the options with defaults
599
+ metadata = @config.rpcs.create_order.metadata.to_h
600
+
601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
602
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
604
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
605
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
606
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ header_params = {}
609
+ if request.parent
610
+ header_params["parent"] = request.parent
611
+ end
612
+
613
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
614
+ metadata[:"x-goog-request-params"] ||= request_params_header
615
+
616
+ options.apply_defaults timeout: @config.rpcs.create_order.timeout,
617
+ metadata: metadata,
618
+ retry_policy: @config.rpcs.create_order.retry_policy
619
+
620
+ options.apply_defaults timeout: @config.timeout,
621
+ metadata: @config.metadata,
622
+ retry_policy: @config.retry_policy
623
+
624
+ @gdc_hardware_management_stub.call_rpc :create_order, request, options: options do |response, operation|
625
+ response = ::Gapic::Operation.new response, @operations_client, options: options
626
+ yield response, operation if block_given?
627
+ return response
628
+ end
629
+ rescue ::GRPC::BadStatus => e
630
+ raise ::Google::Cloud::Error.from_error(e)
631
+ end
632
+
633
+ ##
634
+ # Updates the parameters of an order.
635
+ #
636
+ # @overload update_order(request, options = nil)
637
+ # Pass arguments to `update_order` via a request object, either of type
638
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest} or an equivalent Hash.
639
+ #
640
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Hash]
641
+ # A request object representing the call parameters. Required. To specify no
642
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
643
+ # @param options [::Gapic::CallOptions, ::Hash]
644
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
645
+ #
646
+ # @overload update_order(update_mask: nil, order: nil, request_id: nil)
647
+ # Pass arguments to `update_order` via keyword arguments. Note that at
648
+ # least one keyword argument is required. To specify no parameters, or to keep all
649
+ # the default parameter values, pass an empty Hash as a request object (see above).
650
+ #
651
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
652
+ # Required. A mask to specify the fields in the Order to overwrite with this
653
+ # update. The fields specified in the update_mask are relative to the order,
654
+ # not the full request. A field will be overwritten if it is in the mask. If
655
+ # you don't provide a mask then all fields will be overwritten.
656
+ # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash]
657
+ # Required. The order to update.
658
+ # @param request_id [::String]
659
+ # Optional. An optional unique identifier for this request. See
660
+ # [AIP-155](https://google.aip.dev/155).
661
+ #
662
+ # @yield [response, operation] Access the result along with the RPC operation
663
+ # @yieldparam response [::Gapic::Operation]
664
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
665
+ #
666
+ # @return [::Gapic::Operation]
667
+ #
668
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
669
+ #
670
+ # @example Basic example
671
+ # require "google/cloud/gdc_hardware_management/v1alpha"
672
+ #
673
+ # # Create a client object. The client can be reused for multiple calls.
674
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
675
+ #
676
+ # # Create a request. To set request fields, pass in keyword arguments.
677
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new
678
+ #
679
+ # # Call the update_order method.
680
+ # result = client.update_order request
681
+ #
682
+ # # The returned object is of type Gapic::Operation. You can use it to
683
+ # # check the status of an operation, cancel it, or wait for results.
684
+ # # Here is how to wait for a response.
685
+ # result.wait_until_done! timeout: 60
686
+ # if result.response?
687
+ # p result.response
688
+ # else
689
+ # puts "No response received."
690
+ # end
691
+ #
692
+ def update_order request, options = nil
693
+ raise ::ArgumentError, "request must be provided" if request.nil?
694
+
695
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest
696
+
697
+ # Converts hash and nil to an options object
698
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
699
+
700
+ # Customize the options with defaults
701
+ metadata = @config.rpcs.update_order.metadata.to_h
702
+
703
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
704
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
705
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
706
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
707
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
708
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
709
+
710
+ header_params = {}
711
+ if request.order&.name
712
+ header_params["order.name"] = request.order.name
713
+ end
714
+
715
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
716
+ metadata[:"x-goog-request-params"] ||= request_params_header
717
+
718
+ options.apply_defaults timeout: @config.rpcs.update_order.timeout,
719
+ metadata: metadata,
720
+ retry_policy: @config.rpcs.update_order.retry_policy
721
+
722
+ options.apply_defaults timeout: @config.timeout,
723
+ metadata: @config.metadata,
724
+ retry_policy: @config.retry_policy
725
+
726
+ @gdc_hardware_management_stub.call_rpc :update_order, request, options: options do |response, operation|
727
+ response = ::Gapic::Operation.new response, @operations_client, options: options
728
+ yield response, operation if block_given?
729
+ return response
730
+ end
731
+ rescue ::GRPC::BadStatus => e
732
+ raise ::Google::Cloud::Error.from_error(e)
733
+ end
734
+
735
+ ##
736
+ # Deletes an order.
737
+ #
738
+ # @overload delete_order(request, options = nil)
739
+ # Pass arguments to `delete_order` via a request object, either of type
740
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest} or an equivalent Hash.
741
+ #
742
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Hash]
743
+ # A request object representing the call parameters. Required. To specify no
744
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
745
+ # @param options [::Gapic::CallOptions, ::Hash]
746
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
747
+ #
748
+ # @overload delete_order(name: nil, request_id: nil, force: nil)
749
+ # Pass arguments to `delete_order` via keyword arguments. Note that at
750
+ # least one keyword argument is required. To specify no parameters, or to keep all
751
+ # the default parameter values, pass an empty Hash as a request object (see above).
752
+ #
753
+ # @param name [::String]
754
+ # Required. The name of the order.
755
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
756
+ # @param request_id [::String]
757
+ # Optional. An optional unique identifier for this request. See
758
+ # [AIP-155](https://google.aip.dev/155).
759
+ # @param force [::Boolean]
760
+ # Optional. An option to delete any nested resources in the Order, such as a
761
+ # HardwareGroup. If true, any nested resources for this Order will also be
762
+ # deleted. Otherwise, the request will only succeed if the Order has no
763
+ # nested resources.
764
+ #
765
+ # @yield [response, operation] Access the result along with the RPC operation
766
+ # @yieldparam response [::Gapic::Operation]
767
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
768
+ #
769
+ # @return [::Gapic::Operation]
770
+ #
771
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
772
+ #
773
+ # @example Basic example
774
+ # require "google/cloud/gdc_hardware_management/v1alpha"
775
+ #
776
+ # # Create a client object. The client can be reused for multiple calls.
777
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
778
+ #
779
+ # # Create a request. To set request fields, pass in keyword arguments.
780
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new
781
+ #
782
+ # # Call the delete_order method.
783
+ # result = client.delete_order request
784
+ #
785
+ # # The returned object is of type Gapic::Operation. You can use it to
786
+ # # check the status of an operation, cancel it, or wait for results.
787
+ # # Here is how to wait for a response.
788
+ # result.wait_until_done! timeout: 60
789
+ # if result.response?
790
+ # p result.response
791
+ # else
792
+ # puts "No response received."
793
+ # end
794
+ #
795
+ def delete_order request, options = nil
796
+ raise ::ArgumentError, "request must be provided" if request.nil?
797
+
798
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest
799
+
800
+ # Converts hash and nil to an options object
801
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
802
+
803
+ # Customize the options with defaults
804
+ metadata = @config.rpcs.delete_order.metadata.to_h
805
+
806
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
807
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
808
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
809
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
810
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
811
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
812
+
813
+ header_params = {}
814
+ if request.name
815
+ header_params["name"] = request.name
816
+ end
817
+
818
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
819
+ metadata[:"x-goog-request-params"] ||= request_params_header
820
+
821
+ options.apply_defaults timeout: @config.rpcs.delete_order.timeout,
822
+ metadata: metadata,
823
+ retry_policy: @config.rpcs.delete_order.retry_policy
824
+
825
+ options.apply_defaults timeout: @config.timeout,
826
+ metadata: @config.metadata,
827
+ retry_policy: @config.retry_policy
828
+
829
+ @gdc_hardware_management_stub.call_rpc :delete_order, request, options: options do |response, operation|
830
+ response = ::Gapic::Operation.new response, @operations_client, options: options
831
+ yield response, operation if block_given?
832
+ return response
833
+ end
834
+ rescue ::GRPC::BadStatus => e
835
+ raise ::Google::Cloud::Error.from_error(e)
836
+ end
837
+
838
+ ##
839
+ # Submits an order.
840
+ #
841
+ # @overload submit_order(request, options = nil)
842
+ # Pass arguments to `submit_order` via a request object, either of type
843
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest} or an equivalent Hash.
844
+ #
845
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Hash]
846
+ # A request object representing the call parameters. Required. To specify no
847
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
848
+ # @param options [::Gapic::CallOptions, ::Hash]
849
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
850
+ #
851
+ # @overload submit_order(name: nil, request_id: nil)
852
+ # Pass arguments to `submit_order` via keyword arguments. Note that at
853
+ # least one keyword argument is required. To specify no parameters, or to keep all
854
+ # the default parameter values, pass an empty Hash as a request object (see above).
855
+ #
856
+ # @param name [::String]
857
+ # Required. The name of the order.
858
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
859
+ # @param request_id [::String]
860
+ # Optional. An optional unique identifier for this request. See
861
+ # [AIP-155](https://google.aip.dev/155).
862
+ #
863
+ # @yield [response, operation] Access the result along with the RPC operation
864
+ # @yieldparam response [::Gapic::Operation]
865
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
866
+ #
867
+ # @return [::Gapic::Operation]
868
+ #
869
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
870
+ #
871
+ # @example Basic example
872
+ # require "google/cloud/gdc_hardware_management/v1alpha"
873
+ #
874
+ # # Create a client object. The client can be reused for multiple calls.
875
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
876
+ #
877
+ # # Create a request. To set request fields, pass in keyword arguments.
878
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new
879
+ #
880
+ # # Call the submit_order method.
881
+ # result = client.submit_order request
882
+ #
883
+ # # The returned object is of type Gapic::Operation. You can use it to
884
+ # # check the status of an operation, cancel it, or wait for results.
885
+ # # Here is how to wait for a response.
886
+ # result.wait_until_done! timeout: 60
887
+ # if result.response?
888
+ # p result.response
889
+ # else
890
+ # puts "No response received."
891
+ # end
892
+ #
893
+ def submit_order request, options = nil
894
+ raise ::ArgumentError, "request must be provided" if request.nil?
895
+
896
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest
897
+
898
+ # Converts hash and nil to an options object
899
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
900
+
901
+ # Customize the options with defaults
902
+ metadata = @config.rpcs.submit_order.metadata.to_h
903
+
904
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
905
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
906
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
907
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
908
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
909
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
910
+
911
+ header_params = {}
912
+ if request.name
913
+ header_params["name"] = request.name
914
+ end
915
+
916
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
917
+ metadata[:"x-goog-request-params"] ||= request_params_header
918
+
919
+ options.apply_defaults timeout: @config.rpcs.submit_order.timeout,
920
+ metadata: metadata,
921
+ retry_policy: @config.rpcs.submit_order.retry_policy
922
+
923
+ options.apply_defaults timeout: @config.timeout,
924
+ metadata: @config.metadata,
925
+ retry_policy: @config.retry_policy
926
+
927
+ @gdc_hardware_management_stub.call_rpc :submit_order, request, options: options do |response, operation|
928
+ response = ::Gapic::Operation.new response, @operations_client, options: options
929
+ yield response, operation if block_given?
930
+ return response
931
+ end
932
+ rescue ::GRPC::BadStatus => e
933
+ raise ::Google::Cloud::Error.from_error(e)
934
+ end
935
+
936
+ ##
937
+ # Lists sites in a given project and location.
938
+ #
939
+ # @overload list_sites(request, options = nil)
940
+ # Pass arguments to `list_sites` via a request object, either of type
941
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest} or an equivalent Hash.
942
+ #
943
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Hash]
944
+ # A request object representing the call parameters. Required. To specify no
945
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
946
+ # @param options [::Gapic::CallOptions, ::Hash]
947
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
948
+ #
949
+ # @overload list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
950
+ # Pass arguments to `list_sites` via keyword arguments. Note that at
951
+ # least one keyword argument is required. To specify no parameters, or to keep all
952
+ # the default parameter values, pass an empty Hash as a request object (see above).
953
+ #
954
+ # @param parent [::String]
955
+ # Required. The project and location to list sites in.
956
+ # Format: `projects/{project}/locations/{location}`
957
+ # @param page_size [::Integer]
958
+ # Optional. Requested page size. Server may return fewer items than
959
+ # requested. If unspecified, server will pick an appropriate default.
960
+ # @param page_token [::String]
961
+ # Optional. A token identifying a page of results the server should return.
962
+ # @param filter [::String]
963
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
964
+ # @param order_by [::String]
965
+ # Optional. Hint for how to order the results.
966
+ #
967
+ # @yield [response, operation] Access the result along with the RPC operation
968
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>]
969
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
970
+ #
971
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>]
972
+ #
973
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
974
+ #
975
+ # @example Basic example
976
+ # require "google/cloud/gdc_hardware_management/v1alpha"
977
+ #
978
+ # # Create a client object. The client can be reused for multiple calls.
979
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
980
+ #
981
+ # # Create a request. To set request fields, pass in keyword arguments.
982
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new
983
+ #
984
+ # # Call the list_sites method.
985
+ # result = client.list_sites request
986
+ #
987
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
988
+ # # over elements, and API calls will be issued to fetch pages as needed.
989
+ # result.each do |item|
990
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.
991
+ # p item
992
+ # end
993
+ #
994
+ def list_sites request, options = nil
995
+ raise ::ArgumentError, "request must be provided" if request.nil?
996
+
997
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest
998
+
999
+ # Converts hash and nil to an options object
1000
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1001
+
1002
+ # Customize the options with defaults
1003
+ metadata = @config.rpcs.list_sites.metadata.to_h
1004
+
1005
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1006
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1007
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1008
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1009
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1010
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1011
+
1012
+ header_params = {}
1013
+ if request.parent
1014
+ header_params["parent"] = request.parent
1015
+ end
1016
+
1017
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1018
+ metadata[:"x-goog-request-params"] ||= request_params_header
1019
+
1020
+ options.apply_defaults timeout: @config.rpcs.list_sites.timeout,
1021
+ metadata: metadata,
1022
+ retry_policy: @config.rpcs.list_sites.retry_policy
1023
+
1024
+ options.apply_defaults timeout: @config.timeout,
1025
+ metadata: @config.metadata,
1026
+ retry_policy: @config.retry_policy
1027
+
1028
+ @gdc_hardware_management_stub.call_rpc :list_sites, request, options: options do |response, operation|
1029
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, request, response, operation, options
1030
+ yield response, operation if block_given?
1031
+ return response
1032
+ end
1033
+ rescue ::GRPC::BadStatus => e
1034
+ raise ::Google::Cloud::Error.from_error(e)
1035
+ end
1036
+
1037
+ ##
1038
+ # Gets details of a site.
1039
+ #
1040
+ # @overload get_site(request, options = nil)
1041
+ # Pass arguments to `get_site` via a request object, either of type
1042
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest} or an equivalent Hash.
1043
+ #
1044
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Hash]
1045
+ # A request object representing the call parameters. Required. To specify no
1046
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1047
+ # @param options [::Gapic::CallOptions, ::Hash]
1048
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1049
+ #
1050
+ # @overload get_site(name: nil)
1051
+ # Pass arguments to `get_site` via keyword arguments. Note that at
1052
+ # least one keyword argument is required. To specify no parameters, or to keep all
1053
+ # the default parameter values, pass an empty Hash as a request object (see above).
1054
+ #
1055
+ # @param name [::String]
1056
+ # Required. The name of the site.
1057
+ # Format: `projects/{project}/locations/{location}/sites/{site}`
1058
+ #
1059
+ # @yield [response, operation] Access the result along with the RPC operation
1060
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Site]
1061
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1062
+ #
1063
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site]
1064
+ #
1065
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1066
+ #
1067
+ # @example Basic example
1068
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1069
+ #
1070
+ # # Create a client object. The client can be reused for multiple calls.
1071
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1072
+ #
1073
+ # # Create a request. To set request fields, pass in keyword arguments.
1074
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new
1075
+ #
1076
+ # # Call the get_site method.
1077
+ # result = client.get_site request
1078
+ #
1079
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site.
1080
+ # p result
1081
+ #
1082
+ def get_site request, options = nil
1083
+ raise ::ArgumentError, "request must be provided" if request.nil?
1084
+
1085
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest
1086
+
1087
+ # Converts hash and nil to an options object
1088
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1089
+
1090
+ # Customize the options with defaults
1091
+ metadata = @config.rpcs.get_site.metadata.to_h
1092
+
1093
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1094
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1095
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1096
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1097
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1098
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1099
+
1100
+ header_params = {}
1101
+ if request.name
1102
+ header_params["name"] = request.name
1103
+ end
1104
+
1105
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1106
+ metadata[:"x-goog-request-params"] ||= request_params_header
1107
+
1108
+ options.apply_defaults timeout: @config.rpcs.get_site.timeout,
1109
+ metadata: metadata,
1110
+ retry_policy: @config.rpcs.get_site.retry_policy
1111
+
1112
+ options.apply_defaults timeout: @config.timeout,
1113
+ metadata: @config.metadata,
1114
+ retry_policy: @config.retry_policy
1115
+
1116
+ @gdc_hardware_management_stub.call_rpc :get_site, request, options: options do |response, operation|
1117
+ yield response, operation if block_given?
1118
+ return response
1119
+ end
1120
+ rescue ::GRPC::BadStatus => e
1121
+ raise ::Google::Cloud::Error.from_error(e)
1122
+ end
1123
+
1124
+ ##
1125
+ # Creates a new site in a given project and location.
1126
+ #
1127
+ # @overload create_site(request, options = nil)
1128
+ # Pass arguments to `create_site` via a request object, either of type
1129
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest} or an equivalent Hash.
1130
+ #
1131
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Hash]
1132
+ # A request object representing the call parameters. Required. To specify no
1133
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1134
+ # @param options [::Gapic::CallOptions, ::Hash]
1135
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1136
+ #
1137
+ # @overload create_site(parent: nil, site_id: nil, site: nil, request_id: nil)
1138
+ # Pass arguments to `create_site` via keyword arguments. Note that at
1139
+ # least one keyword argument is required. To specify no parameters, or to keep all
1140
+ # the default parameter values, pass an empty Hash as a request object (see above).
1141
+ #
1142
+ # @param parent [::String]
1143
+ # Required. The project and location to create the site in.
1144
+ # Format: `projects/{project}/locations/{location}`
1145
+ # @param site_id [::String]
1146
+ # Optional. ID used to uniquely identify the Site within its parent scope.
1147
+ # This field should contain at most 63 characters and must start with
1148
+ # lowercase characters.
1149
+ # Only lowercase characters, numbers and `-` are accepted.
1150
+ # The `-` character cannot be the first or the last one.
1151
+ # A system generated ID will be used if the field is not set.
1152
+ #
1153
+ # The site.name field in the request will be ignored.
1154
+ # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash]
1155
+ # Required. The site to create.
1156
+ # @param request_id [::String]
1157
+ # Optional. An optional unique identifier for this request. See
1158
+ # [AIP-155](https://google.aip.dev/155).
1159
+ #
1160
+ # @yield [response, operation] Access the result along with the RPC operation
1161
+ # @yieldparam response [::Gapic::Operation]
1162
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1163
+ #
1164
+ # @return [::Gapic::Operation]
1165
+ #
1166
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1167
+ #
1168
+ # @example Basic example
1169
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1170
+ #
1171
+ # # Create a client object. The client can be reused for multiple calls.
1172
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1173
+ #
1174
+ # # Create a request. To set request fields, pass in keyword arguments.
1175
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new
1176
+ #
1177
+ # # Call the create_site method.
1178
+ # result = client.create_site request
1179
+ #
1180
+ # # The returned object is of type Gapic::Operation. You can use it to
1181
+ # # check the status of an operation, cancel it, or wait for results.
1182
+ # # Here is how to wait for a response.
1183
+ # result.wait_until_done! timeout: 60
1184
+ # if result.response?
1185
+ # p result.response
1186
+ # else
1187
+ # puts "No response received."
1188
+ # end
1189
+ #
1190
+ def create_site request, options = nil
1191
+ raise ::ArgumentError, "request must be provided" if request.nil?
1192
+
1193
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest
1194
+
1195
+ # Converts hash and nil to an options object
1196
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1197
+
1198
+ # Customize the options with defaults
1199
+ metadata = @config.rpcs.create_site.metadata.to_h
1200
+
1201
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1202
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1203
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1204
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1205
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1206
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1207
+
1208
+ header_params = {}
1209
+ if request.parent
1210
+ header_params["parent"] = request.parent
1211
+ end
1212
+
1213
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1214
+ metadata[:"x-goog-request-params"] ||= request_params_header
1215
+
1216
+ options.apply_defaults timeout: @config.rpcs.create_site.timeout,
1217
+ metadata: metadata,
1218
+ retry_policy: @config.rpcs.create_site.retry_policy
1219
+
1220
+ options.apply_defaults timeout: @config.timeout,
1221
+ metadata: @config.metadata,
1222
+ retry_policy: @config.retry_policy
1223
+
1224
+ @gdc_hardware_management_stub.call_rpc :create_site, request, options: options do |response, operation|
1225
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1226
+ yield response, operation if block_given?
1227
+ return response
1228
+ end
1229
+ rescue ::GRPC::BadStatus => e
1230
+ raise ::Google::Cloud::Error.from_error(e)
1231
+ end
1232
+
1233
+ ##
1234
+ # Updates the parameters of a site.
1235
+ #
1236
+ # @overload update_site(request, options = nil)
1237
+ # Pass arguments to `update_site` via a request object, either of type
1238
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest} or an equivalent Hash.
1239
+ #
1240
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Hash]
1241
+ # A request object representing the call parameters. Required. To specify no
1242
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1243
+ # @param options [::Gapic::CallOptions, ::Hash]
1244
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1245
+ #
1246
+ # @overload update_site(update_mask: nil, site: nil, request_id: nil)
1247
+ # Pass arguments to `update_site` via keyword arguments. Note that at
1248
+ # least one keyword argument is required. To specify no parameters, or to keep all
1249
+ # the default parameter values, pass an empty Hash as a request object (see above).
1250
+ #
1251
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1252
+ # Required. A mask to specify the fields in the Site to overwrite with this
1253
+ # update. The fields specified in the update_mask are relative to the site,
1254
+ # not the full request. A field will be overwritten if it is in the mask. If
1255
+ # you don't provide a mask then all fields will be overwritten.
1256
+ # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash]
1257
+ # Required. The site to update.
1258
+ # @param request_id [::String]
1259
+ # Optional. An optional unique identifier for this request. See
1260
+ # [AIP-155](https://google.aip.dev/155).
1261
+ #
1262
+ # @yield [response, operation] Access the result along with the RPC operation
1263
+ # @yieldparam response [::Gapic::Operation]
1264
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1265
+ #
1266
+ # @return [::Gapic::Operation]
1267
+ #
1268
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1269
+ #
1270
+ # @example Basic example
1271
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1272
+ #
1273
+ # # Create a client object. The client can be reused for multiple calls.
1274
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1275
+ #
1276
+ # # Create a request. To set request fields, pass in keyword arguments.
1277
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new
1278
+ #
1279
+ # # Call the update_site method.
1280
+ # result = client.update_site request
1281
+ #
1282
+ # # The returned object is of type Gapic::Operation. You can use it to
1283
+ # # check the status of an operation, cancel it, or wait for results.
1284
+ # # Here is how to wait for a response.
1285
+ # result.wait_until_done! timeout: 60
1286
+ # if result.response?
1287
+ # p result.response
1288
+ # else
1289
+ # puts "No response received."
1290
+ # end
1291
+ #
1292
+ def update_site request, options = nil
1293
+ raise ::ArgumentError, "request must be provided" if request.nil?
1294
+
1295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest
1296
+
1297
+ # Converts hash and nil to an options object
1298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1299
+
1300
+ # Customize the options with defaults
1301
+ metadata = @config.rpcs.update_site.metadata.to_h
1302
+
1303
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1304
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1306
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1307
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1308
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1309
+
1310
+ header_params = {}
1311
+ if request.site&.name
1312
+ header_params["site.name"] = request.site.name
1313
+ end
1314
+
1315
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1316
+ metadata[:"x-goog-request-params"] ||= request_params_header
1317
+
1318
+ options.apply_defaults timeout: @config.rpcs.update_site.timeout,
1319
+ metadata: metadata,
1320
+ retry_policy: @config.rpcs.update_site.retry_policy
1321
+
1322
+ options.apply_defaults timeout: @config.timeout,
1323
+ metadata: @config.metadata,
1324
+ retry_policy: @config.retry_policy
1325
+
1326
+ @gdc_hardware_management_stub.call_rpc :update_site, request, options: options do |response, operation|
1327
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1328
+ yield response, operation if block_given?
1329
+ return response
1330
+ end
1331
+ rescue ::GRPC::BadStatus => e
1332
+ raise ::Google::Cloud::Error.from_error(e)
1333
+ end
1334
+
1335
+ ##
1336
+ # Lists hardware groups in a given order.
1337
+ #
1338
+ # @overload list_hardware_groups(request, options = nil)
1339
+ # Pass arguments to `list_hardware_groups` via a request object, either of type
1340
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest} or an equivalent Hash.
1341
+ #
1342
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Hash]
1343
+ # A request object representing the call parameters. Required. To specify no
1344
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1345
+ # @param options [::Gapic::CallOptions, ::Hash]
1346
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1347
+ #
1348
+ # @overload list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1349
+ # Pass arguments to `list_hardware_groups` via keyword arguments. Note that at
1350
+ # least one keyword argument is required. To specify no parameters, or to keep all
1351
+ # the default parameter values, pass an empty Hash as a request object (see above).
1352
+ #
1353
+ # @param parent [::String]
1354
+ # Required. The order to list hardware groups in.
1355
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
1356
+ # @param page_size [::Integer]
1357
+ # Optional. Requested page size. Server may return fewer items than
1358
+ # requested. If unspecified, server will pick an appropriate default.
1359
+ # @param page_token [::String]
1360
+ # Optional. A token identifying a page of results the server should return.
1361
+ # @param filter [::String]
1362
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
1363
+ # @param order_by [::String]
1364
+ # Optional. Hint for how to order the results.
1365
+ #
1366
+ # @yield [response, operation] Access the result along with the RPC operation
1367
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>]
1368
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1369
+ #
1370
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>]
1371
+ #
1372
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1373
+ #
1374
+ # @example Basic example
1375
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1376
+ #
1377
+ # # Create a client object. The client can be reused for multiple calls.
1378
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1379
+ #
1380
+ # # Create a request. To set request fields, pass in keyword arguments.
1381
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new
1382
+ #
1383
+ # # Call the list_hardware_groups method.
1384
+ # result = client.list_hardware_groups request
1385
+ #
1386
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1387
+ # # over elements, and API calls will be issued to fetch pages as needed.
1388
+ # result.each do |item|
1389
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.
1390
+ # p item
1391
+ # end
1392
+ #
1393
+ def list_hardware_groups request, options = nil
1394
+ raise ::ArgumentError, "request must be provided" if request.nil?
1395
+
1396
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest
1397
+
1398
+ # Converts hash and nil to an options object
1399
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1400
+
1401
+ # Customize the options with defaults
1402
+ metadata = @config.rpcs.list_hardware_groups.metadata.to_h
1403
+
1404
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1405
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1406
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1407
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1408
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1409
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1410
+
1411
+ header_params = {}
1412
+ if request.parent
1413
+ header_params["parent"] = request.parent
1414
+ end
1415
+
1416
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1417
+ metadata[:"x-goog-request-params"] ||= request_params_header
1418
+
1419
+ options.apply_defaults timeout: @config.rpcs.list_hardware_groups.timeout,
1420
+ metadata: metadata,
1421
+ retry_policy: @config.rpcs.list_hardware_groups.retry_policy
1422
+
1423
+ options.apply_defaults timeout: @config.timeout,
1424
+ metadata: @config.metadata,
1425
+ retry_policy: @config.retry_policy
1426
+
1427
+ @gdc_hardware_management_stub.call_rpc :list_hardware_groups, request, options: options do |response, operation|
1428
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_groups, request, response, operation, options
1429
+ yield response, operation if block_given?
1430
+ return response
1431
+ end
1432
+ rescue ::GRPC::BadStatus => e
1433
+ raise ::Google::Cloud::Error.from_error(e)
1434
+ end
1435
+
1436
+ ##
1437
+ # Gets details of a hardware group.
1438
+ #
1439
+ # @overload get_hardware_group(request, options = nil)
1440
+ # Pass arguments to `get_hardware_group` via a request object, either of type
1441
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest} or an equivalent Hash.
1442
+ #
1443
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Hash]
1444
+ # A request object representing the call parameters. Required. To specify no
1445
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1446
+ # @param options [::Gapic::CallOptions, ::Hash]
1447
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1448
+ #
1449
+ # @overload get_hardware_group(name: nil)
1450
+ # Pass arguments to `get_hardware_group` via keyword arguments. Note that at
1451
+ # least one keyword argument is required. To specify no parameters, or to keep all
1452
+ # the default parameter values, pass an empty Hash as a request object (see above).
1453
+ #
1454
+ # @param name [::String]
1455
+ # Required. The name of the hardware group.
1456
+ # Format:
1457
+ # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
1458
+ #
1459
+ # @yield [response, operation] Access the result along with the RPC operation
1460
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup]
1461
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1462
+ #
1463
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup]
1464
+ #
1465
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1466
+ #
1467
+ # @example Basic example
1468
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1469
+ #
1470
+ # # Create a client object. The client can be reused for multiple calls.
1471
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1472
+ #
1473
+ # # Create a request. To set request fields, pass in keyword arguments.
1474
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new
1475
+ #
1476
+ # # Call the get_hardware_group method.
1477
+ # result = client.get_hardware_group request
1478
+ #
1479
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.
1480
+ # p result
1481
+ #
1482
+ def get_hardware_group request, options = nil
1483
+ raise ::ArgumentError, "request must be provided" if request.nil?
1484
+
1485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest
1486
+
1487
+ # Converts hash and nil to an options object
1488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1489
+
1490
+ # Customize the options with defaults
1491
+ metadata = @config.rpcs.get_hardware_group.metadata.to_h
1492
+
1493
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1494
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1496
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1497
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1498
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1499
+
1500
+ header_params = {}
1501
+ if request.name
1502
+ header_params["name"] = request.name
1503
+ end
1504
+
1505
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1506
+ metadata[:"x-goog-request-params"] ||= request_params_header
1507
+
1508
+ options.apply_defaults timeout: @config.rpcs.get_hardware_group.timeout,
1509
+ metadata: metadata,
1510
+ retry_policy: @config.rpcs.get_hardware_group.retry_policy
1511
+
1512
+ options.apply_defaults timeout: @config.timeout,
1513
+ metadata: @config.metadata,
1514
+ retry_policy: @config.retry_policy
1515
+
1516
+ @gdc_hardware_management_stub.call_rpc :get_hardware_group, request, options: options do |response, operation|
1517
+ yield response, operation if block_given?
1518
+ return response
1519
+ end
1520
+ rescue ::GRPC::BadStatus => e
1521
+ raise ::Google::Cloud::Error.from_error(e)
1522
+ end
1523
+
1524
+ ##
1525
+ # Creates a new hardware group in a given order.
1526
+ #
1527
+ # @overload create_hardware_group(request, options = nil)
1528
+ # Pass arguments to `create_hardware_group` via a request object, either of type
1529
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest} or an equivalent Hash.
1530
+ #
1531
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Hash]
1532
+ # A request object representing the call parameters. Required. To specify no
1533
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1534
+ # @param options [::Gapic::CallOptions, ::Hash]
1535
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1536
+ #
1537
+ # @overload create_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil)
1538
+ # Pass arguments to `create_hardware_group` via keyword arguments. Note that at
1539
+ # least one keyword argument is required. To specify no parameters, or to keep all
1540
+ # the default parameter values, pass an empty Hash as a request object (see above).
1541
+ #
1542
+ # @param parent [::String]
1543
+ # Required. The order to create the hardware group in.
1544
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
1545
+ # @param hardware_group_id [::String]
1546
+ # Optional. ID used to uniquely identify the HardwareGroup within its parent
1547
+ # scope. This field should contain at most 63 characters and must start with
1548
+ # lowercase characters.
1549
+ # Only lowercase characters, numbers and `-` are accepted.
1550
+ # The `-` character cannot be the first or the last one.
1551
+ # A system generated ID will be used if the field is not set.
1552
+ #
1553
+ # The hardware_group.name field in the request will be ignored.
1554
+ # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash]
1555
+ # Required. The hardware group to create.
1556
+ # @param request_id [::String]
1557
+ # Optional. An optional unique identifier for this request. See
1558
+ # [AIP-155](https://google.aip.dev/155).
1559
+ #
1560
+ # @yield [response, operation] Access the result along with the RPC operation
1561
+ # @yieldparam response [::Gapic::Operation]
1562
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1563
+ #
1564
+ # @return [::Gapic::Operation]
1565
+ #
1566
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1567
+ #
1568
+ # @example Basic example
1569
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1570
+ #
1571
+ # # Create a client object. The client can be reused for multiple calls.
1572
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1573
+ #
1574
+ # # Create a request. To set request fields, pass in keyword arguments.
1575
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new
1576
+ #
1577
+ # # Call the create_hardware_group method.
1578
+ # result = client.create_hardware_group request
1579
+ #
1580
+ # # The returned object is of type Gapic::Operation. You can use it to
1581
+ # # check the status of an operation, cancel it, or wait for results.
1582
+ # # Here is how to wait for a response.
1583
+ # result.wait_until_done! timeout: 60
1584
+ # if result.response?
1585
+ # p result.response
1586
+ # else
1587
+ # puts "No response received."
1588
+ # end
1589
+ #
1590
+ def create_hardware_group request, options = nil
1591
+ raise ::ArgumentError, "request must be provided" if request.nil?
1592
+
1593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest
1594
+
1595
+ # Converts hash and nil to an options object
1596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1597
+
1598
+ # Customize the options with defaults
1599
+ metadata = @config.rpcs.create_hardware_group.metadata.to_h
1600
+
1601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1602
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1604
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1605
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1606
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1607
+
1608
+ header_params = {}
1609
+ if request.parent
1610
+ header_params["parent"] = request.parent
1611
+ end
1612
+
1613
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1614
+ metadata[:"x-goog-request-params"] ||= request_params_header
1615
+
1616
+ options.apply_defaults timeout: @config.rpcs.create_hardware_group.timeout,
1617
+ metadata: metadata,
1618
+ retry_policy: @config.rpcs.create_hardware_group.retry_policy
1619
+
1620
+ options.apply_defaults timeout: @config.timeout,
1621
+ metadata: @config.metadata,
1622
+ retry_policy: @config.retry_policy
1623
+
1624
+ @gdc_hardware_management_stub.call_rpc :create_hardware_group, request, options: options do |response, operation|
1625
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1626
+ yield response, operation if block_given?
1627
+ return response
1628
+ end
1629
+ rescue ::GRPC::BadStatus => e
1630
+ raise ::Google::Cloud::Error.from_error(e)
1631
+ end
1632
+
1633
+ ##
1634
+ # Updates the parameters of a hardware group.
1635
+ #
1636
+ # @overload update_hardware_group(request, options = nil)
1637
+ # Pass arguments to `update_hardware_group` via a request object, either of type
1638
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest} or an equivalent Hash.
1639
+ #
1640
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Hash]
1641
+ # A request object representing the call parameters. Required. To specify no
1642
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1643
+ # @param options [::Gapic::CallOptions, ::Hash]
1644
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1645
+ #
1646
+ # @overload update_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil)
1647
+ # Pass arguments to `update_hardware_group` via keyword arguments. Note that at
1648
+ # least one keyword argument is required. To specify no parameters, or to keep all
1649
+ # the default parameter values, pass an empty Hash as a request object (see above).
1650
+ #
1651
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1652
+ # Required. A mask to specify the fields in the HardwareGroup to overwrite
1653
+ # with this update. The fields specified in the update_mask are relative to
1654
+ # the hardware group, not the full request. A field will be overwritten if it
1655
+ # is in the mask. If you don't provide a mask then all fields will be
1656
+ # overwritten.
1657
+ # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash]
1658
+ # Required. The hardware group to update.
1659
+ # @param request_id [::String]
1660
+ # Optional. An optional unique identifier for this request. See
1661
+ # [AIP-155](https://google.aip.dev/155).
1662
+ #
1663
+ # @yield [response, operation] Access the result along with the RPC operation
1664
+ # @yieldparam response [::Gapic::Operation]
1665
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1666
+ #
1667
+ # @return [::Gapic::Operation]
1668
+ #
1669
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1670
+ #
1671
+ # @example Basic example
1672
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1673
+ #
1674
+ # # Create a client object. The client can be reused for multiple calls.
1675
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1676
+ #
1677
+ # # Create a request. To set request fields, pass in keyword arguments.
1678
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new
1679
+ #
1680
+ # # Call the update_hardware_group method.
1681
+ # result = client.update_hardware_group request
1682
+ #
1683
+ # # The returned object is of type Gapic::Operation. You can use it to
1684
+ # # check the status of an operation, cancel it, or wait for results.
1685
+ # # Here is how to wait for a response.
1686
+ # result.wait_until_done! timeout: 60
1687
+ # if result.response?
1688
+ # p result.response
1689
+ # else
1690
+ # puts "No response received."
1691
+ # end
1692
+ #
1693
+ def update_hardware_group request, options = nil
1694
+ raise ::ArgumentError, "request must be provided" if request.nil?
1695
+
1696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest
1697
+
1698
+ # Converts hash and nil to an options object
1699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1700
+
1701
+ # Customize the options with defaults
1702
+ metadata = @config.rpcs.update_hardware_group.metadata.to_h
1703
+
1704
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1705
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1707
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1708
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1709
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1710
+
1711
+ header_params = {}
1712
+ if request.hardware_group&.name
1713
+ header_params["hardware_group.name"] = request.hardware_group.name
1714
+ end
1715
+
1716
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1717
+ metadata[:"x-goog-request-params"] ||= request_params_header
1718
+
1719
+ options.apply_defaults timeout: @config.rpcs.update_hardware_group.timeout,
1720
+ metadata: metadata,
1721
+ retry_policy: @config.rpcs.update_hardware_group.retry_policy
1722
+
1723
+ options.apply_defaults timeout: @config.timeout,
1724
+ metadata: @config.metadata,
1725
+ retry_policy: @config.retry_policy
1726
+
1727
+ @gdc_hardware_management_stub.call_rpc :update_hardware_group, request, options: options do |response, operation|
1728
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1729
+ yield response, operation if block_given?
1730
+ return response
1731
+ end
1732
+ rescue ::GRPC::BadStatus => e
1733
+ raise ::Google::Cloud::Error.from_error(e)
1734
+ end
1735
+
1736
+ ##
1737
+ # Deletes a hardware group.
1738
+ #
1739
+ # @overload delete_hardware_group(request, options = nil)
1740
+ # Pass arguments to `delete_hardware_group` via a request object, either of type
1741
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest} or an equivalent Hash.
1742
+ #
1743
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Hash]
1744
+ # A request object representing the call parameters. Required. To specify no
1745
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1746
+ # @param options [::Gapic::CallOptions, ::Hash]
1747
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1748
+ #
1749
+ # @overload delete_hardware_group(name: nil, request_id: nil)
1750
+ # Pass arguments to `delete_hardware_group` via keyword arguments. Note that at
1751
+ # least one keyword argument is required. To specify no parameters, or to keep all
1752
+ # the default parameter values, pass an empty Hash as a request object (see above).
1753
+ #
1754
+ # @param name [::String]
1755
+ # Required. The name of the hardware group.
1756
+ # Format:
1757
+ # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
1758
+ # @param request_id [::String]
1759
+ # Optional. An optional unique identifier for this request. See
1760
+ # [AIP-155](https://google.aip.dev/155).
1761
+ #
1762
+ # @yield [response, operation] Access the result along with the RPC operation
1763
+ # @yieldparam response [::Gapic::Operation]
1764
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1765
+ #
1766
+ # @return [::Gapic::Operation]
1767
+ #
1768
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1769
+ #
1770
+ # @example Basic example
1771
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1772
+ #
1773
+ # # Create a client object. The client can be reused for multiple calls.
1774
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1775
+ #
1776
+ # # Create a request. To set request fields, pass in keyword arguments.
1777
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new
1778
+ #
1779
+ # # Call the delete_hardware_group method.
1780
+ # result = client.delete_hardware_group request
1781
+ #
1782
+ # # The returned object is of type Gapic::Operation. You can use it to
1783
+ # # check the status of an operation, cancel it, or wait for results.
1784
+ # # Here is how to wait for a response.
1785
+ # result.wait_until_done! timeout: 60
1786
+ # if result.response?
1787
+ # p result.response
1788
+ # else
1789
+ # puts "No response received."
1790
+ # end
1791
+ #
1792
+ def delete_hardware_group request, options = nil
1793
+ raise ::ArgumentError, "request must be provided" if request.nil?
1794
+
1795
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest
1796
+
1797
+ # Converts hash and nil to an options object
1798
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1799
+
1800
+ # Customize the options with defaults
1801
+ metadata = @config.rpcs.delete_hardware_group.metadata.to_h
1802
+
1803
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1804
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1805
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1806
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1807
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1808
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1809
+
1810
+ header_params = {}
1811
+ if request.name
1812
+ header_params["name"] = request.name
1813
+ end
1814
+
1815
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1816
+ metadata[:"x-goog-request-params"] ||= request_params_header
1817
+
1818
+ options.apply_defaults timeout: @config.rpcs.delete_hardware_group.timeout,
1819
+ metadata: metadata,
1820
+ retry_policy: @config.rpcs.delete_hardware_group.retry_policy
1821
+
1822
+ options.apply_defaults timeout: @config.timeout,
1823
+ metadata: @config.metadata,
1824
+ retry_policy: @config.retry_policy
1825
+
1826
+ @gdc_hardware_management_stub.call_rpc :delete_hardware_group, request, options: options do |response, operation|
1827
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1828
+ yield response, operation if block_given?
1829
+ return response
1830
+ end
1831
+ rescue ::GRPC::BadStatus => e
1832
+ raise ::Google::Cloud::Error.from_error(e)
1833
+ end
1834
+
1835
+ ##
1836
+ # Lists hardware in a given project and location.
1837
+ #
1838
+ # @overload list_hardware(request, options = nil)
1839
+ # Pass arguments to `list_hardware` via a request object, either of type
1840
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest} or an equivalent Hash.
1841
+ #
1842
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Hash]
1843
+ # A request object representing the call parameters. Required. To specify no
1844
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1845
+ # @param options [::Gapic::CallOptions, ::Hash]
1846
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1847
+ #
1848
+ # @overload list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1849
+ # Pass arguments to `list_hardware` via keyword arguments. Note that at
1850
+ # least one keyword argument is required. To specify no parameters, or to keep all
1851
+ # the default parameter values, pass an empty Hash as a request object (see above).
1852
+ #
1853
+ # @param parent [::String]
1854
+ # Required. The project and location to list hardware in.
1855
+ # Format: `projects/{project}/locations/{location}`
1856
+ # @param page_size [::Integer]
1857
+ # Optional. Requested page size. Server may return fewer items than
1858
+ # requested. If unspecified, server will pick an appropriate default.
1859
+ # @param page_token [::String]
1860
+ # Optional. A token identifying a page of results the server should return.
1861
+ # @param filter [::String]
1862
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
1863
+ # @param order_by [::String]
1864
+ # Optional. Hint for how to order the results.
1865
+ #
1866
+ # @yield [response, operation] Access the result along with the RPC operation
1867
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>]
1868
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1869
+ #
1870
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>]
1871
+ #
1872
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1873
+ #
1874
+ # @example Basic example
1875
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1876
+ #
1877
+ # # Create a client object. The client can be reused for multiple calls.
1878
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1879
+ #
1880
+ # # Create a request. To set request fields, pass in keyword arguments.
1881
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new
1882
+ #
1883
+ # # Call the list_hardware method.
1884
+ # result = client.list_hardware request
1885
+ #
1886
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1887
+ # # over elements, and API calls will be issued to fetch pages as needed.
1888
+ # result.each do |item|
1889
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.
1890
+ # p item
1891
+ # end
1892
+ #
1893
+ def list_hardware request, options = nil
1894
+ raise ::ArgumentError, "request must be provided" if request.nil?
1895
+
1896
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest
1897
+
1898
+ # Converts hash and nil to an options object
1899
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1900
+
1901
+ # Customize the options with defaults
1902
+ metadata = @config.rpcs.list_hardware.metadata.to_h
1903
+
1904
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1905
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1906
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1907
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1908
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1909
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1910
+
1911
+ header_params = {}
1912
+ if request.parent
1913
+ header_params["parent"] = request.parent
1914
+ end
1915
+
1916
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1917
+ metadata[:"x-goog-request-params"] ||= request_params_header
1918
+
1919
+ options.apply_defaults timeout: @config.rpcs.list_hardware.timeout,
1920
+ metadata: metadata,
1921
+ retry_policy: @config.rpcs.list_hardware.retry_policy
1922
+
1923
+ options.apply_defaults timeout: @config.timeout,
1924
+ metadata: @config.metadata,
1925
+ retry_policy: @config.retry_policy
1926
+
1927
+ @gdc_hardware_management_stub.call_rpc :list_hardware, request, options: options do |response, operation|
1928
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, request, response, operation, options
1929
+ yield response, operation if block_given?
1930
+ return response
1931
+ end
1932
+ rescue ::GRPC::BadStatus => e
1933
+ raise ::Google::Cloud::Error.from_error(e)
1934
+ end
1935
+
1936
+ ##
1937
+ # Gets hardware details.
1938
+ #
1939
+ # @overload get_hardware(request, options = nil)
1940
+ # Pass arguments to `get_hardware` via a request object, either of type
1941
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest} or an equivalent Hash.
1942
+ #
1943
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Hash]
1944
+ # A request object representing the call parameters. Required. To specify no
1945
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1946
+ # @param options [::Gapic::CallOptions, ::Hash]
1947
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1948
+ #
1949
+ # @overload get_hardware(name: nil)
1950
+ # Pass arguments to `get_hardware` via keyword arguments. Note that at
1951
+ # least one keyword argument is required. To specify no parameters, or to keep all
1952
+ # the default parameter values, pass an empty Hash as a request object (see above).
1953
+ #
1954
+ # @param name [::String]
1955
+ # Required. The name of the hardware.
1956
+ # Format: `projects/{project}/locations/{location}/hardware/{hardware}`
1957
+ #
1958
+ # @yield [response, operation] Access the result along with the RPC operation
1959
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware]
1960
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1961
+ #
1962
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware]
1963
+ #
1964
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1965
+ #
1966
+ # @example Basic example
1967
+ # require "google/cloud/gdc_hardware_management/v1alpha"
1968
+ #
1969
+ # # Create a client object. The client can be reused for multiple calls.
1970
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
1971
+ #
1972
+ # # Create a request. To set request fields, pass in keyword arguments.
1973
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new
1974
+ #
1975
+ # # Call the get_hardware method.
1976
+ # result = client.get_hardware request
1977
+ #
1978
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.
1979
+ # p result
1980
+ #
1981
+ def get_hardware request, options = nil
1982
+ raise ::ArgumentError, "request must be provided" if request.nil?
1983
+
1984
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest
1985
+
1986
+ # Converts hash and nil to an options object
1987
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1988
+
1989
+ # Customize the options with defaults
1990
+ metadata = @config.rpcs.get_hardware.metadata.to_h
1991
+
1992
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1993
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1994
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1995
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
1996
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1997
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1998
+
1999
+ header_params = {}
2000
+ if request.name
2001
+ header_params["name"] = request.name
2002
+ end
2003
+
2004
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2005
+ metadata[:"x-goog-request-params"] ||= request_params_header
2006
+
2007
+ options.apply_defaults timeout: @config.rpcs.get_hardware.timeout,
2008
+ metadata: metadata,
2009
+ retry_policy: @config.rpcs.get_hardware.retry_policy
2010
+
2011
+ options.apply_defaults timeout: @config.timeout,
2012
+ metadata: @config.metadata,
2013
+ retry_policy: @config.retry_policy
2014
+
2015
+ @gdc_hardware_management_stub.call_rpc :get_hardware, request, options: options do |response, operation|
2016
+ yield response, operation if block_given?
2017
+ return response
2018
+ end
2019
+ rescue ::GRPC::BadStatus => e
2020
+ raise ::Google::Cloud::Error.from_error(e)
2021
+ end
2022
+
2023
+ ##
2024
+ # Creates new hardware in a given project and location.
2025
+ #
2026
+ # @overload create_hardware(request, options = nil)
2027
+ # Pass arguments to `create_hardware` via a request object, either of type
2028
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest} or an equivalent Hash.
2029
+ #
2030
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Hash]
2031
+ # A request object representing the call parameters. Required. To specify no
2032
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2033
+ # @param options [::Gapic::CallOptions, ::Hash]
2034
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2035
+ #
2036
+ # @overload create_hardware(parent: nil, hardware_id: nil, hardware: nil)
2037
+ # Pass arguments to `create_hardware` via keyword arguments. Note that at
2038
+ # least one keyword argument is required. To specify no parameters, or to keep all
2039
+ # the default parameter values, pass an empty Hash as a request object (see above).
2040
+ #
2041
+ # @param parent [::String]
2042
+ # Required. The project and location to create hardware in.
2043
+ # Format: `projects/{project}/locations/{location}`
2044
+ # @param hardware_id [::String]
2045
+ # Optional. ID used to uniquely identify the Hardware within its parent
2046
+ # scope. This field should contain at most 63 characters and must start with
2047
+ # lowercase characters.
2048
+ # Only lowercase characters, numbers and `-` are accepted.
2049
+ # The `-` character cannot be the first or the last one.
2050
+ # A system generated ID will be used if the field is not set.
2051
+ #
2052
+ # The hardware.name field in the request will be ignored.
2053
+ # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash]
2054
+ # Required. The resource to create.
2055
+ #
2056
+ # @yield [response, operation] Access the result along with the RPC operation
2057
+ # @yieldparam response [::Gapic::Operation]
2058
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2059
+ #
2060
+ # @return [::Gapic::Operation]
2061
+ #
2062
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2063
+ #
2064
+ # @example Basic example
2065
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2066
+ #
2067
+ # # Create a client object. The client can be reused for multiple calls.
2068
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2069
+ #
2070
+ # # Create a request. To set request fields, pass in keyword arguments.
2071
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new
2072
+ #
2073
+ # # Call the create_hardware method.
2074
+ # result = client.create_hardware request
2075
+ #
2076
+ # # The returned object is of type Gapic::Operation. You can use it to
2077
+ # # check the status of an operation, cancel it, or wait for results.
2078
+ # # Here is how to wait for a response.
2079
+ # result.wait_until_done! timeout: 60
2080
+ # if result.response?
2081
+ # p result.response
2082
+ # else
2083
+ # puts "No response received."
2084
+ # end
2085
+ #
2086
+ def create_hardware request, options = nil
2087
+ raise ::ArgumentError, "request must be provided" if request.nil?
2088
+
2089
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest
2090
+
2091
+ # Converts hash and nil to an options object
2092
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2093
+
2094
+ # Customize the options with defaults
2095
+ metadata = @config.rpcs.create_hardware.metadata.to_h
2096
+
2097
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2098
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2099
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2100
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2101
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2102
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2103
+
2104
+ header_params = {}
2105
+ if request.parent
2106
+ header_params["parent"] = request.parent
2107
+ end
2108
+
2109
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2110
+ metadata[:"x-goog-request-params"] ||= request_params_header
2111
+
2112
+ options.apply_defaults timeout: @config.rpcs.create_hardware.timeout,
2113
+ metadata: metadata,
2114
+ retry_policy: @config.rpcs.create_hardware.retry_policy
2115
+
2116
+ options.apply_defaults timeout: @config.timeout,
2117
+ metadata: @config.metadata,
2118
+ retry_policy: @config.retry_policy
2119
+
2120
+ @gdc_hardware_management_stub.call_rpc :create_hardware, request, options: options do |response, operation|
2121
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2122
+ yield response, operation if block_given?
2123
+ return response
2124
+ end
2125
+ rescue ::GRPC::BadStatus => e
2126
+ raise ::Google::Cloud::Error.from_error(e)
2127
+ end
2128
+
2129
+ ##
2130
+ # Updates hardware parameters.
2131
+ #
2132
+ # @overload update_hardware(request, options = nil)
2133
+ # Pass arguments to `update_hardware` via a request object, either of type
2134
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest} or an equivalent Hash.
2135
+ #
2136
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Hash]
2137
+ # A request object representing the call parameters. Required. To specify no
2138
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2139
+ # @param options [::Gapic::CallOptions, ::Hash]
2140
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2141
+ #
2142
+ # @overload update_hardware(update_mask: nil, hardware: nil, request_id: nil)
2143
+ # Pass arguments to `update_hardware` via keyword arguments. Note that at
2144
+ # least one keyword argument is required. To specify no parameters, or to keep all
2145
+ # the default parameter values, pass an empty Hash as a request object (see above).
2146
+ #
2147
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2148
+ # Required. A mask to specify the fields in the Hardware to overwrite with
2149
+ # this update. The fields specified in the update_mask are relative to the
2150
+ # hardware, not the full request. A field will be overwritten if it is in the
2151
+ # mask. If you don't provide a mask then all fields will be overwritten.
2152
+ # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash]
2153
+ # Required. The hardware to update.
2154
+ # @param request_id [::String]
2155
+ # Optional. An optional unique identifier for this request. See
2156
+ # [AIP-155](https://google.aip.dev/155).
2157
+ #
2158
+ # @yield [response, operation] Access the result along with the RPC operation
2159
+ # @yieldparam response [::Gapic::Operation]
2160
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2161
+ #
2162
+ # @return [::Gapic::Operation]
2163
+ #
2164
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2165
+ #
2166
+ # @example Basic example
2167
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2168
+ #
2169
+ # # Create a client object. The client can be reused for multiple calls.
2170
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2171
+ #
2172
+ # # Create a request. To set request fields, pass in keyword arguments.
2173
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new
2174
+ #
2175
+ # # Call the update_hardware method.
2176
+ # result = client.update_hardware request
2177
+ #
2178
+ # # The returned object is of type Gapic::Operation. You can use it to
2179
+ # # check the status of an operation, cancel it, or wait for results.
2180
+ # # Here is how to wait for a response.
2181
+ # result.wait_until_done! timeout: 60
2182
+ # if result.response?
2183
+ # p result.response
2184
+ # else
2185
+ # puts "No response received."
2186
+ # end
2187
+ #
2188
+ def update_hardware request, options = nil
2189
+ raise ::ArgumentError, "request must be provided" if request.nil?
2190
+
2191
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest
2192
+
2193
+ # Converts hash and nil to an options object
2194
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2195
+
2196
+ # Customize the options with defaults
2197
+ metadata = @config.rpcs.update_hardware.metadata.to_h
2198
+
2199
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2200
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2201
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2202
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2203
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2204
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2205
+
2206
+ header_params = {}
2207
+ if request.hardware&.name
2208
+ header_params["hardware.name"] = request.hardware.name
2209
+ end
2210
+
2211
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2212
+ metadata[:"x-goog-request-params"] ||= request_params_header
2213
+
2214
+ options.apply_defaults timeout: @config.rpcs.update_hardware.timeout,
2215
+ metadata: metadata,
2216
+ retry_policy: @config.rpcs.update_hardware.retry_policy
2217
+
2218
+ options.apply_defaults timeout: @config.timeout,
2219
+ metadata: @config.metadata,
2220
+ retry_policy: @config.retry_policy
2221
+
2222
+ @gdc_hardware_management_stub.call_rpc :update_hardware, request, options: options do |response, operation|
2223
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2224
+ yield response, operation if block_given?
2225
+ return response
2226
+ end
2227
+ rescue ::GRPC::BadStatus => e
2228
+ raise ::Google::Cloud::Error.from_error(e)
2229
+ end
2230
+
2231
+ ##
2232
+ # Deletes hardware.
2233
+ #
2234
+ # @overload delete_hardware(request, options = nil)
2235
+ # Pass arguments to `delete_hardware` via a request object, either of type
2236
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest} or an equivalent Hash.
2237
+ #
2238
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Hash]
2239
+ # A request object representing the call parameters. Required. To specify no
2240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2241
+ # @param options [::Gapic::CallOptions, ::Hash]
2242
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2243
+ #
2244
+ # @overload delete_hardware(name: nil, request_id: nil)
2245
+ # Pass arguments to `delete_hardware` via keyword arguments. Note that at
2246
+ # least one keyword argument is required. To specify no parameters, or to keep all
2247
+ # the default parameter values, pass an empty Hash as a request object (see above).
2248
+ #
2249
+ # @param name [::String]
2250
+ # Required. The name of the hardware.
2251
+ # Format: `projects/{project}/locations/{location}/hardware/{hardware}`
2252
+ # @param request_id [::String]
2253
+ # Optional. An optional unique identifier for this request. See
2254
+ # [AIP-155](https://google.aip.dev/155).
2255
+ #
2256
+ # @yield [response, operation] Access the result along with the RPC operation
2257
+ # @yieldparam response [::Gapic::Operation]
2258
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2259
+ #
2260
+ # @return [::Gapic::Operation]
2261
+ #
2262
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2263
+ #
2264
+ # @example Basic example
2265
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2266
+ #
2267
+ # # Create a client object. The client can be reused for multiple calls.
2268
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2269
+ #
2270
+ # # Create a request. To set request fields, pass in keyword arguments.
2271
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new
2272
+ #
2273
+ # # Call the delete_hardware method.
2274
+ # result = client.delete_hardware request
2275
+ #
2276
+ # # The returned object is of type Gapic::Operation. You can use it to
2277
+ # # check the status of an operation, cancel it, or wait for results.
2278
+ # # Here is how to wait for a response.
2279
+ # result.wait_until_done! timeout: 60
2280
+ # if result.response?
2281
+ # p result.response
2282
+ # else
2283
+ # puts "No response received."
2284
+ # end
2285
+ #
2286
+ def delete_hardware request, options = nil
2287
+ raise ::ArgumentError, "request must be provided" if request.nil?
2288
+
2289
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest
2290
+
2291
+ # Converts hash and nil to an options object
2292
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2293
+
2294
+ # Customize the options with defaults
2295
+ metadata = @config.rpcs.delete_hardware.metadata.to_h
2296
+
2297
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2298
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2299
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2300
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2301
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2302
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2303
+
2304
+ header_params = {}
2305
+ if request.name
2306
+ header_params["name"] = request.name
2307
+ end
2308
+
2309
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2310
+ metadata[:"x-goog-request-params"] ||= request_params_header
2311
+
2312
+ options.apply_defaults timeout: @config.rpcs.delete_hardware.timeout,
2313
+ metadata: metadata,
2314
+ retry_policy: @config.rpcs.delete_hardware.retry_policy
2315
+
2316
+ options.apply_defaults timeout: @config.timeout,
2317
+ metadata: @config.metadata,
2318
+ retry_policy: @config.retry_policy
2319
+
2320
+ @gdc_hardware_management_stub.call_rpc :delete_hardware, request, options: options do |response, operation|
2321
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2322
+ yield response, operation if block_given?
2323
+ return response
2324
+ end
2325
+ rescue ::GRPC::BadStatus => e
2326
+ raise ::Google::Cloud::Error.from_error(e)
2327
+ end
2328
+
2329
+ ##
2330
+ # Lists the comments on an order.
2331
+ #
2332
+ # @overload list_comments(request, options = nil)
2333
+ # Pass arguments to `list_comments` via a request object, either of type
2334
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest} or an equivalent Hash.
2335
+ #
2336
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Hash]
2337
+ # A request object representing the call parameters. Required. To specify no
2338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2339
+ # @param options [::Gapic::CallOptions, ::Hash]
2340
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2341
+ #
2342
+ # @overload list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2343
+ # Pass arguments to `list_comments` via keyword arguments. Note that at
2344
+ # least one keyword argument is required. To specify no parameters, or to keep all
2345
+ # the default parameter values, pass an empty Hash as a request object (see above).
2346
+ #
2347
+ # @param parent [::String]
2348
+ # Required. The order to list comments on.
2349
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
2350
+ # @param page_size [::Integer]
2351
+ # Optional. Requested page size. Server may return fewer items than
2352
+ # requested. If unspecified, server will pick an appropriate default.
2353
+ # @param page_token [::String]
2354
+ # Optional. A token identifying a page of results the server should return.
2355
+ # @param filter [::String]
2356
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
2357
+ # @param order_by [::String]
2358
+ # Optional. Hint for how to order the results.
2359
+ #
2360
+ # @yield [response, operation] Access the result along with the RPC operation
2361
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>]
2362
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2363
+ #
2364
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>]
2365
+ #
2366
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2367
+ #
2368
+ # @example Basic example
2369
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2370
+ #
2371
+ # # Create a client object. The client can be reused for multiple calls.
2372
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2373
+ #
2374
+ # # Create a request. To set request fields, pass in keyword arguments.
2375
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new
2376
+ #
2377
+ # # Call the list_comments method.
2378
+ # result = client.list_comments request
2379
+ #
2380
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2381
+ # # over elements, and API calls will be issued to fetch pages as needed.
2382
+ # result.each do |item|
2383
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.
2384
+ # p item
2385
+ # end
2386
+ #
2387
+ def list_comments request, options = nil
2388
+ raise ::ArgumentError, "request must be provided" if request.nil?
2389
+
2390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest
2391
+
2392
+ # Converts hash and nil to an options object
2393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2394
+
2395
+ # Customize the options with defaults
2396
+ metadata = @config.rpcs.list_comments.metadata.to_h
2397
+
2398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2399
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2401
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2402
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2403
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2404
+
2405
+ header_params = {}
2406
+ if request.parent
2407
+ header_params["parent"] = request.parent
2408
+ end
2409
+
2410
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2411
+ metadata[:"x-goog-request-params"] ||= request_params_header
2412
+
2413
+ options.apply_defaults timeout: @config.rpcs.list_comments.timeout,
2414
+ metadata: metadata,
2415
+ retry_policy: @config.rpcs.list_comments.retry_policy
2416
+
2417
+ options.apply_defaults timeout: @config.timeout,
2418
+ metadata: @config.metadata,
2419
+ retry_policy: @config.retry_policy
2420
+
2421
+ @gdc_hardware_management_stub.call_rpc :list_comments, request, options: options do |response, operation|
2422
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, request, response, operation, options
2423
+ yield response, operation if block_given?
2424
+ return response
2425
+ end
2426
+ rescue ::GRPC::BadStatus => e
2427
+ raise ::Google::Cloud::Error.from_error(e)
2428
+ end
2429
+
2430
+ ##
2431
+ # Gets the content of a comment.
2432
+ #
2433
+ # @overload get_comment(request, options = nil)
2434
+ # Pass arguments to `get_comment` via a request object, either of type
2435
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest} or an equivalent Hash.
2436
+ #
2437
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Hash]
2438
+ # A request object representing the call parameters. Required. To specify no
2439
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2440
+ # @param options [::Gapic::CallOptions, ::Hash]
2441
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2442
+ #
2443
+ # @overload get_comment(name: nil)
2444
+ # Pass arguments to `get_comment` via keyword arguments. Note that at
2445
+ # least one keyword argument is required. To specify no parameters, or to keep all
2446
+ # the default parameter values, pass an empty Hash as a request object (see above).
2447
+ #
2448
+ # @param name [::String]
2449
+ # Required. The name of the comment.
2450
+ # Format:
2451
+ # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
2452
+ #
2453
+ # @yield [response, operation] Access the result along with the RPC operation
2454
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment]
2455
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2456
+ #
2457
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment]
2458
+ #
2459
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2460
+ #
2461
+ # @example Basic example
2462
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2463
+ #
2464
+ # # Create a client object. The client can be reused for multiple calls.
2465
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2466
+ #
2467
+ # # Create a request. To set request fields, pass in keyword arguments.
2468
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new
2469
+ #
2470
+ # # Call the get_comment method.
2471
+ # result = client.get_comment request
2472
+ #
2473
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment.
2474
+ # p result
2475
+ #
2476
+ def get_comment request, options = nil
2477
+ raise ::ArgumentError, "request must be provided" if request.nil?
2478
+
2479
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest
2480
+
2481
+ # Converts hash and nil to an options object
2482
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2483
+
2484
+ # Customize the options with defaults
2485
+ metadata = @config.rpcs.get_comment.metadata.to_h
2486
+
2487
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2488
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2489
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2490
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2491
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2492
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2493
+
2494
+ header_params = {}
2495
+ if request.name
2496
+ header_params["name"] = request.name
2497
+ end
2498
+
2499
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2500
+ metadata[:"x-goog-request-params"] ||= request_params_header
2501
+
2502
+ options.apply_defaults timeout: @config.rpcs.get_comment.timeout,
2503
+ metadata: metadata,
2504
+ retry_policy: @config.rpcs.get_comment.retry_policy
2505
+
2506
+ options.apply_defaults timeout: @config.timeout,
2507
+ metadata: @config.metadata,
2508
+ retry_policy: @config.retry_policy
2509
+
2510
+ @gdc_hardware_management_stub.call_rpc :get_comment, request, options: options do |response, operation|
2511
+ yield response, operation if block_given?
2512
+ return response
2513
+ end
2514
+ rescue ::GRPC::BadStatus => e
2515
+ raise ::Google::Cloud::Error.from_error(e)
2516
+ end
2517
+
2518
+ ##
2519
+ # Creates a new comment on an order.
2520
+ #
2521
+ # @overload create_comment(request, options = nil)
2522
+ # Pass arguments to `create_comment` via a request object, either of type
2523
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest} or an equivalent Hash.
2524
+ #
2525
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Hash]
2526
+ # A request object representing the call parameters. Required. To specify no
2527
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2528
+ # @param options [::Gapic::CallOptions, ::Hash]
2529
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2530
+ #
2531
+ # @overload create_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil)
2532
+ # Pass arguments to `create_comment` via keyword arguments. Note that at
2533
+ # least one keyword argument is required. To specify no parameters, or to keep all
2534
+ # the default parameter values, pass an empty Hash as a request object (see above).
2535
+ #
2536
+ # @param parent [::String]
2537
+ # Required. The order to create the comment on.
2538
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
2539
+ # @param comment_id [::String]
2540
+ # Optional. ID used to uniquely identify the Comment within its parent scope.
2541
+ # This field should contain at most 63 characters and must start with
2542
+ # lowercase characters.
2543
+ # Only lowercase characters, numbers and `-` are accepted.
2544
+ # The `-` character cannot be the first or the last one.
2545
+ # A system generated ID will be used if the field is not set.
2546
+ #
2547
+ # The comment.name field in the request will be ignored.
2548
+ # @param comment [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment, ::Hash]
2549
+ # Required. The comment to create.
2550
+ # @param request_id [::String]
2551
+ # Optional. An optional unique identifier for this request. See
2552
+ # [AIP-155](https://google.aip.dev/155).
2553
+ #
2554
+ # @yield [response, operation] Access the result along with the RPC operation
2555
+ # @yieldparam response [::Gapic::Operation]
2556
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2557
+ #
2558
+ # @return [::Gapic::Operation]
2559
+ #
2560
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2561
+ #
2562
+ # @example Basic example
2563
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2564
+ #
2565
+ # # Create a client object. The client can be reused for multiple calls.
2566
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2567
+ #
2568
+ # # Create a request. To set request fields, pass in keyword arguments.
2569
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new
2570
+ #
2571
+ # # Call the create_comment method.
2572
+ # result = client.create_comment request
2573
+ #
2574
+ # # The returned object is of type Gapic::Operation. You can use it to
2575
+ # # check the status of an operation, cancel it, or wait for results.
2576
+ # # Here is how to wait for a response.
2577
+ # result.wait_until_done! timeout: 60
2578
+ # if result.response?
2579
+ # p result.response
2580
+ # else
2581
+ # puts "No response received."
2582
+ # end
2583
+ #
2584
+ def create_comment request, options = nil
2585
+ raise ::ArgumentError, "request must be provided" if request.nil?
2586
+
2587
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest
2588
+
2589
+ # Converts hash and nil to an options object
2590
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2591
+
2592
+ # Customize the options with defaults
2593
+ metadata = @config.rpcs.create_comment.metadata.to_h
2594
+
2595
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2596
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2597
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2598
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2599
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2600
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2601
+
2602
+ header_params = {}
2603
+ if request.parent
2604
+ header_params["parent"] = request.parent
2605
+ end
2606
+
2607
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2608
+ metadata[:"x-goog-request-params"] ||= request_params_header
2609
+
2610
+ options.apply_defaults timeout: @config.rpcs.create_comment.timeout,
2611
+ metadata: metadata,
2612
+ retry_policy: @config.rpcs.create_comment.retry_policy
2613
+
2614
+ options.apply_defaults timeout: @config.timeout,
2615
+ metadata: @config.metadata,
2616
+ retry_policy: @config.retry_policy
2617
+
2618
+ @gdc_hardware_management_stub.call_rpc :create_comment, request, options: options do |response, operation|
2619
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2620
+ yield response, operation if block_given?
2621
+ return response
2622
+ end
2623
+ rescue ::GRPC::BadStatus => e
2624
+ raise ::Google::Cloud::Error.from_error(e)
2625
+ end
2626
+
2627
+ ##
2628
+ # Lists the changes made to an order.
2629
+ #
2630
+ # @overload list_change_log_entries(request, options = nil)
2631
+ # Pass arguments to `list_change_log_entries` via a request object, either of type
2632
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest} or an equivalent Hash.
2633
+ #
2634
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Hash]
2635
+ # A request object representing the call parameters. Required. To specify no
2636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2637
+ # @param options [::Gapic::CallOptions, ::Hash]
2638
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2639
+ #
2640
+ # @overload list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2641
+ # Pass arguments to `list_change_log_entries` via keyword arguments. Note that at
2642
+ # least one keyword argument is required. To specify no parameters, or to keep all
2643
+ # the default parameter values, pass an empty Hash as a request object (see above).
2644
+ #
2645
+ # @param parent [::String]
2646
+ # Required. The order to list change log entries for.
2647
+ # Format: `projects/{project}/locations/{location}/orders/{order}`
2648
+ # @param page_size [::Integer]
2649
+ # Optional. Requested page size. Server may return fewer items than
2650
+ # requested. If unspecified, server will pick an appropriate default.
2651
+ # @param page_token [::String]
2652
+ # Optional. A token identifying a page of results the server should return.
2653
+ # @param filter [::String]
2654
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
2655
+ # @param order_by [::String]
2656
+ # Optional. Hint for how to order the results.
2657
+ #
2658
+ # @yield [response, operation] Access the result along with the RPC operation
2659
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>]
2660
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2661
+ #
2662
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>]
2663
+ #
2664
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2665
+ #
2666
+ # @example Basic example
2667
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2668
+ #
2669
+ # # Create a client object. The client can be reused for multiple calls.
2670
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2671
+ #
2672
+ # # Create a request. To set request fields, pass in keyword arguments.
2673
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new
2674
+ #
2675
+ # # Call the list_change_log_entries method.
2676
+ # result = client.list_change_log_entries request
2677
+ #
2678
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2679
+ # # over elements, and API calls will be issued to fetch pages as needed.
2680
+ # result.each do |item|
2681
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.
2682
+ # p item
2683
+ # end
2684
+ #
2685
+ def list_change_log_entries request, options = nil
2686
+ raise ::ArgumentError, "request must be provided" if request.nil?
2687
+
2688
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest
2689
+
2690
+ # Converts hash and nil to an options object
2691
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2692
+
2693
+ # Customize the options with defaults
2694
+ metadata = @config.rpcs.list_change_log_entries.metadata.to_h
2695
+
2696
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2697
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2698
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2699
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2700
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2701
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2702
+
2703
+ header_params = {}
2704
+ if request.parent
2705
+ header_params["parent"] = request.parent
2706
+ end
2707
+
2708
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2709
+ metadata[:"x-goog-request-params"] ||= request_params_header
2710
+
2711
+ options.apply_defaults timeout: @config.rpcs.list_change_log_entries.timeout,
2712
+ metadata: metadata,
2713
+ retry_policy: @config.rpcs.list_change_log_entries.retry_policy
2714
+
2715
+ options.apply_defaults timeout: @config.timeout,
2716
+ metadata: @config.metadata,
2717
+ retry_policy: @config.retry_policy
2718
+
2719
+ @gdc_hardware_management_stub.call_rpc :list_change_log_entries, request, options: options do |response, operation|
2720
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_entries, request, response, operation, options
2721
+ yield response, operation if block_given?
2722
+ return response
2723
+ end
2724
+ rescue ::GRPC::BadStatus => e
2725
+ raise ::Google::Cloud::Error.from_error(e)
2726
+ end
2727
+
2728
+ ##
2729
+ # Gets details of a change to an order.
2730
+ #
2731
+ # @overload get_change_log_entry(request, options = nil)
2732
+ # Pass arguments to `get_change_log_entry` via a request object, either of type
2733
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest} or an equivalent Hash.
2734
+ #
2735
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Hash]
2736
+ # A request object representing the call parameters. Required. To specify no
2737
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2738
+ # @param options [::Gapic::CallOptions, ::Hash]
2739
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2740
+ #
2741
+ # @overload get_change_log_entry(name: nil)
2742
+ # Pass arguments to `get_change_log_entry` via keyword arguments. Note that at
2743
+ # least one keyword argument is required. To specify no parameters, or to keep all
2744
+ # the default parameter values, pass an empty Hash as a request object (see above).
2745
+ #
2746
+ # @param name [::String]
2747
+ # Required. The name of the change log entry.
2748
+ # Format:
2749
+ # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
2750
+ #
2751
+ # @yield [response, operation] Access the result along with the RPC operation
2752
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry]
2753
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2754
+ #
2755
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry]
2756
+ #
2757
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2758
+ #
2759
+ # @example Basic example
2760
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2761
+ #
2762
+ # # Create a client object. The client can be reused for multiple calls.
2763
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2764
+ #
2765
+ # # Create a request. To set request fields, pass in keyword arguments.
2766
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new
2767
+ #
2768
+ # # Call the get_change_log_entry method.
2769
+ # result = client.get_change_log_entry request
2770
+ #
2771
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.
2772
+ # p result
2773
+ #
2774
+ def get_change_log_entry request, options = nil
2775
+ raise ::ArgumentError, "request must be provided" if request.nil?
2776
+
2777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest
2778
+
2779
+ # Converts hash and nil to an options object
2780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2781
+
2782
+ # Customize the options with defaults
2783
+ metadata = @config.rpcs.get_change_log_entry.metadata.to_h
2784
+
2785
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2786
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2788
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2789
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2790
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2791
+
2792
+ header_params = {}
2793
+ if request.name
2794
+ header_params["name"] = request.name
2795
+ end
2796
+
2797
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2798
+ metadata[:"x-goog-request-params"] ||= request_params_header
2799
+
2800
+ options.apply_defaults timeout: @config.rpcs.get_change_log_entry.timeout,
2801
+ metadata: metadata,
2802
+ retry_policy: @config.rpcs.get_change_log_entry.retry_policy
2803
+
2804
+ options.apply_defaults timeout: @config.timeout,
2805
+ metadata: @config.metadata,
2806
+ retry_policy: @config.retry_policy
2807
+
2808
+ @gdc_hardware_management_stub.call_rpc :get_change_log_entry, request, options: options do |response, operation|
2809
+ yield response, operation if block_given?
2810
+ return response
2811
+ end
2812
+ rescue ::GRPC::BadStatus => e
2813
+ raise ::Google::Cloud::Error.from_error(e)
2814
+ end
2815
+
2816
+ ##
2817
+ # Lists SKUs for a given project and location.
2818
+ #
2819
+ # @overload list_skus(request, options = nil)
2820
+ # Pass arguments to `list_skus` via a request object, either of type
2821
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest} or an equivalent Hash.
2822
+ #
2823
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Hash]
2824
+ # A request object representing the call parameters. Required. To specify no
2825
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2826
+ # @param options [::Gapic::CallOptions, ::Hash]
2827
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2828
+ #
2829
+ # @overload list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2830
+ # Pass arguments to `list_skus` via keyword arguments. Note that at
2831
+ # least one keyword argument is required. To specify no parameters, or to keep all
2832
+ # the default parameter values, pass an empty Hash as a request object (see above).
2833
+ #
2834
+ # @param parent [::String]
2835
+ # Required. The project and location to list SKUs in.
2836
+ # Format: `projects/{project}/locations/{location}`
2837
+ # @param page_size [::Integer]
2838
+ # Optional. Requested page size. Server may return fewer items than
2839
+ # requested. If unspecified, server will pick an appropriate default.
2840
+ # @param page_token [::String]
2841
+ # Optional. A token identifying a page of results the server should return.
2842
+ # @param filter [::String]
2843
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
2844
+ # @param order_by [::String]
2845
+ # Optional. Hint for how to order the results.
2846
+ #
2847
+ # @yield [response, operation] Access the result along with the RPC operation
2848
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>]
2849
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2850
+ #
2851
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>]
2852
+ #
2853
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2854
+ #
2855
+ # @example Basic example
2856
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2857
+ #
2858
+ # # Create a client object. The client can be reused for multiple calls.
2859
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2860
+ #
2861
+ # # Create a request. To set request fields, pass in keyword arguments.
2862
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new
2863
+ #
2864
+ # # Call the list_skus method.
2865
+ # result = client.list_skus request
2866
+ #
2867
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2868
+ # # over elements, and API calls will be issued to fetch pages as needed.
2869
+ # result.each do |item|
2870
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.
2871
+ # p item
2872
+ # end
2873
+ #
2874
+ def list_skus request, options = nil
2875
+ raise ::ArgumentError, "request must be provided" if request.nil?
2876
+
2877
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest
2878
+
2879
+ # Converts hash and nil to an options object
2880
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2881
+
2882
+ # Customize the options with defaults
2883
+ metadata = @config.rpcs.list_skus.metadata.to_h
2884
+
2885
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2886
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2887
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2888
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2889
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2890
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2891
+
2892
+ header_params = {}
2893
+ if request.parent
2894
+ header_params["parent"] = request.parent
2895
+ end
2896
+
2897
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2898
+ metadata[:"x-goog-request-params"] ||= request_params_header
2899
+
2900
+ options.apply_defaults timeout: @config.rpcs.list_skus.timeout,
2901
+ metadata: metadata,
2902
+ retry_policy: @config.rpcs.list_skus.retry_policy
2903
+
2904
+ options.apply_defaults timeout: @config.timeout,
2905
+ metadata: @config.metadata,
2906
+ retry_policy: @config.retry_policy
2907
+
2908
+ @gdc_hardware_management_stub.call_rpc :list_skus, request, options: options do |response, operation|
2909
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, request, response, operation, options
2910
+ yield response, operation if block_given?
2911
+ return response
2912
+ end
2913
+ rescue ::GRPC::BadStatus => e
2914
+ raise ::Google::Cloud::Error.from_error(e)
2915
+ end
2916
+
2917
+ ##
2918
+ # Gets details of an SKU.
2919
+ #
2920
+ # @overload get_sku(request, options = nil)
2921
+ # Pass arguments to `get_sku` via a request object, either of type
2922
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest} or an equivalent Hash.
2923
+ #
2924
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Hash]
2925
+ # A request object representing the call parameters. Required. To specify no
2926
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2927
+ # @param options [::Gapic::CallOptions, ::Hash]
2928
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2929
+ #
2930
+ # @overload get_sku(name: nil)
2931
+ # Pass arguments to `get_sku` via keyword arguments. Note that at
2932
+ # least one keyword argument is required. To specify no parameters, or to keep all
2933
+ # the default parameter values, pass an empty Hash as a request object (see above).
2934
+ #
2935
+ # @param name [::String]
2936
+ # Required. The name of the SKU.
2937
+ # Format: `projects/{project}/locations/{location}/skus/{sku}`
2938
+ #
2939
+ # @yield [response, operation] Access the result along with the RPC operation
2940
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku]
2941
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2942
+ #
2943
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku]
2944
+ #
2945
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2946
+ #
2947
+ # @example Basic example
2948
+ # require "google/cloud/gdc_hardware_management/v1alpha"
2949
+ #
2950
+ # # Create a client object. The client can be reused for multiple calls.
2951
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
2952
+ #
2953
+ # # Create a request. To set request fields, pass in keyword arguments.
2954
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new
2955
+ #
2956
+ # # Call the get_sku method.
2957
+ # result = client.get_sku request
2958
+ #
2959
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku.
2960
+ # p result
2961
+ #
2962
+ def get_sku request, options = nil
2963
+ raise ::ArgumentError, "request must be provided" if request.nil?
2964
+
2965
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest
2966
+
2967
+ # Converts hash and nil to an options object
2968
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2969
+
2970
+ # Customize the options with defaults
2971
+ metadata = @config.rpcs.get_sku.metadata.to_h
2972
+
2973
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2974
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2975
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2976
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
2977
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2978
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2979
+
2980
+ header_params = {}
2981
+ if request.name
2982
+ header_params["name"] = request.name
2983
+ end
2984
+
2985
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2986
+ metadata[:"x-goog-request-params"] ||= request_params_header
2987
+
2988
+ options.apply_defaults timeout: @config.rpcs.get_sku.timeout,
2989
+ metadata: metadata,
2990
+ retry_policy: @config.rpcs.get_sku.retry_policy
2991
+
2992
+ options.apply_defaults timeout: @config.timeout,
2993
+ metadata: @config.metadata,
2994
+ retry_policy: @config.retry_policy
2995
+
2996
+ @gdc_hardware_management_stub.call_rpc :get_sku, request, options: options do |response, operation|
2997
+ yield response, operation if block_given?
2998
+ return response
2999
+ end
3000
+ rescue ::GRPC::BadStatus => e
3001
+ raise ::Google::Cloud::Error.from_error(e)
3002
+ end
3003
+
3004
+ ##
3005
+ # Lists zones in a given project and location.
3006
+ #
3007
+ # @overload list_zones(request, options = nil)
3008
+ # Pass arguments to `list_zones` via a request object, either of type
3009
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest} or an equivalent Hash.
3010
+ #
3011
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest, ::Hash]
3012
+ # A request object representing the call parameters. Required. To specify no
3013
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3014
+ # @param options [::Gapic::CallOptions, ::Hash]
3015
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3016
+ #
3017
+ # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3018
+ # Pass arguments to `list_zones` via keyword arguments. Note that at
3019
+ # least one keyword argument is required. To specify no parameters, or to keep all
3020
+ # the default parameter values, pass an empty Hash as a request object (see above).
3021
+ #
3022
+ # @param parent [::String]
3023
+ # Required. The project and location to list zones in.
3024
+ # Format: `projects/{project}/locations/{location}`
3025
+ # @param page_size [::Integer]
3026
+ # Optional. Requested page size. Server may return fewer items than
3027
+ # requested. If unspecified, server will pick an appropriate default.
3028
+ # @param page_token [::String]
3029
+ # Optional. A token identifying a page of results the server should return.
3030
+ # @param filter [::String]
3031
+ # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
3032
+ # @param order_by [::String]
3033
+ # Optional. Hint for how to order the results.
3034
+ #
3035
+ # @yield [response, operation] Access the result along with the RPC operation
3036
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>]
3037
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3038
+ #
3039
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>]
3040
+ #
3041
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3042
+ #
3043
+ # @example Basic example
3044
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3045
+ #
3046
+ # # Create a client object. The client can be reused for multiple calls.
3047
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3048
+ #
3049
+ # # Create a request. To set request fields, pass in keyword arguments.
3050
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest.new
3051
+ #
3052
+ # # Call the list_zones method.
3053
+ # result = client.list_zones request
3054
+ #
3055
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3056
+ # # over elements, and API calls will be issued to fetch pages as needed.
3057
+ # result.each do |item|
3058
+ # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone.
3059
+ # p item
3060
+ # end
3061
+ #
3062
+ def list_zones request, options = nil
3063
+ raise ::ArgumentError, "request must be provided" if request.nil?
3064
+
3065
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest
3066
+
3067
+ # Converts hash and nil to an options object
3068
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3069
+
3070
+ # Customize the options with defaults
3071
+ metadata = @config.rpcs.list_zones.metadata.to_h
3072
+
3073
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3074
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3075
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3076
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3077
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3078
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3079
+
3080
+ header_params = {}
3081
+ if request.parent
3082
+ header_params["parent"] = request.parent
3083
+ end
3084
+
3085
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3086
+ metadata[:"x-goog-request-params"] ||= request_params_header
3087
+
3088
+ options.apply_defaults timeout: @config.rpcs.list_zones.timeout,
3089
+ metadata: metadata,
3090
+ retry_policy: @config.rpcs.list_zones.retry_policy
3091
+
3092
+ options.apply_defaults timeout: @config.timeout,
3093
+ metadata: @config.metadata,
3094
+ retry_policy: @config.retry_policy
3095
+
3096
+ @gdc_hardware_management_stub.call_rpc :list_zones, request, options: options do |response, operation|
3097
+ response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_zones, request, response, operation, options
3098
+ yield response, operation if block_given?
3099
+ return response
3100
+ end
3101
+ rescue ::GRPC::BadStatus => e
3102
+ raise ::Google::Cloud::Error.from_error(e)
3103
+ end
3104
+
3105
+ ##
3106
+ # Gets details of a zone.
3107
+ #
3108
+ # @overload get_zone(request, options = nil)
3109
+ # Pass arguments to `get_zone` via a request object, either of type
3110
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest} or an equivalent Hash.
3111
+ #
3112
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest, ::Hash]
3113
+ # A request object representing the call parameters. Required. To specify no
3114
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3115
+ # @param options [::Gapic::CallOptions, ::Hash]
3116
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3117
+ #
3118
+ # @overload get_zone(name: nil)
3119
+ # Pass arguments to `get_zone` via keyword arguments. Note that at
3120
+ # least one keyword argument is required. To specify no parameters, or to keep all
3121
+ # the default parameter values, pass an empty Hash as a request object (see above).
3122
+ #
3123
+ # @param name [::String]
3124
+ # Required. The name of the zone.
3125
+ # Format: `projects/{project}/locations/{location}/zones/{zone}`
3126
+ #
3127
+ # @yield [response, operation] Access the result along with the RPC operation
3128
+ # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone]
3129
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3130
+ #
3131
+ # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone]
3132
+ #
3133
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3134
+ #
3135
+ # @example Basic example
3136
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3137
+ #
3138
+ # # Create a client object. The client can be reused for multiple calls.
3139
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3140
+ #
3141
+ # # Create a request. To set request fields, pass in keyword arguments.
3142
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new
3143
+ #
3144
+ # # Call the get_zone method.
3145
+ # result = client.get_zone request
3146
+ #
3147
+ # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Zone.
3148
+ # p result
3149
+ #
3150
+ def get_zone request, options = nil
3151
+ raise ::ArgumentError, "request must be provided" if request.nil?
3152
+
3153
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest
3154
+
3155
+ # Converts hash and nil to an options object
3156
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3157
+
3158
+ # Customize the options with defaults
3159
+ metadata = @config.rpcs.get_zone.metadata.to_h
3160
+
3161
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3162
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3163
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3164
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3165
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3166
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3167
+
3168
+ header_params = {}
3169
+ if request.name
3170
+ header_params["name"] = request.name
3171
+ end
3172
+
3173
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3174
+ metadata[:"x-goog-request-params"] ||= request_params_header
3175
+
3176
+ options.apply_defaults timeout: @config.rpcs.get_zone.timeout,
3177
+ metadata: metadata,
3178
+ retry_policy: @config.rpcs.get_zone.retry_policy
3179
+
3180
+ options.apply_defaults timeout: @config.timeout,
3181
+ metadata: @config.metadata,
3182
+ retry_policy: @config.retry_policy
3183
+
3184
+ @gdc_hardware_management_stub.call_rpc :get_zone, request, options: options do |response, operation|
3185
+ yield response, operation if block_given?
3186
+ return response
3187
+ end
3188
+ rescue ::GRPC::BadStatus => e
3189
+ raise ::Google::Cloud::Error.from_error(e)
3190
+ end
3191
+
3192
+ ##
3193
+ # Creates a new zone in a given project and location.
3194
+ #
3195
+ # @overload create_zone(request, options = nil)
3196
+ # Pass arguments to `create_zone` via a request object, either of type
3197
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest} or an equivalent Hash.
3198
+ #
3199
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest, ::Hash]
3200
+ # A request object representing the call parameters. Required. To specify no
3201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3202
+ # @param options [::Gapic::CallOptions, ::Hash]
3203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3204
+ #
3205
+ # @overload create_zone(parent: nil, zone_id: nil, zone: nil, request_id: nil)
3206
+ # Pass arguments to `create_zone` via keyword arguments. Note that at
3207
+ # least one keyword argument is required. To specify no parameters, or to keep all
3208
+ # the default parameter values, pass an empty Hash as a request object (see above).
3209
+ #
3210
+ # @param parent [::String]
3211
+ # Required. The project and location to create the zone in.
3212
+ # Format: `projects/{project}/locations/{location}`
3213
+ # @param zone_id [::String]
3214
+ # Optional. ID used to uniquely identify the Zone within its parent scope.
3215
+ # This field should contain at most 63 characters and must start with
3216
+ # lowercase characters.
3217
+ # Only lowercase characters, numbers and `-` are accepted.
3218
+ # The `-` character cannot be the first or the last one.
3219
+ # A system generated ID will be used if the field is not set.
3220
+ #
3221
+ # The zone.name field in the request will be ignored.
3222
+ # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash]
3223
+ # Required. The zone to create.
3224
+ # @param request_id [::String]
3225
+ # Optional. An optional unique identifier for this request. See
3226
+ # [AIP-155](https://google.aip.dev/155).
3227
+ #
3228
+ # @yield [response, operation] Access the result along with the RPC operation
3229
+ # @yieldparam response [::Gapic::Operation]
3230
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3231
+ #
3232
+ # @return [::Gapic::Operation]
3233
+ #
3234
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3235
+ #
3236
+ # @example Basic example
3237
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3238
+ #
3239
+ # # Create a client object. The client can be reused for multiple calls.
3240
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3241
+ #
3242
+ # # Create a request. To set request fields, pass in keyword arguments.
3243
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new
3244
+ #
3245
+ # # Call the create_zone method.
3246
+ # result = client.create_zone request
3247
+ #
3248
+ # # The returned object is of type Gapic::Operation. You can use it to
3249
+ # # check the status of an operation, cancel it, or wait for results.
3250
+ # # Here is how to wait for a response.
3251
+ # result.wait_until_done! timeout: 60
3252
+ # if result.response?
3253
+ # p result.response
3254
+ # else
3255
+ # puts "No response received."
3256
+ # end
3257
+ #
3258
+ def create_zone request, options = nil
3259
+ raise ::ArgumentError, "request must be provided" if request.nil?
3260
+
3261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest
3262
+
3263
+ # Converts hash and nil to an options object
3264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3265
+
3266
+ # Customize the options with defaults
3267
+ metadata = @config.rpcs.create_zone.metadata.to_h
3268
+
3269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3270
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3272
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3273
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3274
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3275
+
3276
+ header_params = {}
3277
+ if request.parent
3278
+ header_params["parent"] = request.parent
3279
+ end
3280
+
3281
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3282
+ metadata[:"x-goog-request-params"] ||= request_params_header
3283
+
3284
+ options.apply_defaults timeout: @config.rpcs.create_zone.timeout,
3285
+ metadata: metadata,
3286
+ retry_policy: @config.rpcs.create_zone.retry_policy
3287
+
3288
+ options.apply_defaults timeout: @config.timeout,
3289
+ metadata: @config.metadata,
3290
+ retry_policy: @config.retry_policy
3291
+
3292
+ @gdc_hardware_management_stub.call_rpc :create_zone, request, options: options do |response, operation|
3293
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3294
+ yield response, operation if block_given?
3295
+ return response
3296
+ end
3297
+ rescue ::GRPC::BadStatus => e
3298
+ raise ::Google::Cloud::Error.from_error(e)
3299
+ end
3300
+
3301
+ ##
3302
+ # Updates the parameters of a zone.
3303
+ #
3304
+ # @overload update_zone(request, options = nil)
3305
+ # Pass arguments to `update_zone` via a request object, either of type
3306
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest} or an equivalent Hash.
3307
+ #
3308
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest, ::Hash]
3309
+ # A request object representing the call parameters. Required. To specify no
3310
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3311
+ # @param options [::Gapic::CallOptions, ::Hash]
3312
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3313
+ #
3314
+ # @overload update_zone(update_mask: nil, zone: nil, request_id: nil)
3315
+ # Pass arguments to `update_zone` via keyword arguments. Note that at
3316
+ # least one keyword argument is required. To specify no parameters, or to keep all
3317
+ # the default parameter values, pass an empty Hash as a request object (see above).
3318
+ #
3319
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3320
+ # Required. A mask to specify the fields in the Zone to overwrite with this
3321
+ # update. The fields specified in the update_mask are relative to the zone,
3322
+ # not the full request. A field will be overwritten if it is in the mask. If
3323
+ # you don't provide a mask then all fields will be overwritten.
3324
+ # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash]
3325
+ # Required. The zone to update.
3326
+ # @param request_id [::String]
3327
+ # Optional. An optional unique identifier for this request. See
3328
+ # [AIP-155](https://google.aip.dev/155).
3329
+ #
3330
+ # @yield [response, operation] Access the result along with the RPC operation
3331
+ # @yieldparam response [::Gapic::Operation]
3332
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3333
+ #
3334
+ # @return [::Gapic::Operation]
3335
+ #
3336
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3337
+ #
3338
+ # @example Basic example
3339
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3340
+ #
3341
+ # # Create a client object. The client can be reused for multiple calls.
3342
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3343
+ #
3344
+ # # Create a request. To set request fields, pass in keyword arguments.
3345
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new
3346
+ #
3347
+ # # Call the update_zone method.
3348
+ # result = client.update_zone request
3349
+ #
3350
+ # # The returned object is of type Gapic::Operation. You can use it to
3351
+ # # check the status of an operation, cancel it, or wait for results.
3352
+ # # Here is how to wait for a response.
3353
+ # result.wait_until_done! timeout: 60
3354
+ # if result.response?
3355
+ # p result.response
3356
+ # else
3357
+ # puts "No response received."
3358
+ # end
3359
+ #
3360
+ def update_zone request, options = nil
3361
+ raise ::ArgumentError, "request must be provided" if request.nil?
3362
+
3363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest
3364
+
3365
+ # Converts hash and nil to an options object
3366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3367
+
3368
+ # Customize the options with defaults
3369
+ metadata = @config.rpcs.update_zone.metadata.to_h
3370
+
3371
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3372
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3374
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3375
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3376
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3377
+
3378
+ header_params = {}
3379
+ if request.zone&.name
3380
+ header_params["zone.name"] = request.zone.name
3381
+ end
3382
+
3383
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3384
+ metadata[:"x-goog-request-params"] ||= request_params_header
3385
+
3386
+ options.apply_defaults timeout: @config.rpcs.update_zone.timeout,
3387
+ metadata: metadata,
3388
+ retry_policy: @config.rpcs.update_zone.retry_policy
3389
+
3390
+ options.apply_defaults timeout: @config.timeout,
3391
+ metadata: @config.metadata,
3392
+ retry_policy: @config.retry_policy
3393
+
3394
+ @gdc_hardware_management_stub.call_rpc :update_zone, request, options: options do |response, operation|
3395
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3396
+ yield response, operation if block_given?
3397
+ return response
3398
+ end
3399
+ rescue ::GRPC::BadStatus => e
3400
+ raise ::Google::Cloud::Error.from_error(e)
3401
+ end
3402
+
3403
+ ##
3404
+ # Deletes a zone.
3405
+ #
3406
+ # @overload delete_zone(request, options = nil)
3407
+ # Pass arguments to `delete_zone` via a request object, either of type
3408
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest} or an equivalent Hash.
3409
+ #
3410
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest, ::Hash]
3411
+ # A request object representing the call parameters. Required. To specify no
3412
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3413
+ # @param options [::Gapic::CallOptions, ::Hash]
3414
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3415
+ #
3416
+ # @overload delete_zone(name: nil, request_id: nil)
3417
+ # Pass arguments to `delete_zone` via keyword arguments. Note that at
3418
+ # least one keyword argument is required. To specify no parameters, or to keep all
3419
+ # the default parameter values, pass an empty Hash as a request object (see above).
3420
+ #
3421
+ # @param name [::String]
3422
+ # Required. The name of the zone.
3423
+ # Format: `projects/{project}/locations/{location}/zones/{zone}`
3424
+ # @param request_id [::String]
3425
+ # Optional. An optional unique identifier for this request. See
3426
+ # [AIP-155](https://google.aip.dev/155).
3427
+ #
3428
+ # @yield [response, operation] Access the result along with the RPC operation
3429
+ # @yieldparam response [::Gapic::Operation]
3430
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3431
+ #
3432
+ # @return [::Gapic::Operation]
3433
+ #
3434
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3435
+ #
3436
+ # @example Basic example
3437
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3438
+ #
3439
+ # # Create a client object. The client can be reused for multiple calls.
3440
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3441
+ #
3442
+ # # Create a request. To set request fields, pass in keyword arguments.
3443
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new
3444
+ #
3445
+ # # Call the delete_zone method.
3446
+ # result = client.delete_zone request
3447
+ #
3448
+ # # The returned object is of type Gapic::Operation. You can use it to
3449
+ # # check the status of an operation, cancel it, or wait for results.
3450
+ # # Here is how to wait for a response.
3451
+ # result.wait_until_done! timeout: 60
3452
+ # if result.response?
3453
+ # p result.response
3454
+ # else
3455
+ # puts "No response received."
3456
+ # end
3457
+ #
3458
+ def delete_zone request, options = nil
3459
+ raise ::ArgumentError, "request must be provided" if request.nil?
3460
+
3461
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest
3462
+
3463
+ # Converts hash and nil to an options object
3464
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3465
+
3466
+ # Customize the options with defaults
3467
+ metadata = @config.rpcs.delete_zone.metadata.to_h
3468
+
3469
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3470
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3471
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3472
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3473
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3474
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3475
+
3476
+ header_params = {}
3477
+ if request.name
3478
+ header_params["name"] = request.name
3479
+ end
3480
+
3481
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3482
+ metadata[:"x-goog-request-params"] ||= request_params_header
3483
+
3484
+ options.apply_defaults timeout: @config.rpcs.delete_zone.timeout,
3485
+ metadata: metadata,
3486
+ retry_policy: @config.rpcs.delete_zone.retry_policy
3487
+
3488
+ options.apply_defaults timeout: @config.timeout,
3489
+ metadata: @config.metadata,
3490
+ retry_policy: @config.retry_policy
3491
+
3492
+ @gdc_hardware_management_stub.call_rpc :delete_zone, request, options: options do |response, operation|
3493
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3494
+ yield response, operation if block_given?
3495
+ return response
3496
+ end
3497
+ rescue ::GRPC::BadStatus => e
3498
+ raise ::Google::Cloud::Error.from_error(e)
3499
+ end
3500
+
3501
+ ##
3502
+ # Signals the state of a zone.
3503
+ #
3504
+ # @overload signal_zone_state(request, options = nil)
3505
+ # Pass arguments to `signal_zone_state` via a request object, either of type
3506
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest} or an equivalent Hash.
3507
+ #
3508
+ # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Hash]
3509
+ # A request object representing the call parameters. Required. To specify no
3510
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3511
+ # @param options [::Gapic::CallOptions, ::Hash]
3512
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3513
+ #
3514
+ # @overload signal_zone_state(name: nil, request_id: nil, state_signal: nil)
3515
+ # Pass arguments to `signal_zone_state` via keyword arguments. Note that at
3516
+ # least one keyword argument is required. To specify no parameters, or to keep all
3517
+ # the default parameter values, pass an empty Hash as a request object (see above).
3518
+ #
3519
+ # @param name [::String]
3520
+ # Required. The name of the zone.
3521
+ # Format: `projects/{project}/locations/{location}/zones/{zone}`
3522
+ # @param request_id [::String]
3523
+ # Optional. An optional unique identifier for this request. See
3524
+ # [AIP-155](https://google.aip.dev/155).
3525
+ # @param state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal]
3526
+ # Required. The state signal to send for this zone.
3527
+ #
3528
+ # @yield [response, operation] Access the result along with the RPC operation
3529
+ # @yieldparam response [::Gapic::Operation]
3530
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3531
+ #
3532
+ # @return [::Gapic::Operation]
3533
+ #
3534
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3535
+ #
3536
+ # @example Basic example
3537
+ # require "google/cloud/gdc_hardware_management/v1alpha"
3538
+ #
3539
+ # # Create a client object. The client can be reused for multiple calls.
3540
+ # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new
3541
+ #
3542
+ # # Create a request. To set request fields, pass in keyword arguments.
3543
+ # request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new
3544
+ #
3545
+ # # Call the signal_zone_state method.
3546
+ # result = client.signal_zone_state request
3547
+ #
3548
+ # # The returned object is of type Gapic::Operation. You can use it to
3549
+ # # check the status of an operation, cancel it, or wait for results.
3550
+ # # Here is how to wait for a response.
3551
+ # result.wait_until_done! timeout: 60
3552
+ # if result.response?
3553
+ # p result.response
3554
+ # else
3555
+ # puts "No response received."
3556
+ # end
3557
+ #
3558
+ def signal_zone_state request, options = nil
3559
+ raise ::ArgumentError, "request must be provided" if request.nil?
3560
+
3561
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest
3562
+
3563
+ # Converts hash and nil to an options object
3564
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3565
+
3566
+ # Customize the options with defaults
3567
+ metadata = @config.rpcs.signal_zone_state.metadata.to_h
3568
+
3569
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3570
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3571
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3572
+ gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
3573
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3574
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3575
+
3576
+ header_params = {}
3577
+ if request.name
3578
+ header_params["name"] = request.name
3579
+ end
3580
+
3581
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3582
+ metadata[:"x-goog-request-params"] ||= request_params_header
3583
+
3584
+ options.apply_defaults timeout: @config.rpcs.signal_zone_state.timeout,
3585
+ metadata: metadata,
3586
+ retry_policy: @config.rpcs.signal_zone_state.retry_policy
3587
+
3588
+ options.apply_defaults timeout: @config.timeout,
3589
+ metadata: @config.metadata,
3590
+ retry_policy: @config.retry_policy
3591
+
3592
+ @gdc_hardware_management_stub.call_rpc :signal_zone_state, request, options: options do |response, operation|
3593
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3594
+ yield response, operation if block_given?
3595
+ return response
3596
+ end
3597
+ rescue ::GRPC::BadStatus => e
3598
+ raise ::Google::Cloud::Error.from_error(e)
3599
+ end
3600
+
3601
+ ##
3602
+ # Configuration class for the GDCHardwareManagement API.
3603
+ #
3604
+ # This class represents the configuration for GDCHardwareManagement,
3605
+ # providing control over timeouts, retry behavior, logging, transport
3606
+ # parameters, and other low-level controls. Certain parameters can also be
3607
+ # applied individually to specific RPCs. See
3608
+ # {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client::Configuration::Rpcs}
3609
+ # for a list of RPCs that can be configured independently.
3610
+ #
3611
+ # Configuration can be applied globally to all clients, or to a single client
3612
+ # on construction.
3613
+ #
3614
+ # @example
3615
+ #
3616
+ # # Modify the global config, setting the timeout for
3617
+ # # list_orders to 20 seconds,
3618
+ # # and all remaining timeouts to 10 seconds.
3619
+ # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config|
3620
+ # config.timeout = 10.0
3621
+ # config.rpcs.list_orders.timeout = 20.0
3622
+ # end
3623
+ #
3624
+ # # Apply the above configuration only to a new client.
3625
+ # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config|
3626
+ # config.timeout = 10.0
3627
+ # config.rpcs.list_orders.timeout = 20.0
3628
+ # end
3629
+ #
3630
+ # @!attribute [rw] endpoint
3631
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3632
+ # nil, indicating to use the default endpoint in the current universe domain.
3633
+ # @return [::String,nil]
3634
+ # @!attribute [rw] credentials
3635
+ # Credentials to send with calls. You may provide any of the following types:
3636
+ # * (`String`) The path to a service account key file in JSON format
3637
+ # * (`Hash`) A service account key as a Hash
3638
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3639
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3640
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3641
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3642
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3643
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3644
+ # * (`nil`) indicating no credentials
3645
+ # @return [::Object]
3646
+ # @!attribute [rw] scope
3647
+ # The OAuth scopes
3648
+ # @return [::Array<::String>]
3649
+ # @!attribute [rw] lib_name
3650
+ # The library name as recorded in instrumentation and logging
3651
+ # @return [::String]
3652
+ # @!attribute [rw] lib_version
3653
+ # The library version as recorded in instrumentation and logging
3654
+ # @return [::String]
3655
+ # @!attribute [rw] channel_args
3656
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
3657
+ # `GRPC::Core::Channel` object is provided as the credential.
3658
+ # @return [::Hash]
3659
+ # @!attribute [rw] interceptors
3660
+ # An array of interceptors that are run before calls are executed.
3661
+ # @return [::Array<::GRPC::ClientInterceptor>]
3662
+ # @!attribute [rw] timeout
3663
+ # The call timeout in seconds.
3664
+ # @return [::Numeric]
3665
+ # @!attribute [rw] metadata
3666
+ # Additional gRPC headers to be sent with the call.
3667
+ # @return [::Hash{::Symbol=>::String}]
3668
+ # @!attribute [rw] retry_policy
3669
+ # The retry policy. The value is a hash with the following keys:
3670
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3671
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3672
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3673
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3674
+ # trigger a retry.
3675
+ # @return [::Hash]
3676
+ # @!attribute [rw] quota_project
3677
+ # A separate project against which to charge quota.
3678
+ # @return [::String]
3679
+ # @!attribute [rw] universe_domain
3680
+ # The universe domain within which to make requests. This determines the
3681
+ # default endpoint URL. The default value of nil uses the environment
3682
+ # universe (usually the default "googleapis.com" universe).
3683
+ # @return [::String,nil]
3684
+ #
3685
+ class Configuration
3686
+ extend ::Gapic::Config
3687
+
3688
+ # @private
3689
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3690
+ DEFAULT_ENDPOINT = "gdchardwaremanagement.googleapis.com"
3691
+
3692
+ config_attr :endpoint, nil, ::String, nil
3693
+ config_attr :credentials, nil do |value|
3694
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3695
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
3696
+ allowed.any? { |klass| klass === value }
3697
+ end
3698
+ config_attr :scope, nil, ::String, ::Array, nil
3699
+ config_attr :lib_name, nil, ::String, nil
3700
+ config_attr :lib_version, nil, ::String, nil
3701
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
3702
+ config_attr :interceptors, nil, ::Array, nil
3703
+ config_attr :timeout, nil, ::Numeric, nil
3704
+ config_attr :metadata, nil, ::Hash, nil
3705
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3706
+ config_attr :quota_project, nil, ::String, nil
3707
+ config_attr :universe_domain, nil, ::String, nil
3708
+
3709
+ # @private
3710
+ def initialize parent_config = nil
3711
+ @parent_config = parent_config unless parent_config.nil?
3712
+
3713
+ yield self if block_given?
3714
+ end
3715
+
3716
+ ##
3717
+ # Configurations for individual RPCs
3718
+ # @return [Rpcs]
3719
+ #
3720
+ def rpcs
3721
+ @rpcs ||= begin
3722
+ parent_rpcs = nil
3723
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3724
+ Rpcs.new parent_rpcs
3725
+ end
3726
+ end
3727
+
3728
+ ##
3729
+ # Configuration for the channel pool
3730
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
3731
+ #
3732
+ def channel_pool
3733
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
3734
+ end
3735
+
3736
+ ##
3737
+ # Configuration RPC class for the GDCHardwareManagement API.
3738
+ #
3739
+ # Includes fields providing the configuration for each RPC in this service.
3740
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3741
+ # the following configuration fields:
3742
+ #
3743
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3744
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
3745
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3746
+ # include the following keys:
3747
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3748
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3749
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3750
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3751
+ # trigger a retry.
3752
+ #
3753
+ class Rpcs
3754
+ ##
3755
+ # RPC-specific configuration for `list_orders`
3756
+ # @return [::Gapic::Config::Method]
3757
+ #
3758
+ attr_reader :list_orders
3759
+ ##
3760
+ # RPC-specific configuration for `get_order`
3761
+ # @return [::Gapic::Config::Method]
3762
+ #
3763
+ attr_reader :get_order
3764
+ ##
3765
+ # RPC-specific configuration for `create_order`
3766
+ # @return [::Gapic::Config::Method]
3767
+ #
3768
+ attr_reader :create_order
3769
+ ##
3770
+ # RPC-specific configuration for `update_order`
3771
+ # @return [::Gapic::Config::Method]
3772
+ #
3773
+ attr_reader :update_order
3774
+ ##
3775
+ # RPC-specific configuration for `delete_order`
3776
+ # @return [::Gapic::Config::Method]
3777
+ #
3778
+ attr_reader :delete_order
3779
+ ##
3780
+ # RPC-specific configuration for `submit_order`
3781
+ # @return [::Gapic::Config::Method]
3782
+ #
3783
+ attr_reader :submit_order
3784
+ ##
3785
+ # RPC-specific configuration for `list_sites`
3786
+ # @return [::Gapic::Config::Method]
3787
+ #
3788
+ attr_reader :list_sites
3789
+ ##
3790
+ # RPC-specific configuration for `get_site`
3791
+ # @return [::Gapic::Config::Method]
3792
+ #
3793
+ attr_reader :get_site
3794
+ ##
3795
+ # RPC-specific configuration for `create_site`
3796
+ # @return [::Gapic::Config::Method]
3797
+ #
3798
+ attr_reader :create_site
3799
+ ##
3800
+ # RPC-specific configuration for `update_site`
3801
+ # @return [::Gapic::Config::Method]
3802
+ #
3803
+ attr_reader :update_site
3804
+ ##
3805
+ # RPC-specific configuration for `list_hardware_groups`
3806
+ # @return [::Gapic::Config::Method]
3807
+ #
3808
+ attr_reader :list_hardware_groups
3809
+ ##
3810
+ # RPC-specific configuration for `get_hardware_group`
3811
+ # @return [::Gapic::Config::Method]
3812
+ #
3813
+ attr_reader :get_hardware_group
3814
+ ##
3815
+ # RPC-specific configuration for `create_hardware_group`
3816
+ # @return [::Gapic::Config::Method]
3817
+ #
3818
+ attr_reader :create_hardware_group
3819
+ ##
3820
+ # RPC-specific configuration for `update_hardware_group`
3821
+ # @return [::Gapic::Config::Method]
3822
+ #
3823
+ attr_reader :update_hardware_group
3824
+ ##
3825
+ # RPC-specific configuration for `delete_hardware_group`
3826
+ # @return [::Gapic::Config::Method]
3827
+ #
3828
+ attr_reader :delete_hardware_group
3829
+ ##
3830
+ # RPC-specific configuration for `list_hardware`
3831
+ # @return [::Gapic::Config::Method]
3832
+ #
3833
+ attr_reader :list_hardware
3834
+ ##
3835
+ # RPC-specific configuration for `get_hardware`
3836
+ # @return [::Gapic::Config::Method]
3837
+ #
3838
+ attr_reader :get_hardware
3839
+ ##
3840
+ # RPC-specific configuration for `create_hardware`
3841
+ # @return [::Gapic::Config::Method]
3842
+ #
3843
+ attr_reader :create_hardware
3844
+ ##
3845
+ # RPC-specific configuration for `update_hardware`
3846
+ # @return [::Gapic::Config::Method]
3847
+ #
3848
+ attr_reader :update_hardware
3849
+ ##
3850
+ # RPC-specific configuration for `delete_hardware`
3851
+ # @return [::Gapic::Config::Method]
3852
+ #
3853
+ attr_reader :delete_hardware
3854
+ ##
3855
+ # RPC-specific configuration for `list_comments`
3856
+ # @return [::Gapic::Config::Method]
3857
+ #
3858
+ attr_reader :list_comments
3859
+ ##
3860
+ # RPC-specific configuration for `get_comment`
3861
+ # @return [::Gapic::Config::Method]
3862
+ #
3863
+ attr_reader :get_comment
3864
+ ##
3865
+ # RPC-specific configuration for `create_comment`
3866
+ # @return [::Gapic::Config::Method]
3867
+ #
3868
+ attr_reader :create_comment
3869
+ ##
3870
+ # RPC-specific configuration for `list_change_log_entries`
3871
+ # @return [::Gapic::Config::Method]
3872
+ #
3873
+ attr_reader :list_change_log_entries
3874
+ ##
3875
+ # RPC-specific configuration for `get_change_log_entry`
3876
+ # @return [::Gapic::Config::Method]
3877
+ #
3878
+ attr_reader :get_change_log_entry
3879
+ ##
3880
+ # RPC-specific configuration for `list_skus`
3881
+ # @return [::Gapic::Config::Method]
3882
+ #
3883
+ attr_reader :list_skus
3884
+ ##
3885
+ # RPC-specific configuration for `get_sku`
3886
+ # @return [::Gapic::Config::Method]
3887
+ #
3888
+ attr_reader :get_sku
3889
+ ##
3890
+ # RPC-specific configuration for `list_zones`
3891
+ # @return [::Gapic::Config::Method]
3892
+ #
3893
+ attr_reader :list_zones
3894
+ ##
3895
+ # RPC-specific configuration for `get_zone`
3896
+ # @return [::Gapic::Config::Method]
3897
+ #
3898
+ attr_reader :get_zone
3899
+ ##
3900
+ # RPC-specific configuration for `create_zone`
3901
+ # @return [::Gapic::Config::Method]
3902
+ #
3903
+ attr_reader :create_zone
3904
+ ##
3905
+ # RPC-specific configuration for `update_zone`
3906
+ # @return [::Gapic::Config::Method]
3907
+ #
3908
+ attr_reader :update_zone
3909
+ ##
3910
+ # RPC-specific configuration for `delete_zone`
3911
+ # @return [::Gapic::Config::Method]
3912
+ #
3913
+ attr_reader :delete_zone
3914
+ ##
3915
+ # RPC-specific configuration for `signal_zone_state`
3916
+ # @return [::Gapic::Config::Method]
3917
+ #
3918
+ attr_reader :signal_zone_state
3919
+
3920
+ # @private
3921
+ def initialize parent_rpcs = nil
3922
+ list_orders_config = parent_rpcs.list_orders if parent_rpcs.respond_to? :list_orders
3923
+ @list_orders = ::Gapic::Config::Method.new list_orders_config
3924
+ get_order_config = parent_rpcs.get_order if parent_rpcs.respond_to? :get_order
3925
+ @get_order = ::Gapic::Config::Method.new get_order_config
3926
+ create_order_config = parent_rpcs.create_order if parent_rpcs.respond_to? :create_order
3927
+ @create_order = ::Gapic::Config::Method.new create_order_config
3928
+ update_order_config = parent_rpcs.update_order if parent_rpcs.respond_to? :update_order
3929
+ @update_order = ::Gapic::Config::Method.new update_order_config
3930
+ delete_order_config = parent_rpcs.delete_order if parent_rpcs.respond_to? :delete_order
3931
+ @delete_order = ::Gapic::Config::Method.new delete_order_config
3932
+ submit_order_config = parent_rpcs.submit_order if parent_rpcs.respond_to? :submit_order
3933
+ @submit_order = ::Gapic::Config::Method.new submit_order_config
3934
+ list_sites_config = parent_rpcs.list_sites if parent_rpcs.respond_to? :list_sites
3935
+ @list_sites = ::Gapic::Config::Method.new list_sites_config
3936
+ get_site_config = parent_rpcs.get_site if parent_rpcs.respond_to? :get_site
3937
+ @get_site = ::Gapic::Config::Method.new get_site_config
3938
+ create_site_config = parent_rpcs.create_site if parent_rpcs.respond_to? :create_site
3939
+ @create_site = ::Gapic::Config::Method.new create_site_config
3940
+ update_site_config = parent_rpcs.update_site if parent_rpcs.respond_to? :update_site
3941
+ @update_site = ::Gapic::Config::Method.new update_site_config
3942
+ list_hardware_groups_config = parent_rpcs.list_hardware_groups if parent_rpcs.respond_to? :list_hardware_groups
3943
+ @list_hardware_groups = ::Gapic::Config::Method.new list_hardware_groups_config
3944
+ get_hardware_group_config = parent_rpcs.get_hardware_group if parent_rpcs.respond_to? :get_hardware_group
3945
+ @get_hardware_group = ::Gapic::Config::Method.new get_hardware_group_config
3946
+ create_hardware_group_config = parent_rpcs.create_hardware_group if parent_rpcs.respond_to? :create_hardware_group
3947
+ @create_hardware_group = ::Gapic::Config::Method.new create_hardware_group_config
3948
+ update_hardware_group_config = parent_rpcs.update_hardware_group if parent_rpcs.respond_to? :update_hardware_group
3949
+ @update_hardware_group = ::Gapic::Config::Method.new update_hardware_group_config
3950
+ delete_hardware_group_config = parent_rpcs.delete_hardware_group if parent_rpcs.respond_to? :delete_hardware_group
3951
+ @delete_hardware_group = ::Gapic::Config::Method.new delete_hardware_group_config
3952
+ list_hardware_config = parent_rpcs.list_hardware if parent_rpcs.respond_to? :list_hardware
3953
+ @list_hardware = ::Gapic::Config::Method.new list_hardware_config
3954
+ get_hardware_config = parent_rpcs.get_hardware if parent_rpcs.respond_to? :get_hardware
3955
+ @get_hardware = ::Gapic::Config::Method.new get_hardware_config
3956
+ create_hardware_config = parent_rpcs.create_hardware if parent_rpcs.respond_to? :create_hardware
3957
+ @create_hardware = ::Gapic::Config::Method.new create_hardware_config
3958
+ update_hardware_config = parent_rpcs.update_hardware if parent_rpcs.respond_to? :update_hardware
3959
+ @update_hardware = ::Gapic::Config::Method.new update_hardware_config
3960
+ delete_hardware_config = parent_rpcs.delete_hardware if parent_rpcs.respond_to? :delete_hardware
3961
+ @delete_hardware = ::Gapic::Config::Method.new delete_hardware_config
3962
+ list_comments_config = parent_rpcs.list_comments if parent_rpcs.respond_to? :list_comments
3963
+ @list_comments = ::Gapic::Config::Method.new list_comments_config
3964
+ get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment
3965
+ @get_comment = ::Gapic::Config::Method.new get_comment_config
3966
+ create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment
3967
+ @create_comment = ::Gapic::Config::Method.new create_comment_config
3968
+ list_change_log_entries_config = parent_rpcs.list_change_log_entries if parent_rpcs.respond_to? :list_change_log_entries
3969
+ @list_change_log_entries = ::Gapic::Config::Method.new list_change_log_entries_config
3970
+ get_change_log_entry_config = parent_rpcs.get_change_log_entry if parent_rpcs.respond_to? :get_change_log_entry
3971
+ @get_change_log_entry = ::Gapic::Config::Method.new get_change_log_entry_config
3972
+ list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus
3973
+ @list_skus = ::Gapic::Config::Method.new list_skus_config
3974
+ get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku
3975
+ @get_sku = ::Gapic::Config::Method.new get_sku_config
3976
+ list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones
3977
+ @list_zones = ::Gapic::Config::Method.new list_zones_config
3978
+ get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone
3979
+ @get_zone = ::Gapic::Config::Method.new get_zone_config
3980
+ create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone
3981
+ @create_zone = ::Gapic::Config::Method.new create_zone_config
3982
+ update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone
3983
+ @update_zone = ::Gapic::Config::Method.new update_zone_config
3984
+ delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone
3985
+ @delete_zone = ::Gapic::Config::Method.new delete_zone_config
3986
+ signal_zone_state_config = parent_rpcs.signal_zone_state if parent_rpcs.respond_to? :signal_zone_state
3987
+ @signal_zone_state = ::Gapic::Config::Method.new signal_zone_state_config
3988
+
3989
+ yield self if block_given?
3990
+ end
3991
+ end
3992
+ end
3993
+ end
3994
+ end
3995
+ end
3996
+ end
3997
+ end
3998
+ end