Class AccessTuple.Builder

  • All Implemented Interfaces:
    AccessTupleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AccessTuple

    public static final class AccessTuple.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
    implements AccessTupleOrBuilder
     Information about the principal, resource, and permission to check.
     
    Protobuf type google.cloud.policysimulator.v1.AccessTuple
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • clear

        public AccessTuple.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • getDefaultInstanceForType

        public AccessTuple getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public AccessTuple build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public AccessTuple buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public AccessTuple.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • setField

        public AccessTuple.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • clearField

        public AccessTuple.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • clearOneof

        public AccessTuple.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • setRepeatedField

        public AccessTuple.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    int index,
                                                    Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • addRepeatedField

        public AccessTuple.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • mergeFrom

        public AccessTuple.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AccessTuple.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • mergeFrom

        public AccessTuple.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AccessTuple.Builder>
        Throws:
        IOException
      • getPrincipal

        public String getPrincipal()
         Required. The principal whose access you want to check, in the form of
         the email address that represents that principal. For example,
         `alice@example.com` or
         `my-service-account@my-project.iam.gserviceaccount.com`.
        
         The principal must be a Google Account or a service account. Other types of
         principals are not supported.
         
        string principal = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPrincipal in interface AccessTupleOrBuilder
        Returns:
        The principal.
      • getPrincipalBytes

        public com.google.protobuf.ByteString getPrincipalBytes()
         Required. The principal whose access you want to check, in the form of
         the email address that represents that principal. For example,
         `alice@example.com` or
         `my-service-account@my-project.iam.gserviceaccount.com`.
        
         The principal must be a Google Account or a service account. Other types of
         principals are not supported.
         
        string principal = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPrincipalBytes in interface AccessTupleOrBuilder
        Returns:
        The bytes for principal.
      • setPrincipal

        public AccessTuple.Builder setPrincipal​(String value)
         Required. The principal whose access you want to check, in the form of
         the email address that represents that principal. For example,
         `alice@example.com` or
         `my-service-account@my-project.iam.gserviceaccount.com`.
        
         The principal must be a Google Account or a service account. Other types of
         principals are not supported.
         
        string principal = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The principal to set.
        Returns:
        This builder for chaining.
      • clearPrincipal

        public AccessTuple.Builder clearPrincipal()
         Required. The principal whose access you want to check, in the form of
         the email address that represents that principal. For example,
         `alice@example.com` or
         `my-service-account@my-project.iam.gserviceaccount.com`.
        
         The principal must be a Google Account or a service account. Other types of
         principals are not supported.
         
        string principal = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setPrincipalBytes

        public AccessTuple.Builder setPrincipalBytes​(com.google.protobuf.ByteString value)
         Required. The principal whose access you want to check, in the form of
         the email address that represents that principal. For example,
         `alice@example.com` or
         `my-service-account@my-project.iam.gserviceaccount.com`.
        
         The principal must be a Google Account or a service account. Other types of
         principals are not supported.
         
        string principal = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for principal to set.
        Returns:
        This builder for chaining.
      • getFullResourceName

        public String getFullResourceName()
         Required. The full resource name that identifies the resource. For example,
         `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
        
         For examples of full resource names for Google Cloud services, see
         https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
         
        string full_resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFullResourceName in interface AccessTupleOrBuilder
        Returns:
        The fullResourceName.
      • getFullResourceNameBytes

        public com.google.protobuf.ByteString getFullResourceNameBytes()
         Required. The full resource name that identifies the resource. For example,
         `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
        
         For examples of full resource names for Google Cloud services, see
         https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
         
        string full_resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFullResourceNameBytes in interface AccessTupleOrBuilder
        Returns:
        The bytes for fullResourceName.
      • setFullResourceName

        public AccessTuple.Builder setFullResourceName​(String value)
         Required. The full resource name that identifies the resource. For example,
         `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
        
         For examples of full resource names for Google Cloud services, see
         https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
         
        string full_resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The fullResourceName to set.
        Returns:
        This builder for chaining.
      • clearFullResourceName

        public AccessTuple.Builder clearFullResourceName()
         Required. The full resource name that identifies the resource. For example,
         `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
        
         For examples of full resource names for Google Cloud services, see
         https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
         
        string full_resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setFullResourceNameBytes

        public AccessTuple.Builder setFullResourceNameBytes​(com.google.protobuf.ByteString value)
         Required. The full resource name that identifies the resource. For example,
         `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
        
         For examples of full resource names for Google Cloud services, see
         https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
         
        string full_resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for fullResourceName to set.
        Returns:
        This builder for chaining.
      • getPermission

        public String getPermission()
         Required. The IAM permission to check for the specified principal and
         resource.
        
         For a complete list of IAM permissions, see
         https://cloud.google.com/iam/help/permissions/reference.
        
         For a complete list of predefined IAM roles and the permissions in each
         role, see https://cloud.google.com/iam/help/roles/reference.
         
        string permission = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPermission in interface AccessTupleOrBuilder
        Returns:
        The permission.
      • getPermissionBytes

        public com.google.protobuf.ByteString getPermissionBytes()
         Required. The IAM permission to check for the specified principal and
         resource.
        
         For a complete list of IAM permissions, see
         https://cloud.google.com/iam/help/permissions/reference.
        
         For a complete list of predefined IAM roles and the permissions in each
         role, see https://cloud.google.com/iam/help/roles/reference.
         
        string permission = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPermissionBytes in interface AccessTupleOrBuilder
        Returns:
        The bytes for permission.
      • setPermission

        public AccessTuple.Builder setPermission​(String value)
         Required. The IAM permission to check for the specified principal and
         resource.
        
         For a complete list of IAM permissions, see
         https://cloud.google.com/iam/help/permissions/reference.
        
         For a complete list of predefined IAM roles and the permissions in each
         role, see https://cloud.google.com/iam/help/roles/reference.
         
        string permission = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The permission to set.
        Returns:
        This builder for chaining.
      • clearPermission

        public AccessTuple.Builder clearPermission()
         Required. The IAM permission to check for the specified principal and
         resource.
        
         For a complete list of IAM permissions, see
         https://cloud.google.com/iam/help/permissions/reference.
        
         For a complete list of predefined IAM roles and the permissions in each
         role, see https://cloud.google.com/iam/help/roles/reference.
         
        string permission = 3 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setPermissionBytes

        public AccessTuple.Builder setPermissionBytes​(com.google.protobuf.ByteString value)
         Required. The IAM permission to check for the specified principal and
         resource.
        
         For a complete list of IAM permissions, see
         https://cloud.google.com/iam/help/permissions/reference.
        
         For a complete list of predefined IAM roles and the permissions in each
         role, see https://cloud.google.com/iam/help/roles/reference.
         
        string permission = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for permission to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final AccessTuple.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>
      • mergeUnknownFields

        public final AccessTuple.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AccessTuple.Builder>