Class LogExclusion.Builder (3.8.0)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LogExclusion.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
LogExclusion.Builder
Overrides

build()

public LogExclusion build()
Returns
TypeDescription
LogExclusion

buildPartial()

public LogExclusion buildPartial()
Returns
TypeDescription
LogExclusion

clear()

public LogExclusion.Builder clear()
Returns
TypeDescription
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
TypeDescription
LogExclusion.Builder

clearDescription()

public LogExclusion.Builder clearDescription()

Optional. A description of this exclusion.

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

Returns
TypeDescription
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
TypeDescription
LogExclusion.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public LogExclusion.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
LogExclusion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public LogExclusion.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
LogExclusion.Builder

clone()

public LogExclusion.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public LogExclusion getDefaultInstanceForType()
Returns
TypeDescription
LogExclusion

getDescription()

public String getDescription()

Optional. A description of this exclusion.

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

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of this exclusion.

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

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
LogExclusion.Builder

mergeFrom(LogExclusion other)

public LogExclusion.Builder mergeFrom(LogExclusion other)
Parameter
NameDescription
otherLogExclusion
Returns
TypeDescription
LogExclusion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LogExclusion.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public LogExclusion.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
LogExclusion.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LogExclusion.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The disabled to set.

Returns
TypeDescription
LogExclusion.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public LogExclusion.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The filter to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for filter to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
LogExclusion.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final LogExclusion.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
LogExclusion.Builder