lib/google/cloud/compute/v1/projects/rest/service_stub.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/projects/rest/service_stub.rb in google-cloud-compute-v1-2.0.0
- old
+ new
@@ -46,13 +46,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::DisableXpnHostProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def disable_xpn_host request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -69,13 +69,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the disable_xpn_resource REST call
@@ -83,13 +84,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::DisableXpnResourceProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def disable_xpn_resource request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -106,13 +107,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the enable_xpn_host REST call
@@ -120,13 +122,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::EnableXpnHostProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def enable_xpn_host request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -143,13 +145,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the enable_xpn_resource REST call
@@ -157,13 +160,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::EnableXpnResourceProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def enable_xpn_resource request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -180,13 +183,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the get REST call
@@ -194,13 +198,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::GetProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Project]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Project]
# A result object deserialized from the server's reply
def get request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -217,13 +221,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the get_xpn_host REST call
@@ -231,13 +236,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::GetXpnHostProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Project]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Project]
# A result object deserialized from the server's reply
def get_xpn_host request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -254,13 +259,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the get_xpn_resources REST call
@@ -268,13 +274,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::GetXpnResourcesProjectsRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::ProjectsGetXpnResources]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::ProjectsGetXpnResources]
# A result object deserialized from the server's reply
def get_xpn_resources request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -291,13 +297,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::ProjectsGetXpnResources.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the list_xpn_hosts REST call
@@ -305,13 +312,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::ListXpnHostsProjectsRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::XpnHostList]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::XpnHostList]
# A result object deserialized from the server's reply
def list_xpn_hosts request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -328,13 +335,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::XpnHostList.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the move_disk REST call
@@ -342,13 +350,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::MoveDiskProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def move_disk request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -365,13 +373,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the move_instance REST call
@@ -379,13 +388,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::MoveInstanceProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def move_instance request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -402,13 +411,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the set_common_instance_metadata REST call
@@ -416,13 +426,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::SetCommonInstanceMetadataProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def set_common_instance_metadata request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -439,13 +449,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the set_default_network_tier REST call
@@ -453,13 +464,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::SetDefaultNetworkTierProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def set_default_network_tier request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -476,13 +487,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# Baseline implementation for the set_usage_export_bucket REST call
@@ -490,13 +502,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::SetUsageExportBucketProjectRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
- # @yield [result, response] Access the result along with the Faraday response object
+ # @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Operation]
# A result object deserialized from the server's reply
def set_usage_export_bucket request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -513,12 +525,13 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# @private