Class SetIamPolicyRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<SetIamPolicyRequest,SetIamPolicyRequest.Builder>
com.google.iam.v1.SetIamPolicyRequest.Builder
All Implemented Interfaces:
SetIamPolicyRequestOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
SetIamPolicyRequest

public static final class SetIamPolicyRequest.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<SetIamPolicyRequest,SetIamPolicyRequest.Builder> implements SetIamPolicyRequestOrBuilder
 Request message for `SetIamPolicy` method.
 
Protobuf type google.iam.v1.SetIamPolicyRequest
  • Method Details

    • getResource

      public String getResource()
       REQUIRED: The resource for which the policy is being specified.
       See the operation documentation for the appropriate value for this field.
       
      string resource = 1 [json_name = "resource", (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getResource in interface SetIamPolicyRequestOrBuilder
      Returns:
      The resource.
    • getResourceBytes

      public com.google.protobuf.ByteString getResourceBytes()
       REQUIRED: The resource for which the policy is being specified.
       See the operation documentation for the appropriate value for this field.
       
      string resource = 1 [json_name = "resource", (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getResourceBytes in interface SetIamPolicyRequestOrBuilder
      Returns:
      The bytes for resource.
    • setResource

      public SetIamPolicyRequest.Builder setResource(String value)
       REQUIRED: The resource for which the policy is being specified.
       See the operation documentation for the appropriate value for this field.
       
      string resource = 1 [json_name = "resource", (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The resource to set.
      Returns:
      This builder for chaining.
    • clearResource

      public SetIamPolicyRequest.Builder clearResource()
       REQUIRED: The resource for which the policy is being specified.
       See the operation documentation for the appropriate value for this field.
       
      string resource = 1 [json_name = "resource", (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setResourceBytes

      public SetIamPolicyRequest.Builder setResourceBytes(com.google.protobuf.ByteString value)
       REQUIRED: The resource for which the policy is being specified.
       See the operation documentation for the appropriate value for this field.
       
      string resource = 1 [json_name = "resource", (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for resource to set.
      Returns:
      This builder for chaining.
    • hasPolicy

      public boolean hasPolicy()
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasPolicy in interface SetIamPolicyRequestOrBuilder
      Returns:
      Whether the policy field is set.
    • getPolicy

      public Policy getPolicy()
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPolicy in interface SetIamPolicyRequestOrBuilder
      Returns:
      The policy.
    • setPolicy

      public SetIamPolicyRequest.Builder setPolicy(Policy value)
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
    • setPolicy

      public SetIamPolicyRequest.Builder setPolicy(Policy.Builder builderForValue)
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
    • mergePolicy

      public SetIamPolicyRequest.Builder mergePolicy(Policy value)
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
    • clearPolicy

      public SetIamPolicyRequest.Builder clearPolicy()
       REQUIRED: The complete policy to be applied to the `resource`. The size of
       the policy is limited to a few 10s of KB. An empty policy is a
       valid policy but certain Cloud Platform services (such as Projects)
       might reject them.
       
      .google.iam.v1.Policy policy = 2 [json_name = "policy", (.google.api.field_behavior) = REQUIRED];
    • hasUpdateMask

      public boolean hasUpdateMask()
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];
      Specified by:
      hasUpdateMask in interface SetIamPolicyRequestOrBuilder
      Returns:
      Whether the updateMask field is set.
    • getUpdateMask

      public com.google.protobuf.FieldMask getUpdateMask()
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];
      Specified by:
      getUpdateMask in interface SetIamPolicyRequestOrBuilder
      Returns:
      The updateMask.
    • setUpdateMask

      public SetIamPolicyRequest.Builder setUpdateMask(com.google.protobuf.FieldMask value)
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];
    • setUpdateMask

      public SetIamPolicyRequest.Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue)
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];
    • mergeUpdateMask

      public SetIamPolicyRequest.Builder mergeUpdateMask(com.google.protobuf.FieldMask value)
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];
    • clearUpdateMask

      public SetIamPolicyRequest.Builder clearUpdateMask()
       OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       the fields in the mask will be modified. If no mask is provided, the
       following default mask is used:
      
       `paths: "bindings, etag"`
       
      .google.protobuf.FieldMask update_mask = 3 [json_name = "updateMask"];