Class BucketAccessControl.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<BucketAccessControl.Builder>
com.google.storage.v2.BucketAccessControl.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, BucketAccessControlOrBuilder, Cloneable
Enclosing class:
BucketAccessControl

public static final class BucketAccessControl.Builder extends com.google.protobuf.GeneratedMessage.Builder<BucketAccessControl.Builder> implements BucketAccessControlOrBuilder
 An access-control entry.
 
Protobuf type google.storage.v2.BucketAccessControl
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<BucketAccessControl.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.GeneratedMessage.Builder<BucketAccessControl.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.GeneratedMessage.Builder<BucketAccessControl.Builder>
    • getDefaultInstanceForType

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

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

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

      public BucketAccessControl.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<BucketAccessControl.Builder>
    • mergeFrom

    • isInitialized

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

      public BucketAccessControl.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<BucketAccessControl.Builder>
      Throws:
      IOException
    • getRole

      public String getRole()
       Optional. The access permission for the entity.
       
      string role = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRole in interface BucketAccessControlOrBuilder
      Returns:
      The role.
    • getRoleBytes

      public com.google.protobuf.ByteString getRoleBytes()
       Optional. The access permission for the entity.
       
      string role = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRoleBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for role.
    • setRole

      public BucketAccessControl.Builder setRole(String value)
       Optional. The access permission for the entity.
       
      string role = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The role to set.
      Returns:
      This builder for chaining.
    • clearRole

      public BucketAccessControl.Builder clearRole()
       Optional. The access permission for the entity.
       
      string role = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setRoleBytes

      public BucketAccessControl.Builder setRoleBytes(com.google.protobuf.ByteString value)
       Optional. The access permission for the entity.
       
      string role = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for role to set.
      Returns:
      This builder for chaining.
    • getId

      public String getId()
       Optional. The ID of the access-control entry.
       
      string id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getId in interface BucketAccessControlOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Optional. The ID of the access-control entry.
       
      string id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIdBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for id.
    • setId

      public BucketAccessControl.Builder setId(String value)
       Optional. The ID of the access-control entry.
       
      string id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public BucketAccessControl.Builder clearId()
       Optional. The ID of the access-control entry.
       
      string id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setIdBytes

      public BucketAccessControl.Builder setIdBytes(com.google.protobuf.ByteString value)
       Optional. The ID of the access-control entry.
       
      string id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getEntity

      public String getEntity()
       Optional. The entity holding the permission, in one of the following forms:
       * `user-{userid}`
       * `user-{email}`
       * `group-{groupid}`
       * `group-{email}`
       * `domain-{domain}`
       * `project-{team}-{projectnumber}`
       * `project-{team}-{projectid}`
       * `allUsers`
       * `allAuthenticatedUsers`
       Examples:
       * The user `liz@example.com` would be `user-liz@example.com`.
       * The group `example@googlegroups.com` would be
       `group-example@googlegroups.com`
       * All members of the Google Apps for Business domain `example.com` would be
       `domain-example.com`
       For project entities, `project-{team}-{projectnumber}` format is
       returned on response.
       
      string entity = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntity in interface BucketAccessControlOrBuilder
      Returns:
      The entity.
    • getEntityBytes

      public com.google.protobuf.ByteString getEntityBytes()
       Optional. The entity holding the permission, in one of the following forms:
       * `user-{userid}`
       * `user-{email}`
       * `group-{groupid}`
       * `group-{email}`
       * `domain-{domain}`
       * `project-{team}-{projectnumber}`
       * `project-{team}-{projectid}`
       * `allUsers`
       * `allAuthenticatedUsers`
       Examples:
       * The user `liz@example.com` would be `user-liz@example.com`.
       * The group `example@googlegroups.com` would be
       `group-example@googlegroups.com`
       * All members of the Google Apps for Business domain `example.com` would be
       `domain-example.com`
       For project entities, `project-{team}-{projectnumber}` format is
       returned on response.
       
      string entity = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for entity.
    • setEntity

      public BucketAccessControl.Builder setEntity(String value)
       Optional. The entity holding the permission, in one of the following forms:
       * `user-{userid}`
       * `user-{email}`
       * `group-{groupid}`
       * `group-{email}`
       * `domain-{domain}`
       * `project-{team}-{projectnumber}`
       * `project-{team}-{projectid}`
       * `allUsers`
       * `allAuthenticatedUsers`
       Examples:
       * The user `liz@example.com` would be `user-liz@example.com`.
       * The group `example@googlegroups.com` would be
       `group-example@googlegroups.com`
       * All members of the Google Apps for Business domain `example.com` would be
       `domain-example.com`
       For project entities, `project-{team}-{projectnumber}` format is
       returned on response.
       
      string entity = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The entity to set.
      Returns:
      This builder for chaining.
    • clearEntity

      public BucketAccessControl.Builder clearEntity()
       Optional. The entity holding the permission, in one of the following forms:
       * `user-{userid}`
       * `user-{email}`
       * `group-{groupid}`
       * `group-{email}`
       * `domain-{domain}`
       * `project-{team}-{projectnumber}`
       * `project-{team}-{projectid}`
       * `allUsers`
       * `allAuthenticatedUsers`
       Examples:
       * The user `liz@example.com` would be `user-liz@example.com`.
       * The group `example@googlegroups.com` would be
       `group-example@googlegroups.com`
       * All members of the Google Apps for Business domain `example.com` would be
       `domain-example.com`
       For project entities, `project-{team}-{projectnumber}` format is
       returned on response.
       
      string entity = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEntityBytes

      public BucketAccessControl.Builder setEntityBytes(com.google.protobuf.ByteString value)
       Optional. The entity holding the permission, in one of the following forms:
       * `user-{userid}`
       * `user-{email}`
       * `group-{groupid}`
       * `group-{email}`
       * `domain-{domain}`
       * `project-{team}-{projectnumber}`
       * `project-{team}-{projectid}`
       * `allUsers`
       * `allAuthenticatedUsers`
       Examples:
       * The user `liz@example.com` would be `user-liz@example.com`.
       * The group `example@googlegroups.com` would be
       `group-example@googlegroups.com`
       * All members of the Google Apps for Business domain `example.com` would be
       `domain-example.com`
       For project entities, `project-{team}-{projectnumber}` format is
       returned on response.
       
      string entity = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for entity to set.
      Returns:
      This builder for chaining.
    • getEntityAlt

      public String getEntityAlt()
       Output only. The alternative entity format, if exists. For project
       entities, `project-{team}-{projectid}` format is returned in the response.
       
      string entity_alt = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getEntityAlt in interface BucketAccessControlOrBuilder
      Returns:
      The entityAlt.
    • getEntityAltBytes

      public com.google.protobuf.ByteString getEntityAltBytes()
       Output only. The alternative entity format, if exists. For project
       entities, `project-{team}-{projectid}` format is returned in the response.
       
      string entity_alt = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getEntityAltBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for entityAlt.
    • setEntityAlt

      public BucketAccessControl.Builder setEntityAlt(String value)
       Output only. The alternative entity format, if exists. For project
       entities, `project-{team}-{projectid}` format is returned in the response.
       
      string entity_alt = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The entityAlt to set.
      Returns:
      This builder for chaining.
    • clearEntityAlt

      public BucketAccessControl.Builder clearEntityAlt()
       Output only. The alternative entity format, if exists. For project
       entities, `project-{team}-{projectid}` format is returned in the response.
       
      string entity_alt = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setEntityAltBytes

      public BucketAccessControl.Builder setEntityAltBytes(com.google.protobuf.ByteString value)
       Output only. The alternative entity format, if exists. For project
       entities, `project-{team}-{projectid}` format is returned in the response.
       
      string entity_alt = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for entityAlt to set.
      Returns:
      This builder for chaining.
    • getEntityId

      public String getEntityId()
       Optional. The ID for the entity, if any.
       
      string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityId in interface BucketAccessControlOrBuilder
      Returns:
      The entityId.
    • getEntityIdBytes

      public com.google.protobuf.ByteString getEntityIdBytes()
       Optional. The ID for the entity, if any.
       
      string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityIdBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for entityId.
    • setEntityId

      public BucketAccessControl.Builder setEntityId(String value)
       Optional. The ID for the entity, if any.
       
      string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The entityId to set.
      Returns:
      This builder for chaining.
    • clearEntityId

      public BucketAccessControl.Builder clearEntityId()
       Optional. The ID for the entity, if any.
       
      string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEntityIdBytes

      public BucketAccessControl.Builder setEntityIdBytes(com.google.protobuf.ByteString value)
       Optional. The ID for the entity, if any.
       
      string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for entityId to set.
      Returns:
      This builder for chaining.
    • getEtag

      public String getEtag()
       Optional. The `etag` of the `BucketAccessControl`.
       If included in the metadata of an update or delete request message, the
       operation operation is only performed if the etag matches that of the
       bucket's `BucketAccessControl`.
       
      string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtag in interface BucketAccessControlOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       Optional. The `etag` of the `BucketAccessControl`.
       If included in the metadata of an update or delete request message, the
       operation operation is only performed if the etag matches that of the
       bucket's `BucketAccessControl`.
       
      string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtagBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for etag.
    • setEtag

      public BucketAccessControl.Builder setEtag(String value)
       Optional. The `etag` of the `BucketAccessControl`.
       If included in the metadata of an update or delete request message, the
       operation operation is only performed if the etag matches that of the
       bucket's `BucketAccessControl`.
       
      string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The etag to set.
      Returns:
      This builder for chaining.
    • clearEtag

      public BucketAccessControl.Builder clearEtag()
       Optional. The `etag` of the `BucketAccessControl`.
       If included in the metadata of an update or delete request message, the
       operation operation is only performed if the etag matches that of the
       bucket's `BucketAccessControl`.
       
      string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEtagBytes

      public BucketAccessControl.Builder setEtagBytes(com.google.protobuf.ByteString value)
       Optional. The `etag` of the `BucketAccessControl`.
       If included in the metadata of an update or delete request message, the
       operation operation is only performed if the etag matches that of the
       bucket's `BucketAccessControl`.
       
      string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for etag to set.
      Returns:
      This builder for chaining.
    • getEmail

      public String getEmail()
       Optional. The email address associated with the entity, if any.
       
      string email = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEmail in interface BucketAccessControlOrBuilder
      Returns:
      The email.
    • getEmailBytes

      public com.google.protobuf.ByteString getEmailBytes()
       Optional. The email address associated with the entity, if any.
       
      string email = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEmailBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for email.
    • setEmail

      public BucketAccessControl.Builder setEmail(String value)
       Optional. The email address associated with the entity, if any.
       
      string email = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The email to set.
      Returns:
      This builder for chaining.
    • clearEmail

      public BucketAccessControl.Builder clearEmail()
       Optional. The email address associated with the entity, if any.
       
      string email = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEmailBytes

      public BucketAccessControl.Builder setEmailBytes(com.google.protobuf.ByteString value)
       Optional. The email address associated with the entity, if any.
       
      string email = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for email to set.
      Returns:
      This builder for chaining.
    • getDomain

      public String getDomain()
       Optional. The domain associated with the entity, if any.
       
      string domain = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDomain in interface BucketAccessControlOrBuilder
      Returns:
      The domain.
    • getDomainBytes

      public com.google.protobuf.ByteString getDomainBytes()
       Optional. The domain associated with the entity, if any.
       
      string domain = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDomainBytes in interface BucketAccessControlOrBuilder
      Returns:
      The bytes for domain.
    • setDomain

      public BucketAccessControl.Builder setDomain(String value)
       Optional. The domain associated with the entity, if any.
       
      string domain = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The domain to set.
      Returns:
      This builder for chaining.
    • clearDomain

      public BucketAccessControl.Builder clearDomain()
       Optional. The domain associated with the entity, if any.
       
      string domain = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDomainBytes

      public BucketAccessControl.Builder setDomainBytes(com.google.protobuf.ByteString value)
       Optional. The domain associated with the entity, if any.
       
      string domain = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for domain to set.
      Returns:
      This builder for chaining.
    • hasProjectTeam

      public boolean hasProjectTeam()
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasProjectTeam in interface BucketAccessControlOrBuilder
      Returns:
      Whether the projectTeam field is set.
    • getProjectTeam

      public ProjectTeam getProjectTeam()
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getProjectTeam in interface BucketAccessControlOrBuilder
      Returns:
      The projectTeam.
    • setProjectTeam

      public BucketAccessControl.Builder setProjectTeam(ProjectTeam value)
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setProjectTeam

      public BucketAccessControl.Builder setProjectTeam(ProjectTeam.Builder builderForValue)
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
    • mergeProjectTeam

      public BucketAccessControl.Builder mergeProjectTeam(ProjectTeam value)
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearProjectTeam

      public BucketAccessControl.Builder clearProjectTeam()
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getProjectTeamBuilder

      public ProjectTeam.Builder getProjectTeamBuilder()
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getProjectTeamOrBuilder

      public ProjectTeamOrBuilder getProjectTeamOrBuilder()
       Optional. The project team associated with the entity, if any.
       
      .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getProjectTeamOrBuilder in interface BucketAccessControlOrBuilder