Class: Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb

Overview

Client for the GDCHardwareManagement service.

The GDC Hardware Management service.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#change_log_entry_path, #comment_path, #hardware_group_path, #hardware_path, #location_path, #order_path, #site_path, #sku_path, #zone_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new GDCHardwareManagement client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the GDCHardwareManagement client.

Yield Parameters:



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 277

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/gdchardwaremanagement/v1alpha/service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @gdc_hardware_management_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @gdc_hardware_management_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @gdc_hardware_management_stub.endpoint
    config.universe_domain = @gdc_hardware_management_stub.universe_domain
    config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.



355
356
357
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 355

def location_client
  @location_client
end

#operations_client::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations (readonly)

Get the associated client for long-running operations.



348
349
350
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 348

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the GDCHardwareManagement Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all GDCHardwareManagement clients
::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 63

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "GDCHardwareManagement", "V1alpha"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.list_orders.timeout = 60.0
    default_config.rpcs.list_orders.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_order.timeout = 60.0
    default_config.rpcs.get_order.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_order.timeout = 60.0

    default_config.rpcs.update_order.timeout = 60.0
    default_config.rpcs.update_order.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_order.timeout = 60.0
    default_config.rpcs.delete_order.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.submit_order.timeout = 60.0
    default_config.rpcs.submit_order.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.cancel_order.timeout = 60.0
    default_config.rpcs.cancel_order.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_sites.timeout = 60.0
    default_config.rpcs.list_sites.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_site.timeout = 60.0
    default_config.rpcs.get_site.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_site.timeout = 60.0

    default_config.rpcs.update_site.timeout = 60.0
    default_config.rpcs.update_site.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_site.timeout = 60.0
    default_config.rpcs.delete_site.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_hardware_groups.timeout = 60.0
    default_config.rpcs.list_hardware_groups.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_hardware_group.timeout = 60.0
    default_config.rpcs.get_hardware_group.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_hardware_group.timeout = 60.0

    default_config.rpcs.update_hardware_group.timeout = 60.0
    default_config.rpcs.update_hardware_group.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_hardware_group.timeout = 60.0
    default_config.rpcs.delete_hardware_group.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_hardware.timeout = 60.0
    default_config.rpcs.list_hardware.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_hardware.timeout = 60.0
    default_config.rpcs.get_hardware.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_hardware.timeout = 60.0

    default_config.rpcs.update_hardware.timeout = 60.0
    default_config.rpcs.update_hardware.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_hardware.timeout = 60.0
    default_config.rpcs.delete_hardware.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_comments.timeout = 60.0
    default_config.rpcs.list_comments.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_comment.timeout = 60.0
    default_config.rpcs.get_comment.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_comment.timeout = 60.0

    default_config.rpcs.list_change_log_entries.timeout = 60.0
    default_config.rpcs.list_change_log_entries.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_change_log_entry.timeout = 60.0
    default_config.rpcs.get_change_log_entry.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_skus.timeout = 60.0
    default_config.rpcs.list_skus.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_sku.timeout = 60.0
    default_config.rpcs.get_sku.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_zones.timeout = 60.0
    default_config.rpcs.list_zones.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_zone.timeout = 60.0
    default_config.rpcs.get_zone.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_zone.timeout = 60.0

    default_config.rpcs.update_zone.timeout = 60.0
    default_config.rpcs.update_zone.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_zone.timeout = 60.0
    default_config.rpcs.delete_zone.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#cancel_order(request, options = nil) ⇒ ::Gapic::Operation #cancel_order(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Cancels an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new

# Call the cancel_order method.
result = client.cancel_order request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #cancel_order(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to cancel_order via a request object, either of type CancelOrderRequest or an equivalent Hash.

  • #cancel_order(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to cancel_order via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1028

def cancel_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.cancel_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :cancel_order, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the GDCHardwareManagement Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:



247
248
249
250
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 247

def configure
  yield @config if block_given?
  @config
end

#create_comment(request, options = nil) ⇒ ::Gapic::Operation #create_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new comment on an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new

# Call the create_comment method.
result = client.create_comment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_comment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_comment via a request object, either of type CreateCommentRequest or an equivalent Hash.

  • #create_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_comment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2821

