Class LogBucket (3.8.0)

public final class LogBucket extends GeneratedMessageV3 implements LogBucketOrBuilder

Describes a repository in which log entries are stored.

Protobuf type google.logging.v2.LogBucket

Implements

LogBucketOrBuilder

Static Fields

CMEK_SETTINGS_FIELD_NUMBER

public static final int CMEK_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

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

LIFECYCLE_STATE_FIELD_NUMBER

public static final int LIFECYCLE_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

LOCKED_FIELD_NUMBER

public static final int LOCKED_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

RESTRICTED_FIELDS_FIELD_NUMBER

public static final int RESTRICTED_FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

RETENTION_DAYS_FIELD_NUMBER

public static final int RETENTION_DAYS_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 LogBucket getDefaultInstance()
Returns
TypeDescription
LogBucket

getDescriptor()

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

newBuilder()

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

newBuilder(LogBucket prototype)

public static LogBucket.Builder newBuilder(LogBucket prototype)
Parameter
NameDescription
prototypeLogBucket
Returns
TypeDescription
LogBucket.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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

The cmekSettings.

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

The createTime.

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

getDefaultInstanceForType()

public LogBucket getDefaultInstanceForType()
Returns
TypeDescription
LogBucket

getDescription()

public String getDescription()

Describes this bucket.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Describes this bucket.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getLifecycleState()

public LifecycleState getLifecycleState()

Output only. The bucket lifecycle state.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParserForType()

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

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
NameDescription
indexint

The index of the element to return.

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

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The retentionDays.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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

The updateTime.

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
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 LogBucket.Builder newBuilderForType()
Returns
TypeDescription
LogBucket.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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