Class AccessPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AccessPolicy.Builder>
com.google.iam.v3beta.AccessPolicy.Builder
All Implemented Interfaces:
AccessPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AccessPolicy

public static final class AccessPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<AccessPolicy.Builder> implements AccessPolicyOrBuilder
 An IAM access policy resource.
 
Protobuf type google.iam.v3beta.AccessPolicy
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AccessPolicy.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AccessPolicy.Builder>
    • internalGetFieldAccessorTable

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

      public AccessPolicy.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<AccessPolicy.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<AccessPolicy.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public AccessPolicy.Builder mergeFrom(AccessPolicy other)
    • isInitialized

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

      public AccessPolicy.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<AccessPolicy.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. The resource name of the access policy.
      
       The following formats are supported:
      
       * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}`
       * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}`
       * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}`
       * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface AccessPolicyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name of the access policy.
      
       The following formats are supported:
      
       * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}`
       * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}`
       * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}`
       * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface AccessPolicyOrBuilder
      Returns:
      The bytes for name.
    • setName

      public AccessPolicy.Builder setName(String value)
       Identifier. The resource name of the access policy.
      
       The following formats are supported:
      
       * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}`
       * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}`
       * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}`
       * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public AccessPolicy.Builder clearName()
       Identifier. The resource name of the access policy.
      
       The following formats are supported:
      
       * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}`
       * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}`
       * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}`
       * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public AccessPolicy.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name of the access policy.
      
       The following formats are supported:
      
       * `projects/{project_id}/locations/{location}/accessPolicies/{policy_id}`
       * `projects/{project_number}/locations/{location}/accessPolicies/{policy_id}`
       * `folders/{folder_id}/locations/{location}/accessPolicies/{policy_id}`
       * `organizations/{organization_id}/locations/{location}/accessPolicies/{policy_id}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getUid

      public String getUid()
       Output only. The globally unique ID of the access policy.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUid in interface AccessPolicyOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. The globally unique ID of the access policy.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUidBytes in interface AccessPolicyOrBuilder
      Returns:
      The bytes for uid.
    • setUid

      public AccessPolicy.Builder setUid(String value)
       Output only. The globally unique ID of the access policy.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The uid to set.
      Returns:
      This builder for chaining.
    • clearUid

      public AccessPolicy.Builder clearUid()
       Output only. The globally unique ID of the access policy.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Returns:
      This builder for chaining.
    • setUidBytes

      public AccessPolicy.Builder setUidBytes(com.google.protobuf.ByteString value)
       Output only. The globally unique ID of the access policy.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The bytes for uid to set.
      Returns:
      This builder for chaining.
    • getEtag

      public String getEtag()
       Optional. The etag for the access policy.
       If this is provided on update, it must match the server's etag.
       
      string etag = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtag in interface AccessPolicyOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       Optional. The etag for the access policy.
       If this is provided on update, it must match the server's etag.
       
      string etag = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtagBytes in interface AccessPolicyOrBuilder
      Returns:
      The bytes for etag.
    • setEtag

      public AccessPolicy.Builder setEtag(String value)
       Optional. The etag for the access policy.
       If this is provided on update, it must match the server's etag.
       
      string etag = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The etag to set.
      Returns:
      This builder for chaining.
    • clearEtag

      public AccessPolicy.Builder clearEtag()
       Optional. The etag for the access policy.
       If this is provided on update, it must match the server's etag.
       
      string etag = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setEtagBytes

      public AccessPolicy.Builder setEtagBytes(com.google.protobuf.ByteString value)
       Optional. The etag for the access policy.
       If this is provided on update, it must match the server's etag.
       
      string etag = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for etag to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Optional. The description of the access policy. Must be less than
       or equal to 63 characters.
       
      string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayName in interface AccessPolicyOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Optional. The description of the access policy. Must be less than
       or equal to 63 characters.
       
      string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayNameBytes in interface AccessPolicyOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public AccessPolicy.Builder setDisplayName(String value)
       Optional. The description of the access policy. Must be less than
       or equal to 63 characters.
       
      string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public AccessPolicy.Builder clearDisplayName()
       Optional. The description of the access policy. Must be less than
       or equal to 63 characters.
       
      string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public AccessPolicy.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Optional. The description of the access policy. Must be less than
       or equal to 63 characters.
       
      string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: AccessPolicyOrBuilder
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsCount in interface AccessPolicyOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsAnnotations in interface AccessPolicyOrBuilder
    • getAnnotations

      @Deprecated public Map<String,String> getAnnotations()
      Deprecated.
      Use getAnnotationsMap() instead.
      Specified by:
      getAnnotations in interface AccessPolicyOrBuilder
    • getAnnotationsMap

      public Map<String,String> getAnnotationsMap()
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsMap in interface AccessPolicyOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsOrDefault in interface AccessPolicyOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsOrThrow in interface AccessPolicyOrBuilder
    • clearAnnotations

      public AccessPolicy.Builder clearAnnotations()
    • removeAnnotations

      public AccessPolicy.Builder removeAnnotations(String key)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableAnnotations

      @Deprecated public Map<String,String> getMutableAnnotations()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAnnotations

      public AccessPolicy.Builder putAnnotations(String key, String value)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
    • putAllAnnotations

      public AccessPolicy.Builder putAllAnnotations(Map<String,String> values)
       Optional. User defined annotations. See
       https://google.aip.dev/148#annotations for more details such as format and
       size limitations
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface AccessPolicyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface AccessPolicyOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public AccessPolicy.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public AccessPolicy.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public AccessPolicy.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public AccessPolicy.Builder clearCreateTime()
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time when the access policy was created.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface AccessPolicyOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface AccessPolicyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface AccessPolicyOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public AccessPolicy.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public AccessPolicy.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public AccessPolicy.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public AccessPolicy.Builder clearUpdateTime()
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time when the access policy was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface AccessPolicyOrBuilder
    • hasDetails

      public boolean hasDetails()
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasDetails in interface AccessPolicyOrBuilder
      Returns:
      Whether the details field is set.
    • getDetails

      public AccessPolicyDetails getDetails()
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDetails in interface AccessPolicyOrBuilder
      Returns:
      The details.
    • setDetails

      public AccessPolicy.Builder setDetails(AccessPolicyDetails value)
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
    • setDetails

      public AccessPolicy.Builder setDetails(AccessPolicyDetails.Builder builderForValue)
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
    • mergeDetails

      public AccessPolicy.Builder mergeDetails(AccessPolicyDetails value)
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
    • clearDetails

      public AccessPolicy.Builder clearDetails()
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getDetailsBuilder

      public AccessPolicyDetails.Builder getDetailsBuilder()
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getDetailsOrBuilder

      public AccessPolicyDetailsOrBuilder getDetailsOrBuilder()
       Optional. The details for the access policy.
       
      .google.iam.v3beta.AccessPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDetailsOrBuilder in interface AccessPolicyOrBuilder