Class AuditLogConfig.Builder (1.34.1)

public static final class AuditLogConfig.Builder extends GeneratedMessageV3.Builder<AuditLogConfig.Builder> implements AuditLogConfigOrBuilder

Provides the configuration for logging a type of permissions. Example:

 {
   "audit_log_configs": [
     {
       "log_type": "DATA_READ",
       "exempted_members": [
         "user:jose&#64;example.com"
       ]
     },
     {
       "log_type": "DATA_WRITE"
     }
   ]
 }

This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.

Protobuf type google.iam.v1.AuditLogConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllExemptedMembers(Iterable<String> values)

public AuditLogConfig.Builder addAllExemptedMembers(Iterable<String> values)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameter
Name Description
values Iterable<String>

The exemptedMembers to add.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

addExemptedMembers(String value)

public AuditLogConfig.Builder addExemptedMembers(String value)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameter
Name Description
value String

The exemptedMembers to add.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

addExemptedMembersBytes(ByteString value)

public AuditLogConfig.Builder addExemptedMembersBytes(ByteString value)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameter
Name Description
value ByteString

The bytes of the exemptedMembers to add.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AuditLogConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuditLogConfig.Builder
Overrides

build()

public AuditLogConfig build()
Returns
Type Description
AuditLogConfig

buildPartial()

public AuditLogConfig buildPartial()
Returns
Type Description
AuditLogConfig

clear()

public AuditLogConfig.Builder clear()
Returns
Type Description
AuditLogConfig.Builder
Overrides

clearExemptedMembers()

public AuditLogConfig.Builder clearExemptedMembers()

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AuditLogConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AuditLogConfig.Builder
Overrides

clearLogType()

public AuditLogConfig.Builder clearLogType()

The log type that this config enables.

.google.iam.v1.AuditLogConfig.LogType log_type = 1;

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AuditLogConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AuditLogConfig.Builder
Overrides

clone()

public AuditLogConfig.Builder clone()
Returns
Type Description
AuditLogConfig.Builder
Overrides

getDefaultInstanceForType()

public AuditLogConfig getDefaultInstanceForType()
Returns
Type Description
AuditLogConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExemptedMembers(int index)

public String getExemptedMembers(int index)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The exemptedMembers at the given index.

getExemptedMembersBytes(int index)

public ByteString getExemptedMembersBytes(int index)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the exemptedMembers at the given index.

getExemptedMembersCount()

public int getExemptedMembersCount()

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Returns
Type Description
int

The count of exemptedMembers.

getExemptedMembersList()

public ProtocolStringList getExemptedMembersList()

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Returns
Type Description
ProtocolStringList

A list containing the exemptedMembers.

getLogType()

public AuditLogConfig.LogType getLogType()

The log type that this config enables.

.google.iam.v1.AuditLogConfig.LogType log_type = 1;

Returns
Type Description
AuditLogConfig.LogType

The logType.

getLogTypeValue()

public int getLogTypeValue()

The log type that this config enables.

.google.iam.v1.AuditLogConfig.LogType log_type = 1;

Returns
Type Description
int

The enum numeric value on the wire for logType.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AuditLogConfig other)

public AuditLogConfig.Builder mergeFrom(AuditLogConfig other)
Parameter
Name Description
other AuditLogConfig
Returns
Type Description
AuditLogConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AuditLogConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuditLogConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AuditLogConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AuditLogConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AuditLogConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuditLogConfig.Builder
Overrides

setExemptedMembers(int index, String value)

public AuditLogConfig.Builder setExemptedMembers(int index, String value)

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

repeated string exempted_members = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The exemptedMembers to set.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AuditLogConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuditLogConfig.Builder
Overrides

setLogType(AuditLogConfig.LogType value)

public AuditLogConfig.Builder setLogType(AuditLogConfig.LogType value)

The log type that this config enables.

.google.iam.v1.AuditLogConfig.LogType log_type = 1;

Parameter
Name Description
value AuditLogConfig.LogType

The logType to set.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

setLogTypeValue(int value)

public AuditLogConfig.Builder setLogTypeValue(int value)

The log type that this config enables.

.google.iam.v1.AuditLogConfig.LogType log_type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for logType to set.

Returns
Type Description
AuditLogConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AuditLogConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AuditLogConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AuditLogConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuditLogConfig.Builder
Overrides