lib/google/iam/v1/iam_policy/rest/client.rb in google-iam-v1-0.5.2 vs lib/google/iam/v1/iam_policy/rest/client.rb in google-iam-v1-0.6.0
- old
+ new
@@ -197,10 +197,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Iam::V1::Policy]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/iam/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Iam::V1::IAMPolicy::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
+ #
+ # # Call the set_iam_policy method.
+ # result = client.set_iam_policy request
+ #
+ # # The returned object is of type Google::Iam::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::Iam::V1::SetIamPolicyRequest
@@ -267,10 +283,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Iam::V1::Policy]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/iam/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Iam::V1::IAMPolicy::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
+ #
+ # # Call the get_iam_policy method.
+ # result = client.get_iam_policy request
+ #
+ # # The returned object is of type Google::Iam::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::Iam::V1::GetIamPolicyRequest
@@ -343,9 +375,25 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/iam/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Iam::V1::IAMPolicy::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
+ #
+ # # Call the test_iam_permissions method.
+ # result = client.test_iam_permissions request
+ #
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
+ # 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::Iam::V1::TestIamPermissionsRequest