Class LogBucket

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.logging.v2.LogBucket
All Implemented Interfaces:
LogBucketOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class LogBucket extends com.google.protobuf.GeneratedMessageV3 implements LogBucketOrBuilder
 Describes a repository in which log entries are stored.
 
Protobuf type google.logging.v2.LogBucket
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • RETENTION_DAYS_FIELD_NUMBER

      public static final int RETENTION_DAYS_FIELD_NUMBER
      See Also:
    • LOCKED_FIELD_NUMBER

      public static final int LOCKED_FIELD_NUMBER
      See Also:
    • LIFECYCLE_STATE_FIELD_NUMBER

      public static final int LIFECYCLE_STATE_FIELD_NUMBER
      See Also:
    • ANALYTICS_ENABLED_FIELD_NUMBER

      public static final int ANALYTICS_ENABLED_FIELD_NUMBER
      See Also:
    • RESTRICTED_FIELDS_FIELD_NUMBER

      public static final int RESTRICTED_FIELDS_FIELD_NUMBER
      See Also:
    • INDEX_CONFIGS_FIELD_NUMBER

      public static final int INDEX_CONFIGS_FIELD_NUMBER
      See Also:
    • CMEK_SETTINGS_FIELD_NUMBER

      public static final int CMEK_SETTINGS_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • 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](https://cloud.google.com/logging/docs/region-support)
      
       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];
      Specified by:
      getName in interface LogBucketOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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](https://cloud.google.com/logging/docs/region-support)
      
       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];
      Specified by:
      getNameBytes in interface LogBucketOrBuilder
      Returns:
      The bytes for name.
    • getDescription

      public String getDescription()
       Describes this bucket.
       
      string description = 3;
      Specified by:
      getDescription in interface LogBucketOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Describes this bucket.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface LogBucketOrBuilder
      Returns:
      The bytes for description.
    • 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];
      Specified by:
      hasCreateTime in interface LogBucketOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.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];
      Specified by:
      getCreateTime in interface LogBucketOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getCreateTimeOrBuilder in interface LogBucketOrBuilder
    • 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];
      Specified by:
      hasUpdateTime in interface LogBucketOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The last update timestamp of the bucket.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface LogBucketOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The last update timestamp of the bucket.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface LogBucketOrBuilder
    • 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;
      Specified by:
      getRetentionDays in interface LogBucketOrBuilder
      Returns:
      The retentionDays.
    • 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;
      Specified by:
      getLocked in interface LogBucketOrBuilder
      Returns:
      The locked.
    • getLifecycleStateValue

      public int getLifecycleStateValue()
       Output only. The bucket lifecycle state.
       
      .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLifecycleStateValue in interface LogBucketOrBuilder
      Returns:
      The enum numeric value on the wire for lifecycleState.
    • getLifecycleState

      public LifecycleState getLifecycleState()
       Output only. The bucket lifecycle state.
       
      .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLifecycleState in interface LogBucketOrBuilder
      Returns:
      The lifecycleState.
    • getAnalyticsEnabled

      public boolean getAnalyticsEnabled()
       Whether log analytics is enabled for this bucket.
      
       Once enabled, log analytics features cannot be disabled.
       
      bool analytics_enabled = 14;
      Specified by:
      getAnalyticsEnabled in interface LogBucketOrBuilder
      Returns:
      The analyticsEnabled.
    • getRestrictedFieldsList

      public com.google.protobuf.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;
      Specified by:
      getRestrictedFieldsList in interface LogBucketOrBuilder
      Returns:
      A list containing the restrictedFields.
    • 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;
      Specified by:
      getRestrictedFieldsCount in interface LogBucketOrBuilder
      Returns:
      The count of restrictedFields.
    • getRestrictedFields

      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;
      Specified by:
      getRestrictedFields in interface LogBucketOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The restrictedFields at the given index.
    • getRestrictedFieldsBytes

      public com.google.protobuf.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;
      Specified by:
      getRestrictedFieldsBytes in interface LogBucketOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the restrictedFields at the given index.
    • getIndexConfigsList

      public List<IndexConfig> getIndexConfigsList()
       A list of indexed fields and related configuration data.
       
      repeated .google.logging.v2.IndexConfig index_configs = 17;
      Specified by:
      getIndexConfigsList in interface LogBucketOrBuilder
    • getIndexConfigsOrBuilderList

      public List<? extends IndexConfigOrBuilder> getIndexConfigsOrBuilderList()
       A list of indexed fields and related configuration data.
       
      repeated .google.logging.v2.IndexConfig index_configs = 17;
      Specified by:
      getIndexConfigsOrBuilderList in interface LogBucketOrBuilder
    • getIndexConfigsCount

      public int getIndexConfigsCount()
       A list of indexed fields and related configuration data.
       
      repeated .google.logging.v2.IndexConfig index_configs = 17;
      Specified by:
      getIndexConfigsCount in interface LogBucketOrBuilder
    • getIndexConfigs

      public IndexConfig getIndexConfigs(int index)
       A list of indexed fields and related configuration data.
       
      repeated .google.logging.v2.IndexConfig index_configs = 17;
      Specified by:
      getIndexConfigs in interface LogBucketOrBuilder
    • getIndexConfigsOrBuilder

      public IndexConfigOrBuilder getIndexConfigsOrBuilder(int index)
       A list of indexed fields and related configuration data.
       
      repeated .google.logging.v2.IndexConfig index_configs = 17;
      Specified by:
      getIndexConfigsOrBuilder in interface LogBucketOrBuilder
    • 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;
      Specified by:
      hasCmekSettings in interface LogBucketOrBuilder
      Returns:
      Whether the cmekSettings field is set.
    • 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;
      Specified by:
      getCmekSettings in interface LogBucketOrBuilder
      Returns:
      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;
      Specified by:
      getCmekSettingsOrBuilder in interface LogBucketOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static LogBucket parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LogBucket parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LogBucket parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LogBucket parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LogBucket parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LogBucket parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LogBucket parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public LogBucket.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static LogBucket.Builder newBuilder()
    • newBuilder

      public static LogBucket.Builder newBuilder(LogBucket prototype)
    • toBuilder

      public LogBucket.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected LogBucket.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static LogBucket getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<LogBucket> parser()
    • getParserForType

      public com.google.protobuf.Parser<LogBucket> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public LogBucket getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder