Class AuthorizationInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AuthorizationInfo.Builder>
com.google.cloud.audit.AuthorizationInfo.Builder
All Implemented Interfaces:
AuthorizationInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AuthorizationInfo

public static final class AuthorizationInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<AuthorizationInfo.Builder> implements AuthorizationInfoOrBuilder
 Authorization information for the operation.
 
Protobuf type google.cloud.audit.AuthorizationInfo
  • 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<AuthorizationInfo.Builder>
    • clear

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

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

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

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

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

      public AuthorizationInfo.Builder mergeFrom(AuthorizationInfo other)
    • isInitialized

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

      public AuthorizationInfo.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<AuthorizationInfo.Builder>
      Throws:
      IOException
    • getResource

      public String getResource()
       The resource being accessed, as a REST-style or cloud resource string.
       For example:
      
       bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
       or
       projects/PROJECTID/datasets/DATASETID
       
      string resource = 1;
      Specified by:
      getResource in interface AuthorizationInfoOrBuilder
      Returns:
      The resource.
    • getResourceBytes

      public com.google.protobuf.ByteString getResourceBytes()
       The resource being accessed, as a REST-style or cloud resource string.
       For example:
      
       bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
       or
       projects/PROJECTID/datasets/DATASETID
       
      string resource = 1;
      Specified by:
      getResourceBytes in interface AuthorizationInfoOrBuilder
      Returns:
      The bytes for resource.
    • setResource

      public AuthorizationInfo.Builder setResource(String value)
       The resource being accessed, as a REST-style or cloud resource string.
       For example:
      
       bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
       or
       projects/PROJECTID/datasets/DATASETID
       
      string resource = 1;
      Parameters:
      value - The resource to set.
      Returns:
      This builder for chaining.
    • clearResource

      public AuthorizationInfo.Builder clearResource()
       The resource being accessed, as a REST-style or cloud resource string.
       For example:
      
       bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
       or
       projects/PROJECTID/datasets/DATASETID
       
      string resource = 1;
      Returns:
      This builder for chaining.
    • setResourceBytes

      public AuthorizationInfo.Builder setResourceBytes(com.google.protobuf.ByteString value)
       The resource being accessed, as a REST-style or cloud resource string.
       For example:
      
       bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
       or
       projects/PROJECTID/datasets/DATASETID
       
      string resource = 1;
      Parameters:
      value - The bytes for resource to set.
      Returns:
      This builder for chaining.
    • getPermission

      public String getPermission()
       The required IAM permission.
       
      string permission = 2;
      Specified by:
      getPermission in interface AuthorizationInfoOrBuilder
      Returns:
      The permission.
    • getPermissionBytes

      public com.google.protobuf.ByteString getPermissionBytes()
       The required IAM permission.
       
      string permission = 2;
      Specified by:
      getPermissionBytes in interface AuthorizationInfoOrBuilder
      Returns:
      The bytes for permission.
    • setPermission

      public AuthorizationInfo.Builder setPermission(String value)
       The required IAM permission.
       
      string permission = 2;
      Parameters:
      value - The permission to set.
      Returns:
      This builder for chaining.
    • clearPermission

      public AuthorizationInfo.Builder clearPermission()
       The required IAM permission.
       
      string permission = 2;
      Returns:
      This builder for chaining.
    • setPermissionBytes

      public AuthorizationInfo.Builder setPermissionBytes(com.google.protobuf.ByteString value)
       The required IAM permission.
       
      string permission = 2;
      Parameters:
      value - The bytes for permission to set.
      Returns:
      This builder for chaining.
    • getGranted

      public boolean getGranted()
       Whether or not authorization for `resource` and `permission`
       was granted.
       
      bool granted = 3;
      Specified by:
      getGranted in interface AuthorizationInfoOrBuilder
      Returns:
      The granted.
    • setGranted

      public AuthorizationInfo.Builder setGranted(boolean value)
       Whether or not authorization for `resource` and `permission`
       was granted.
       
      bool granted = 3;
      Parameters:
      value - The granted to set.
      Returns:
      This builder for chaining.
    • clearGranted

      public AuthorizationInfo.Builder clearGranted()
       Whether or not authorization for `resource` and `permission`
       was granted.
       
      bool granted = 3;
      Returns:
      This builder for chaining.
    • hasResourceAttributes

      public boolean hasResourceAttributes()
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
      Specified by:
      hasResourceAttributes in interface AuthorizationInfoOrBuilder
      Returns:
      Whether the resourceAttributes field is set.
    • getResourceAttributes

      public AttributeContext.Resource getResourceAttributes()
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
      Specified by:
      getResourceAttributes in interface AuthorizationInfoOrBuilder
      Returns:
      The resourceAttributes.
    • setResourceAttributes

      public AuthorizationInfo.Builder setResourceAttributes(AttributeContext.Resource value)
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
    • setResourceAttributes

      public AuthorizationInfo.Builder setResourceAttributes(AttributeContext.Resource.Builder builderForValue)
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
    • mergeResourceAttributes

      public AuthorizationInfo.Builder mergeResourceAttributes(AttributeContext.Resource value)
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
    • clearResourceAttributes

      public AuthorizationInfo.Builder clearResourceAttributes()
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
    • getResourceAttributesBuilder

      public AttributeContext.Resource.Builder getResourceAttributesBuilder()
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
    • getResourceAttributesOrBuilder

      public AttributeContext.ResourceOrBuilder getResourceAttributesOrBuilder()
       Resource attributes used in IAM condition evaluation. This field contains
       resource attributes like resource type and resource name.
      
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.request_metadata.request_attributes`.
       
      .google.rpc.context.AttributeContext.Resource resource_attributes = 5;
      Specified by:
      getResourceAttributesOrBuilder in interface AuthorizationInfoOrBuilder
    • getPermissionTypeValue

      public int getPermissionTypeValue()
       The type of the permission that was checked. For data access audit logs
       this corresponds with the permission type that must be enabled in the
       project/folder/organization IAM policy in order for the log to be written.
       
      .google.cloud.audit.AuthorizationInfo.PermissionType permission_type = 7;
      Specified by:
      getPermissionTypeValue in interface AuthorizationInfoOrBuilder
      Returns:
      The enum numeric value on the wire for permissionType.
    • setPermissionTypeValue

      public AuthorizationInfo.Builder setPermissionTypeValue(int value)
       The type of the permission that was checked. For data access audit logs
       this corresponds with the permission type that must be enabled in the
       project/folder/organization IAM policy in order for the log to be written.
       
      .google.cloud.audit.AuthorizationInfo.PermissionType permission_type = 7;
      Parameters:
      value - The enum numeric value on the wire for permissionType to set.
      Returns:
      This builder for chaining.
    • getPermissionType

      public AuthorizationInfo.PermissionType getPermissionType()
       The type of the permission that was checked. For data access audit logs
       this corresponds with the permission type that must be enabled in the
       project/folder/organization IAM policy in order for the log to be written.
       
      .google.cloud.audit.AuthorizationInfo.PermissionType permission_type = 7;
      Specified by:
      getPermissionType in interface AuthorizationInfoOrBuilder
      Returns:
      The permissionType.
    • setPermissionType

       The type of the permission that was checked. For data access audit logs
       this corresponds with the permission type that must be enabled in the
       project/folder/organization IAM policy in order for the log to be written.
       
      .google.cloud.audit.AuthorizationInfo.PermissionType permission_type = 7;
      Parameters:
      value - The permissionType to set.
      Returns:
      This builder for chaining.
    • clearPermissionType

      public AuthorizationInfo.Builder clearPermissionType()
       The type of the permission that was checked. For data access audit logs
       this corresponds with the permission type that must be enabled in the
       project/folder/organization IAM policy in order for the log to be written.
       
      .google.cloud.audit.AuthorizationInfo.PermissionType permission_type = 7;
      Returns:
      This builder for chaining.