google-cloud-gdc_hardware_management-v1alpha 0.1.0

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