Class LogBucket.Builder (3.17.0)

public static final class LogBucket.Builder extends GeneratedMessageV3.Builder<LogBucket.Builder> implements LogBucketOrBuilder

Describes a repository in which log entries are stored.

Protobuf type google.logging.v2.LogBucket

Implements

LogBucketOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllIndexConfigs(Iterable<? extends IndexConfig> values)

public LogBucket.Builder addAllIndexConfigs(Iterable<? extends IndexConfig> values)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
values Iterable<? extends com.google.logging.v2.IndexConfig>
Returns
Type Description
LogBucket.Builder

addAllRestrictedFields(Iterable<String> values)

public LogBucket.Builder addAllRestrictedFields(Iterable<String> values)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameter
Name Description
values Iterable<String>

The restrictedFields to add.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

addIndexConfigs(IndexConfig value)

public LogBucket.Builder addIndexConfigs(IndexConfig value)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
value IndexConfig
Returns
Type Description
LogBucket.Builder

addIndexConfigs(IndexConfig.Builder builderForValue)

public LogBucket.Builder addIndexConfigs(IndexConfig.Builder builderForValue)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
builderForValue IndexConfig.Builder
Returns
Type Description
LogBucket.Builder

addIndexConfigs(int index, IndexConfig value)

public LogBucket.Builder addIndexConfigs(int index, IndexConfig value)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameters
Name Description
index int
value IndexConfig
Returns
Type Description
LogBucket.Builder

addIndexConfigs(int index, IndexConfig.Builder builderForValue)

public LogBucket.Builder addIndexConfigs(int index, IndexConfig.Builder builderForValue)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameters
Name Description
index int
builderForValue IndexConfig.Builder
Returns
Type Description
LogBucket.Builder

addIndexConfigsBuilder()

public IndexConfig.Builder addIndexConfigsBuilder()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
IndexConfig.Builder

addIndexConfigsBuilder(int index)

public IndexConfig.Builder addIndexConfigsBuilder(int index)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
index int
Returns
Type Description
IndexConfig.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRestrictedFields(String value)

public LogBucket.Builder addRestrictedFields(String value)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameter
Name Description
value String

The restrictedFields to add.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

addRestrictedFieldsBytes(ByteString value)

public LogBucket.Builder addRestrictedFieldsBytes(ByteString value)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameter
Name Description
value ByteString

The bytes of the restrictedFields to add.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

build()

public LogBucket build()
Returns
Type Description
LogBucket

buildPartial()

public LogBucket buildPartial()
Returns
Type Description
LogBucket

clear()

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

clearAnalyticsEnabled()

public LogBucket.Builder clearAnalyticsEnabled()

Whether log analytics is enabled for this bucket.

Once enabled, log analytics features cannot be disabled.

bool analytics_enabled = 14;

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearCmekSettings()

public LogBucket.Builder clearCmekSettings()

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Returns
Type Description
LogBucket.Builder

clearCreateTime()

public LogBucket.Builder clearCreateTime()

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LogBucket.Builder

clearDescription()

public LogBucket.Builder clearDescription()

Describes this bucket.

string description = 3;

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearIndexConfigs()

public LogBucket.Builder clearIndexConfigs()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
LogBucket.Builder

clearLifecycleState()

public LogBucket.Builder clearLifecycleState()

Output only. The bucket lifecycle state.

.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearLocked()

public LogBucket.Builder clearLocked()

Whether the bucket is locked.

The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.

bool locked = 9;

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearName()

public LogBucket.Builder clearName()

Output only. The resource name of the bucket.

For example:

projects/my-project/locations/global/buckets/my-bucket

For a list of supported locations, see Supported Regions

For the location of global it is unspecified where log entries are actually stored.

After a bucket has been created, the location cannot be changed.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRestrictedFields()

public LogBucket.Builder clearRestrictedFields()

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearRetentionDays()

public LogBucket.Builder clearRetentionDays()

Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.

int32 retention_days = 11;

Returns
Type Description
LogBucket.Builder

This builder for chaining.

clearUpdateTime()

public LogBucket.Builder clearUpdateTime()

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LogBucket.Builder

clone()

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

getAnalyticsEnabled()

public boolean getAnalyticsEnabled()

Whether log analytics is enabled for this bucket.

Once enabled, log analytics features cannot be disabled.

bool analytics_enabled = 14;

Returns
Type Description
boolean

The analyticsEnabled.

getCmekSettings()

public CmekSettings getCmekSettings()

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Returns
Type Description
CmekSettings

The cmekSettings.

getCmekSettingsBuilder()

public CmekSettings.Builder getCmekSettingsBuilder()

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Returns
Type Description
CmekSettings.Builder

getCmekSettingsOrBuilder()

public CmekSettingsOrBuilder getCmekSettingsOrBuilder()

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Returns
Type Description
CmekSettingsOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public LogBucket getDefaultInstanceForType()
Returns
Type Description
LogBucket

getDescription()

public String getDescription()

Describes this bucket.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Describes this bucket.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getIndexConfigs(int index)

public IndexConfig getIndexConfigs(int index)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
index int
Returns
Type Description
IndexConfig

getIndexConfigsBuilder(int index)

public IndexConfig.Builder getIndexConfigsBuilder(int index)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
index int
Returns
Type Description
IndexConfig.Builder

getIndexConfigsBuilderList()

public List<IndexConfig.Builder> getIndexConfigsBuilderList()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
List<Builder>

getIndexConfigsCount()

public int getIndexConfigsCount()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
int

getIndexConfigsList()

public List<IndexConfig> getIndexConfigsList()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
List<IndexConfig>

getIndexConfigsOrBuilder(int index)

public IndexConfigOrBuilder getIndexConfigsOrBuilder(int index)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
index int
Returns
Type Description
IndexConfigOrBuilder

getIndexConfigsOrBuilderList()

public List<? extends IndexConfigOrBuilder> getIndexConfigsOrBuilderList()

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Returns
Type Description
List<? extends com.google.logging.v2.IndexConfigOrBuilder>

getLifecycleState()

public LifecycleState getLifecycleState()

Output only. The bucket lifecycle state.

.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LifecycleState

The lifecycleState.

getLifecycleStateValue()

public int getLifecycleStateValue()

Output only. The bucket lifecycle state.

.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for lifecycleState.

getLocked()

public boolean getLocked()

Whether the bucket is locked.

The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.

bool locked = 9;

Returns
Type Description
boolean

The locked.

getName()

public String getName()

Output only. The resource name of the bucket.

For example:

projects/my-project/locations/global/buckets/my-bucket

For a list of supported locations, see Supported Regions

For the location of global it is unspecified where log entries are actually stored.

After a bucket has been created, the location cannot be changed.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the bucket.

For example:

projects/my-project/locations/global/buckets/my-bucket

For a list of supported locations, see Supported Regions

For the location of global it is unspecified where log entries are actually stored.

After a bucket has been created, the location cannot be changed.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getRestrictedFields(int index)

public String getRestrictedFields(int index)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The restrictedFields at the given index.

getRestrictedFieldsBytes(int index)

public ByteString getRestrictedFieldsBytes(int index)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the restrictedFields at the given index.

getRestrictedFieldsCount()

public int getRestrictedFieldsCount()

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Returns
Type Description
int

The count of restrictedFields.

getRestrictedFieldsList()

public ProtocolStringList getRestrictedFieldsList()

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Returns
Type Description
ProtocolStringList

A list containing the restrictedFields.

getRetentionDays()

public int getRetentionDays()

Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.

int32 retention_days = 11;

Returns
Type Description
int

The retentionDays.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCmekSettings()

public boolean hasCmekSettings()

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Returns
Type Description
boolean

Whether the cmekSettings field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCmekSettings(CmekSettings value)

public LogBucket.Builder mergeCmekSettings(CmekSettings value)

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Parameter
Name Description
value CmekSettings
Returns
Type Description
LogBucket.Builder

mergeCreateTime(Timestamp value)

public LogBucket.Builder mergeCreateTime(Timestamp value)

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LogBucket.Builder

mergeFrom(LogBucket other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public LogBucket.Builder mergeUpdateTime(Timestamp value)

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LogBucket.Builder

removeIndexConfigs(int index)

public LogBucket.Builder removeIndexConfigs(int index)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameter
Name Description
index int
Returns
Type Description
LogBucket.Builder

setAnalyticsEnabled(boolean value)

public LogBucket.Builder setAnalyticsEnabled(boolean value)

Whether log analytics is enabled for this bucket.

Once enabled, log analytics features cannot be disabled.

bool analytics_enabled = 14;

Parameter
Name Description
value boolean

The analyticsEnabled to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setCmekSettings(CmekSettings value)

public LogBucket.Builder setCmekSettings(CmekSettings value)

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Parameter
Name Description
value CmekSettings
Returns
Type Description
LogBucket.Builder

setCmekSettings(CmekSettings.Builder builderForValue)

public LogBucket.Builder setCmekSettings(CmekSettings.Builder builderForValue)

The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.

.google.logging.v2.CmekSettings cmek_settings = 19;

Parameter
Name Description
builderForValue CmekSettings.Builder
Returns
Type Description
LogBucket.Builder

setCreateTime(Timestamp value)

public LogBucket.Builder setCreateTime(Timestamp value)

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LogBucket.Builder

setCreateTime(Timestamp.Builder builderForValue)

public LogBucket.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LogBucket.Builder

setDescription(String value)

public LogBucket.Builder setDescription(String value)

Describes this bucket.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public LogBucket.Builder setDescriptionBytes(ByteString value)

Describes this bucket.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setIndexConfigs(int index, IndexConfig value)

public LogBucket.Builder setIndexConfigs(int index, IndexConfig value)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameters
Name Description
index int
value IndexConfig
Returns
Type Description
LogBucket.Builder

setIndexConfigs(int index, IndexConfig.Builder builderForValue)

public LogBucket.Builder setIndexConfigs(int index, IndexConfig.Builder builderForValue)

A list of indexed fields and related configuration data.

repeated .google.logging.v2.IndexConfig index_configs = 17;

Parameters
Name Description
index int
builderForValue IndexConfig.Builder
Returns
Type Description
LogBucket.Builder

setLifecycleState(LifecycleState value)

public LogBucket.Builder setLifecycleState(LifecycleState value)

Output only. The bucket lifecycle state.

.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value LifecycleState

The lifecycleState to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setLifecycleStateValue(int value)

public LogBucket.Builder setLifecycleStateValue(int value)

Output only. The bucket lifecycle state.

.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setLocked(boolean value)

public LogBucket.Builder setLocked(boolean value)

Whether the bucket is locked.

The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty.

bool locked = 9;

Parameter
Name Description
value boolean

The locked to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setName(String value)

public LogBucket.Builder setName(String value)

Output only. The resource name of the bucket.

For example:

projects/my-project/locations/global/buckets/my-bucket

For a list of supported locations, see Supported Regions

For the location of global it is unspecified where log entries are actually stored.

After a bucket has been created, the location cannot be changed.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LogBucket.Builder setNameBytes(ByteString value)

Output only. The resource name of the bucket.

For example:

projects/my-project/locations/global/buckets/my-bucket

For a list of supported locations, see Supported Regions

For the location of global it is unspecified where log entries are actually stored.

After a bucket has been created, the location cannot be changed.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

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

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

setRestrictedFields(int index, String value)

public LogBucket.Builder setRestrictedFields(int index, String value)

Log entry field paths that are denied access in this bucket.

The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.

Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)

repeated string restricted_fields = 15;

Parameters
Name Description
index int

The index to set the value at.

value String

The restrictedFields to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setRetentionDays(int value)

public LogBucket.Builder setRetentionDays(int value)

Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.

int32 retention_days = 11;

Parameter
Name Description
value int

The retentionDays to set.

Returns
Type Description
LogBucket.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public LogBucket.Builder setUpdateTime(Timestamp value)

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LogBucket.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public LogBucket.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The last update timestamp of the bucket.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LogBucket.Builder