def create_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_comment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_hardware(request, options = nil) ⇒ ::Gapic::Operation #create_hardware(parent: nil, hardware_id: nil, hardware: nil) ⇒ ::Gapic::Operation

Creates new hardware in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new

# Call the create_hardware method.
result = client.create_hardware request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_hardware(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hardware via a request object, either of type CreateHardwareRequest or an equivalent Hash.

  • #create_hardware(parent: nil, hardware_id: nil, hardware: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hardware via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2324

def create_hardware request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_hardware..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_hardware.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_hardware.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_hardware, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_hardware_group(request, options = nil) ⇒ ::Gapic::Operation #create_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new hardware group in a given order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new

# Call the create_hardware_group method.
result = client.create_hardware_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_hardware_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hardware_group via a request object, either of type CreateHardwareGroupRequest or an equivalent Hash.

  • #create_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_hardware_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1825

def create_hardware_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_hardware_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_hardware_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_hardware_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_hardware_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_order(request, options = nil) ⇒ ::Gapic::Operation #create_order(parent: nil, order_id: nil, order: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new order in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new

# Call the create_order method.
result = client.create_order request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_order(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_order via a request object, either of type CreateOrderRequest or an equivalent Hash.

  • #create_order(parent: nil, order_id: nil, order: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_order via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 624

def create_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_order, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_site(request, options = nil) ⇒ ::Gapic::Operation #create_site(parent: nil, site_id: nil, site: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new site in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new

# Call the create_site method.
result = client.create_site request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_site(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_site via a request object, either of type CreateSiteRequest or an equivalent Hash.

  • #create_site(parent: nil, site_id: nil, site: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_site via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1328

def create_site request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_site..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_site.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_site.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_site, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_zone(request, options = nil) ⇒ ::Gapic::Operation #create_zone(parent: nil, zone_id: nil, zone: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new zone in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new

# Call the create_zone method.
result = client.create_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_zone via a request object, either of type CreateZoneRequest or an equivalent Hash.

  • #create_zone(parent: nil, zone_id: nil, zone: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3592

def create_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_zone..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :create_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_hardware(request, options = nil) ⇒ ::Gapic::Operation #delete_hardware(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes hardware.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new

# Call the delete_hardware method.
result = client.delete_hardware request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_hardware(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hardware via a request object, either of type DeleteHardwareRequest or an equivalent Hash.

  • #delete_hardware(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hardware via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2524

def delete_hardware request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_hardware..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_hardware.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_hardware.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :delete_hardware, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_hardware_group(request, options = nil) ⇒ ::Gapic::Operation #delete_hardware_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a hardware group.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new

# Call the delete_hardware_group method.
result = client.delete_hardware_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_hardware_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hardware_group via a request object, either of type DeleteHardwareGroupRequest or an equivalent Hash.

  • #delete_hardware_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_hardware_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2027

def delete_hardware_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_hardware_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_hardware_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_hardware_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :delete_hardware_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_order(request, options = nil) ⇒ ::Gapic::Operation #delete_order(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new

# Call the delete_order method.
result = client.delete_order request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_order(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_order via a request object, either of type DeleteOrderRequest or an equivalent Hash.

  • #delete_order(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_order via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 829

def delete_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :delete_order, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_site(request, options = nil) ⇒ ::Gapic::Operation #delete_site(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a site.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new

# Call the delete_site method.
result = client.delete_site request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_site(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_site via a request object, either of type DeleteSiteRequest or an equivalent Hash.

  • #delete_site(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_site via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1528

def delete_site request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_site..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_site.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_site.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :delete_site, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_zone(request, options = nil) ⇒ ::Gapic::Operation #delete_zone(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a zone.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new

# Call the delete_zone method.
result = client.delete_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_zone via a request object, either of type DeleteZoneRequest or an equivalent Hash.

  • #delete_zone(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3792

def delete_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_zone..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :delete_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_change_log_entry(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry #get_change_log_entry(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry

Gets details of a change to an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new

# Call the get_change_log_entry method.
result = client.get_change_log_entry request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3103

def get_change_log_entry request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_change_log_entry..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_change_log_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_change_log_entry.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_change_log_entry, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_comment(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment #get_comment(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment

Gets the content of a comment.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new

# Call the get_comment method.
result = client.get_comment request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2714

def get_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_comment, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_hardware(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware #get_hardware(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware

Gets hardware details.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new

# Call the get_hardware method.
result = client.get_hardware request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2220

def get_hardware request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_hardware..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_hardware.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_hardware.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_hardware, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_hardware_group(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup #get_hardware_group(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup

Gets details of a hardware group.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new

# Call the get_hardware_group method.
result = client.get_hardware_group request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1718

def get_hardware_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_hardware_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_hardware_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_hardware_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_hardware_group, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_order(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Order #get_order(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Order

Gets details of an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new

# Call the get_order method.
result = client.get_order request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 517

def get_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_order, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_site(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Site #get_site(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Site

Gets details of a site.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new

# Call the get_site method.
result = client.get_site request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1221

def get_site request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_site..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_site.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_site.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_site, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_sku(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku #get_sku(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku

Gets details of an SKU.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new

# Call the get_sku method.
result = client.get_sku request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3294

def get_sku request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_sku..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_sku.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_sku.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_sku, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_zone(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone #get_zone(name: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone

Gets details of a zone.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new

# Call the get_zone method.
result = client.get_zone request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Zone.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3485

def get_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_zone..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :get_zone, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_change_log_entries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry> #list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>

Lists the changes made to an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new

# Call the list_change_log_entries method.
result = client.list_change_log_entries request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.
  p item
end

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3014

def list_change_log_entries request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_change_log_entries..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_change_log_entries.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_change_log_entries.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_change_log_entries, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_entries, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_comments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment> #list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>

Lists the comments on an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new

# Call the list_comments method.
result = client.list_comments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.
  p item
end

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2625

def list_comments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_comments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_comments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_comments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_comments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_hardware(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware> #list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>

Lists hardware in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new

# Call the list_hardware method.
result = client.list_hardware request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.
  p item
end

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2132

def list_hardware request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_hardware..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_hardware.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_hardware.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_hardware, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_hardware_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup> #list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>

Lists hardware groups in a given order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new

# Call the list_hardware_groups method.
result = client.list_hardware_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.
  p item
end

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1629

def list_hardware_groups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_hardware_groups..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_hardware_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_hardware_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_hardware_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_groups, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_orders(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order> #list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>

Lists orders in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new

# Call the list_orders method.
result = client.list_orders request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.
  p item
end

Overloads:

  • #list_orders(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>

    Pass arguments to list_orders via a request object, either of type ListOrdersRequest or an equivalent Hash.

  • #list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>

    Pass arguments to list_orders via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 430

def list_orders request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_orders..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_orders.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_orders.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_orders, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_sites(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site> #list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>

Lists sites in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new

# Call the list_sites method.
result = client.list_sites request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.
  p item
end

Overloads:

  • #list_sites(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>

    Pass arguments to list_sites via a request object, either of type ListSitesRequest or an equivalent Hash.

  • #list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>

    Pass arguments to list_sites via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1133

def list_sites request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_sites..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_sites.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_sites.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_sites, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku> #list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>

Lists SKUs for a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new

# Call the list_skus method.
result = client.list_skus request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.
  p item
end

Overloads:

  • #list_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>

    Pass arguments to list_skus via a request object, either of type ListSkusRequest or an equivalent Hash.

  • #list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>

    Pass arguments to list_skus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3206

def list_skus request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_skus..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_skus.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_skus.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_skus, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zones(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone> #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>

Lists zones in a given project and location.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest.new

# Call the list_zones method.
result = client.list_zones request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone.
  p item
end

Overloads:

  • #list_zones(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>

    Pass arguments to list_zones via a request object, either of type ListZonesRequest or an equivalent Hash.

  • #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>

    Pass arguments to list_zones via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3397

def list_zones request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_zones..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_zones.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_zones.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :list_zones, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_zones, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.



362
363
364
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 362

def logger
  @gdc_hardware_management_stub.logger
end

#record_action_on_comment(request, options = nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment #record_action_on_comment(name: nil, action_type: nil) ⇒ ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment

Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new

# Call the record_action_on_comment method.
result = client.record_action_on_comment request

# The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2915

def record_action_on_comment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.record_action_on_comment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.record_action_on_comment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.record_action_on_comment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :record_action_on_comment, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#request_order_date_change(request, options = nil) ⇒ ::Gapic::Operation #request_order_date_change(name: nil, requested_date: nil) ⇒ ::Gapic::Operation

Updates the requested date change of a single Order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new

# Call the request_order_date_change method.
result = client.request_order_date_change request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #request_order_date_change(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to request_order_date_change via a request object, either of type RequestOrderDateChangeRequest or an equivalent Hash.

  • #request_order_date_change(name: nil, requested_date: nil) ⇒ ::Gapic::Operation

    Pass arguments to request_order_date_change via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 4001

def request_order_date_change request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.request_order_date_change..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.request_order_date_change.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.request_order_date_change.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :request_order_date_change, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#signal_zone_state(request, options = nil) ⇒ ::Gapic::Operation #signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) ⇒ ::Gapic::Operation

Signals the state of a zone.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new

# Call the signal_zone_state method.
result = client.signal_zone_state request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #signal_zone_state(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to signal_zone_state via a request object, either of type SignalZoneStateRequest or an equivalent Hash.

  • #signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) ⇒ ::Gapic::Operation

    Pass arguments to signal_zone_state via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3903

def signal_zone_state request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.signal_zone_state..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.signal_zone_state.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.signal_zone_state.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :signal_zone_state, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#submit_order(request, options = nil) ⇒ ::Gapic::Operation #submit_order(name: nil, request_id: nil, type: nil) ⇒ ::Gapic::Operation

Submits an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new

# Call the submit_order method.
result = client.submit_order request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #submit_order(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to submit_order via a request object, either of type SubmitOrderRequest or an equivalent Hash.

  • #submit_order(name: nil, request_id: nil, type: nil) ⇒ ::Gapic::Operation

    Pass arguments to submit_order via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 930

def submit_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.submit_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.submit_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.submit_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :submit_order, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain



257
258
259
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 257

def universe_domain
  @gdc_hardware_management_stub.universe_domain
end

#update_hardware(request, options = nil) ⇒ ::Gapic::Operation #update_hardware(update_mask: nil, hardware: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates hardware parameters.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new

# Call the update_hardware method.
result = client.update_hardware request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_hardware(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hardware via a request object, either of type UpdateHardwareRequest or an equivalent Hash.

  • #update_hardware(update_mask: nil, hardware: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hardware via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 2426

def update_hardware request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_hardware..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.hardware&.name
    header_params["hardware.name"] = request.hardware.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_hardware.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_hardware.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :update_hardware, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_hardware_group(request, options = nil) ⇒ ::Gapic::Operation #update_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a hardware group.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new

# Call the update_hardware_group method.
result = client.update_hardware_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_hardware_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hardware_group via a request object, either of type UpdateHardwareGroupRequest or an equivalent Hash.

  • #update_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_hardware_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1928

def update_hardware_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_hardware_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.hardware_group&.name
    header_params["hardware_group.name"] = request.hardware_group.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_hardware_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_hardware_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :update_hardware_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_order(request, options = nil) ⇒ ::Gapic::Operation #update_order(update_mask: nil, order: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of an order.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new

# Call the update_order method.
result = client.update_order request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_order(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_order via a request object, either of type UpdateOrderRequest or an equivalent Hash.

  • #update_order(update_mask: nil, order: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_order via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 726

def update_order request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_order..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.order&.name
    header_params["order.name"] = request.order.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_order.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_order.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :update_order, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_site(request, options = nil) ⇒ ::Gapic::Operation #update_site(update_mask: nil, site: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a site.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new

# Call the update_site method.
result = client.update_site request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_site(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_site via a request object, either of type UpdateSiteRequest or an equivalent Hash.

  • #update_site(update_mask: nil, site: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_site via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 1430

def update_site request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_site..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.site&.name
    header_params["site.name"] = request.site.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_site.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_site.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :update_site, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_zone(request, options = nil) ⇒ ::Gapic::Operation #update_zone(update_mask: nil, zone: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a zone.

Examples:

Basic example

require "google/cloud/gdc_hardware_management/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new

# Call the update_zone method.
result = client.update_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_zone via a request object, either of type UpdateZoneRequest or an equivalent Hash.

  • #update_zone(update_mask: nil, zone: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
# File 'lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb', line 3694

def update_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_zone..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.zone&.name
    header_params["zone.name"] = request.zone.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @gdc_hardware_management_stub.call_rpc :update_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end