Class LogExclusion.Builder (3.10.7)

public static final class LogExclusion.Builder extends GeneratedMessageV3.Builder<LogExclusion.Builder> implements LogExclusionOrBuilder

Specifies a set of log entries that are filtered out by a sink. If your Google Cloud resource receives a large volume of log entries, you can use exclusions to reduce your chargeable logs. Note that exclusions on organization-level and folder-level sinks don't apply to child resources. Note also that you cannot modify the _Required sink or exclude logs from it.

Protobuf type google.logging.v2.LogExclusion

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LogExclusion build()
Returns
Type Description
LogExclusion

buildPartial()

public LogExclusion buildPartial()
Returns
Type Description
LogExclusion

clear()

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

clearCreateTime()

public LogExclusion.Builder clearCreateTime()

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
LogExclusion.Builder

clearDescription()

public LogExclusion.Builder clearDescription()

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

clearDisabled()

public LogExclusion.Builder clearDisabled()

Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.

bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFilter()

public LogExclusion.Builder clearFilter()

Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

clearName()

public LogExclusion.Builder clearName()

Required. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

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

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUpdateTime()

public LogExclusion.Builder clearUpdateTime()

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
LogExclusion.Builder

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public LogExclusion getDefaultInstanceForType()
Returns
Type Description
LogExclusion

getDescription()

public String getDescription()

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisabled()

public boolean getDisabled()

Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.

bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disabled.

getFilter()

public String getFilter()

Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for filter.

getName()

public String getName()

Required. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

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

Returns
Type Description
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

.google.protobuf.Timestamp update_time = 6 [(.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 exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

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

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

.google.protobuf.Timestamp create_time = 5 [(.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 exclusion. This field may not be present for older exclusions.

.google.protobuf.Timestamp update_time = 6 [(.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

mergeCreateTime(Timestamp value)

public LogExclusion.Builder mergeCreateTime(Timestamp value)

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LogExclusion.Builder

mergeFrom(LogExclusion other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public LogExclusion.Builder mergeUpdateTime(Timestamp value)

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LogExclusion.Builder

setCreateTime(Timestamp value)

public LogExclusion.Builder setCreateTime(Timestamp value)

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LogExclusion.Builder

setCreateTime(Timestamp.Builder builderForValue)

public LogExclusion.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LogExclusion.Builder

setDescription(String value)

public LogExclusion.Builder setDescription(String value)

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public LogExclusion.Builder setDescriptionBytes(ByteString value)

Optional. A description of this exclusion.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setDisabled(boolean value)

public LogExclusion.Builder setDisabled(boolean value)

Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.

bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFilter(String value)

public LogExclusion.Builder setFilter(String value)

Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The filter to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public LogExclusion.Builder setFilterBytes(ByteString value)

Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)

string filter = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for filter to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setName(String value)

public LogExclusion.Builder setName(String value)

Required. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LogExclusion.Builder setNameBytes(ByteString value)

Required. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LogExclusion.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public LogExclusion.Builder setUpdateTime(Timestamp value)

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LogExclusion.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public LogExclusion.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LogExclusion.Builder