Class LogExclusion (3.16.2)

public final class LogExclusion extends GeneratedMessageV3 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 Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISABLED_FIELD_NUMBER

public static final int DISABLED_FIELD_NUMBER
Field Value
TypeDescription
int

FILTER_FIELD_NUMBER

public static final int FILTER_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LogExclusion getDefaultInstance()
Returns
TypeDescription
LogExclusion

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static LogExclusion.Builder newBuilder()
Returns
TypeDescription
LogExclusion.Builder

newBuilder(LogExclusion prototype)

public static LogExclusion.Builder newBuilder(LogExclusion prototype)
Parameter
NameDescription
prototypeLogExclusion
Returns
TypeDescription
LogExclusion.Builder

parseDelimitedFrom(InputStream input)

public static LogExclusion parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static LogExclusion parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LogExclusion parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LogExclusion parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static LogExclusion parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static LogExclusion parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LogExclusion parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogExclusion
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<LogExclusion> parser()
Returns
TypeDescription
Parser<LogExclusion>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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.

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.

getParserForType()

public Parser<LogExclusion> getParserForType()
Returns
TypeDescription
Parser<LogExclusion>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public LogExclusion.Builder newBuilderForType()
Returns
TypeDescription
LogExclusion.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LogExclusion.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
LogExclusion.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public LogExclusion.Builder toBuilder()
Returns
TypeDescription
LogExclusion.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException