lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/subnetworks/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::AggregatedListSubnetworksRequest]
# 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::SubnetworkAggregatedList]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::SubnetworkAggregatedList]
# A result object deserialized from the server's reply
def aggregated_list 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::SubnetworkAggregatedList.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 delete REST call
@@ -83,13 +84,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::DeleteSubnetworkRequest]
# 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 delete 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 expand_ip_cidr_range REST call
@@ -120,13 +122,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::ExpandIpCidrRangeSubnetworkRequest]
# 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 expand_ip_cidr_range 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 get REST call
@@ -157,13 +160,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::GetSubnetworkRequest]
# 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::Subnetwork]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Subnetwork]
# 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?
@@ -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::Subnetwork.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_iam_policy REST call
@@ -194,13 +198,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicySubnetworkRequest]
# 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::Policy]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Policy]
# A result object deserialized from the server's reply
def get_iam_policy 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::Policy.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 insert REST call
@@ -231,13 +236,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::InsertSubnetworkRequest]
# 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 insert 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::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 list REST call
@@ -268,13 +274,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::ListSubnetworksRequest]
# 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::SubnetworkList]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::SubnetworkList]
# A result object deserialized from the server's reply
def list 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::SubnetworkList.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_usable REST call
@@ -305,13 +312,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest]
# 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::UsableSubnetworksAggregatedList]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::UsableSubnetworksAggregatedList]
# A result object deserialized from the server's reply
def list_usable 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::UsableSubnetworksAggregatedList.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 patch REST call
@@ -342,13 +350,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::PatchSubnetworkRequest]
# 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 patch 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 set_iam_policy REST call
@@ -379,13 +388,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicySubnetworkRequest]
# 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::Policy]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Policy]
# A result object deserialized from the server's reply
def set_iam_policy 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::Policy.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_private_ip_google_access REST call
@@ -416,13 +426,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::SetPrivateIpGoogleAccessSubnetworkRequest]
# 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_private_ip_google_access 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 test_iam_permissions REST call
@@ -453,13 +464,13 @@
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsSubnetworkRequest]
# 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::TestPermissionsResponse]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
# A result object deserialized from the server's reply
def test_iam_permissions request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -476,12 +487,13 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# @private