lib/google/cloud/compute/v1/subnetworks/rest/client.rb in google-cloud-compute-v1-2.4.0 vs lib/google/cloud/compute/v1/subnetworks/rest/client.rb in google-cloud-compute-v1-2.5.0

- old
+ new

@@ -223,10 +223,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SubnetworksScopedList>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::AggregatedListSubnetworksRequest.new + # + # # Call the aggregated_list method. + # result = client.aggregated_list request + # + # # The returned object is of type Google::Cloud::Compute::V1::SubnetworkAggregatedList. + # p result + # def aggregated_list request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListSubnetworksRequest @@ -292,10 +308,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::DeleteSubnetworkRequest.new + # + # # Call the delete method. + # result = client.delete request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def delete request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteSubnetworkRequest @@ -371,10 +403,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ExpandIpCidrRangeSubnetworkRequest.new + # + # # Call the expand_ip_cidr_range method. + # result = client.expand_ip_cidr_range request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def expand_ip_cidr_range request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ExpandIpCidrRangeSubnetworkRequest @@ -446,10 +494,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Subnetwork] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetSubnetworkRequest.new + # + # # Call the get method. + # result = client.get request + # + # # The returned object is of type Google::Cloud::Compute::V1::Subnetwork. + # p result + # def get request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetSubnetworkRequest @@ -514,10 +578,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetIamPolicySubnetworkRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # def get_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicySubnetworkRequest @@ -582,10 +662,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::InsertSubnetworkRequest.new + # + # # Call the insert method. + # result = client.insert request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def insert request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertSubnetworkRequest @@ -665,10 +761,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Subnetwork>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListSubnetworksRequest.new + # + # # Call the list method. + # result = client.list request + # + # # The returned object is of type Google::Cloud::Compute::V1::SubnetworkList. + # p result + # def list request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListSubnetworksRequest @@ -738,10 +850,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListUsableSubnetworksRequest.new + # + # # Call the list_usable method. + # result = client.list_usable request + # + # # The returned object is of type Google::Cloud::Compute::V1::UsableSubnetworksAggregatedList. + # p result + # def list_usable request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListUsableSubnetworksRequest @@ -811,10 +939,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::PatchSubnetworkRequest.new + # + # # Call the patch method. + # result = client.patch request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def patch request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchSubnetworkRequest @@ -888,10 +1032,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::SetIamPolicySubnetworkRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # def set_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicySubnetworkRequest @@ -958,10 +1118,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::SetPrivateIpGoogleAccessSubnetworkRequest.new + # + # # Call the set_private_ip_google_access method. + # result = client.set_private_ip_google_access request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def set_private_ip_google_access request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetPrivateIpGoogleAccessSubnetworkRequest @@ -1035,9 +1211,25 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::TestIamPermissionsSubnetworkRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse. + # p result + # def test_iam_permissions request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsSubnetworkRequest