lib/google/cloud/compute/v1/instances/rest/client.rb in google-cloud-compute-v1-1.1.0 vs lib/google/cloud/compute/v1/instances/rest/client.rb in google-cloud-compute-v1-1.2.0

- old
+ new

@@ -17,10 +17,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/errors" require "google/cloud/compute/v1/compute_pb" require "google/cloud/compute/v1/instances/rest/service_stub" +require "google/cloud/compute/v1/zone_operations/rest" module Google module Cloud module Compute module V1 @@ -238,13 +239,25 @@ credentials ||= Credentials.default scope: @config.scope if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end + @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config| + config.credentials = credentials + config.endpoint = @config.endpoint + end + @instances_stub = ::Google::Cloud::Compute::V1::Instances::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials end + ## + # Get the associated client for long-running operations via ZoneOperations. + # + # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client] + # + attr_reader :zone_operations + # Service calls ## # Adds an access config to an instance's network interface. # @@ -276,14 +289,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def add_access_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -306,11 +319,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.add_access_config request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -346,14 +367,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def add_resource_policies request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -376,11 +397,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.add_resource_policies request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -492,14 +521,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def attach_disk request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -522,11 +551,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.attach_disk request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -560,14 +597,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def bulk_insert request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -590,11 +627,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.bulk_insert request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -628,14 +673,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -658,11 +703,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.delete request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -700,14 +753,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete_access_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -730,11 +783,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.delete_access_config request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -770,14 +831,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def detach_disk request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -800,11 +861,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.detach_disk request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1309,14 +1378,14 @@ # @param source_machine_image [::String] # Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def insert request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1339,11 +1408,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.insert request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1529,14 +1606,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def remove_resource_policies request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1559,11 +1636,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.remove_resource_policies request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1597,14 +1682,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def reset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1627,11 +1712,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.reset request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1665,14 +1758,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def resume request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1695,11 +1788,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.resume request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1800,14 +1901,14 @@ # @param resource [::String] # Name or id of the resource for this request. # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_deletion_protection request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1830,11 +1931,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_deletion_protection request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -1872,14 +1981,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_disk_auto_delete request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1902,11 +2011,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_disk_auto_delete request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2009,14 +2126,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_labels request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2039,11 +2156,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_labels request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2079,14 +2204,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_machine_resources request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2109,11 +2234,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_machine_resources request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2149,14 +2282,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_machine_type request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2179,11 +2312,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_machine_type request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2219,14 +2360,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_metadata request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2249,11 +2390,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_metadata request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2289,14 +2438,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_min_cpu_platform request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2319,11 +2468,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_min_cpu_platform request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2359,14 +2516,14 @@ # @param scheduling_resource [::Google::Cloud::Compute::V1::Scheduling, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_scheduling request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2389,11 +2546,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_scheduling request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2429,14 +2594,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_service_account request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2459,11 +2624,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_service_account request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2499,14 +2672,14 @@ # @param shielded_instance_integrity_policy_resource [::Google::Cloud::Compute::V1::ShieldedInstanceIntegrityPolicy, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_shielded_instance_integrity_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2529,11 +2702,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_shielded_instance_integrity_policy request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2569,14 +2750,14 @@ # @param tags_resource [::Google::Cloud::Compute::V1::Tags, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_tags request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2599,11 +2780,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.set_tags request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2635,14 +2824,14 @@ # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def simulate_maintenance_event request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2665,11 +2854,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.simulate_maintenance_event request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2703,14 +2900,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def start request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2733,11 +2930,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.start request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2773,14 +2978,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def start_with_encryption_key request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2803,11 +3008,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.start_with_encryption_key request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2841,14 +3054,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def stop request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2871,11 +3084,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.stop request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -2909,14 +3130,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def suspend request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -2939,11 +3160,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.suspend request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -3050,14 +3279,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -3080,11 +3309,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.update request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -3122,14 +3359,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_access_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -3152,11 +3389,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.update_access_config request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -3192,14 +3437,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_display_device request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -3222,11 +3467,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.update_display_device request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -3264,14 +3517,14 @@ # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_network_interface request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -3294,11 +3547,19 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.update_network_interface request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e @@ -3334,14 +3595,14 @@ # @param shielded_instance_config_resource [::Google::Cloud::Compute::V1::ShieldedInstanceConfig, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. # @yield [result, response] Access the result along with the Faraday response object - # @yieldparam result [::Gapic::Rest::BaseOperation] + # @yieldparam result [::Gapic::GenericLRO::Operation] # @yieldparam response [::Faraday::Response] # - # @return [::Gapic::Rest::BaseOperation] + # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_shielded_instance_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -3364,10 +3625,18 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata @instances_stub.update_shielded_instance_config request, options do |result, response| - result = ::Gapic::Rest::BaseOperation.new result + result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation( + operation: result, + client: zone_operations, + request_values: { + "project" => request.project, + "zone" => request.zone + }, + options: options + ) yield result, response if block_given? return result end rescue ::Faraday::Error => e gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e