// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/logging/v2/logging_config.proto

package com.google.logging.v2;

/**
 * <pre>
 * Describes a repository of logs.
 * </pre>
 *
 * Protobuf type {@code google.logging.v2.LogBucket}
 */
public  final class LogBucket extends
    com.google.protobuf.GeneratedMessageLite<
        LogBucket, LogBucket.Builder> implements
    // @@protoc_insertion_point(message_implements:google.logging.v2.LogBucket)
    LogBucketOrBuilder {
  private LogBucket() {
    name_ = "";
    description_ = "";
  }
  public static final int NAME_FIELD_NUMBER = 1;
  private java.lang.String name_;
  /**
   * <pre>
   * The resource name of the bucket.
   * For example:
   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
   * supported locations are:
   *   "global"
   * For the location of `global` it is unspecified where logs are actually
   * stored.
   * Once a bucket has been created, the location can not be changed.
   * </pre>
   *
   * <code>string name = 1;</code>
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    return name_;
  }
  /**
   * <pre>
   * The resource name of the bucket.
   * For example:
   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
   * supported locations are:
   *   "global"
   * For the location of `global` it is unspecified where logs are actually
   * stored.
   * Once a bucket has been created, the location can not be changed.
   * </pre>
   *
   * <code>string name = 1;</code>
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getNameBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(name_);
  }
  /**
   * <pre>
   * The resource name of the bucket.
   * For example:
   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
   * supported locations are:
   *   "global"
   * For the location of `global` it is unspecified where logs are actually
   * stored.
   * Once a bucket has been created, the location can not be changed.
   * </pre>
   *
   * <code>string name = 1;</code>
   * @param value The name to set.
   */
  private void setName(
      java.lang.String value) {
    value.getClass();
  
    name_ = value;
  }
  /**
   * <pre>
   * The resource name of the bucket.
   * For example:
   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
   * supported locations are:
   *   "global"
   * For the location of `global` it is unspecified where logs are actually
   * stored.
   * Once a bucket has been created, the location can not be changed.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  private void clearName() {
    
    name_ = getDefaultInstance().getName();
  }
  /**
   * <pre>
   * The resource name of the bucket.
   * For example:
   * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
   * supported locations are:
   *   "global"
   * For the location of `global` it is unspecified where logs are actually
   * stored.
   * Once a bucket has been created, the location can not be changed.
   * </pre>
   *
   * <code>string name = 1;</code>
   * @param value The bytes for name to set.
   */
  private void setNameBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    name_ = value.toStringUtf8();
    
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 3;
  private java.lang.String description_;
  /**
   * <pre>
   * Describes this bucket.
   * </pre>
   *
   * <code>string description = 3;</code>
   * @return The description.
   */
  @java.lang.Override
  public java.lang.String getDescription() {
    return description_;
  }
  /**
   * <pre>
   * Describes this bucket.
   * </pre>
   *
   * <code>string description = 3;</code>
   * @return The bytes for description.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDescriptionBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(description_);
  }
  /**
   * <pre>
   * Describes this bucket.
   * </pre>
   *
   * <code>string description = 3;</code>
   * @param value The description to set.
   */
  private void setDescription(
      java.lang.String value) {
    value.getClass();
  
    description_ = value;
  }
  /**
   * <pre>
   * Describes this bucket.
   * </pre>
   *
   * <code>string description = 3;</code>
   */
  private void clearDescription() {
    
    description_ = getDefaultInstance().getDescription();
  }
  /**
   * <pre>
   * Describes this bucket.
   * </pre>
   *
   * <code>string description = 3;</code>
   * @param value The bytes for description to set.
   */
  private void setDescriptionBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    description_ = value.toStringUtf8();
    
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp createTime_;
  /**
   * <pre>
   * Output only. The creation timestamp of the bucket. This is not set for any of the
   * default buckets.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   * <pre>
   * Output only. The creation timestamp of the bucket. This is not set for any of the
   * default buckets.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   * <pre>
   * Output only. The creation timestamp of the bucket. This is not set for any of the
   * default buckets.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  private void setCreateTime(com.google.protobuf.Timestamp value) {
    value.getClass();
  createTime_ = value;
    
    }
  /**
   * <pre>
   * Output only. The creation timestamp of the bucket. This is not set for any of the
   * default buckets.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeCreateTime(com.google.protobuf.Timestamp value) {
    value.getClass();
  if (createTime_ != null &&
        createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
      createTime_ =
        com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
    } else {
      createTime_ = value;
    }
    
  }
  /**
   * <pre>
   * Output only. The creation timestamp of the bucket. This is not set for any of the
   * default buckets.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  private void clearCreateTime() {  createTime_ = null;
    
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   * <pre>
   * Output only. The last update timestamp of the bucket.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   * <pre>
   * Output only. The last update timestamp of the bucket.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   * <pre>
   * Output only. The last update timestamp of the bucket.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  private void setUpdateTime(com.google.protobuf.Timestamp value) {
    value.getClass();
  updateTime_ = value;
    
    }
  /**
   * <pre>
   * Output only. The last update timestamp of the bucket.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeUpdateTime(com.google.protobuf.Timestamp value) {
    value.getClass();
  if (updateTime_ != null &&
        updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
      updateTime_ =
        com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
    } else {
      updateTime_ = value;
    }
    
  }
  /**
   * <pre>
   * Output only. The last update timestamp of the bucket.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  private void clearUpdateTime() {  updateTime_ = null;
    
  }

  public static final int RETENTION_DAYS_FIELD_NUMBER = 11;
  private int retentionDays_;
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int32 retention_days = 11;</code>
   * @return The retentionDays.
   */
  @java.lang.Override
  public int getRetentionDays() {
    return retentionDays_;
  }
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int32 retention_days = 11;</code>
   * @param value The retentionDays to set.
   */
  private void setRetentionDays(int value) {
    
    retentionDays_ = value;
  }
  /**
   * <pre>
   * 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.
   * </pre>
   *
   * <code>int32 retention_days = 11;</code>
   */
  private void clearRetentionDays() {
    
    retentionDays_ = 0;
  }

  public static final int LOCKED_FIELD_NUMBER = 9;
  private boolean locked_;
  /**
   * <pre>
   * Whether the bucket has been locked.
   * The retention period on a locked bucket may not be changed.
   * Locked buckets may only be deleted if they are empty.
   * </pre>
   *
   * <code>bool locked = 9;</code>
   * @return The locked.
   */
  @java.lang.Override
  public boolean getLocked() {
    return locked_;
  }
  /**
   * <pre>
   * Whether the bucket has been locked.
   * The retention period on a locked bucket may not be changed.
   * Locked buckets may only be deleted if they are empty.
   * </pre>
   *
   * <code>bool locked = 9;</code>
   * @param value The locked to set.
   */
  private void setLocked(boolean value) {
    
    locked_ = value;
  }
  /**
   * <pre>
   * Whether the bucket has been locked.
   * The retention period on a locked bucket may not be changed.
   * Locked buckets may only be deleted if they are empty.
   * </pre>
   *
   * <code>bool locked = 9;</code>
   */
  private void clearLocked() {
    
    locked_ = false;
  }

  public static final int LIFECYCLE_STATE_FIELD_NUMBER = 12;
  private int lifecycleState_;
  /**
   * <pre>
   * Output only. The bucket lifecycle state.
   * </pre>
   *
   * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The enum numeric value on the wire for lifecycleState.
   */
  @java.lang.Override
  public int getLifecycleStateValue() {
    return lifecycleState_;
  }
  /**
   * <pre>
   * Output only. The bucket lifecycle state.
   * </pre>
   *
   * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The lifecycleState.
   */
  @java.lang.Override
  public com.google.logging.v2.LifecycleState getLifecycleState() {
    com.google.logging.v2.LifecycleState result = com.google.logging.v2.LifecycleState.forNumber(lifecycleState_);
    return result == null ? com.google.logging.v2.LifecycleState.UNRECOGNIZED : result;
  }
  /**
   * <pre>
   * Output only. The bucket lifecycle state.
   * </pre>
   *
   * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @param value The enum numeric value on the wire for lifecycleState to set.
   */
  private void setLifecycleStateValue(int value) {
      lifecycleState_ = value;
  }
  /**
   * <pre>
   * Output only. The bucket lifecycle state.
   * </pre>
   *
   * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @param value The lifecycleState to set.
   */
  private void setLifecycleState(com.google.logging.v2.LifecycleState value) {
    lifecycleState_ = value.getNumber();
    
  }
  /**
   * <pre>
   * Output only. The bucket lifecycle state.
   * </pre>
   *
   * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   */
  private void clearLifecycleState() {
    
    lifecycleState_ = 0;
  }

  public static com.google.logging.v2.LogBucket parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.LogBucket parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.LogBucket parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.logging.v2.LogBucket parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.LogBucket parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.LogBucket parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(com.google.logging.v2.LogBucket prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * <pre>
   * Describes a repository of logs.
   * </pre>
   *
   * Protobuf type {@code google.logging.v2.LogBucket}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.google.logging.v2.LogBucket, Builder> implements
      // @@protoc_insertion_point(builder_implements:google.logging.v2.LogBucket)
      com.google.logging.v2.LogBucketOrBuilder {
    // Construct using com.google.logging.v2.LogBucket.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <pre>
     * The resource name of the bucket.
     * For example:
     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
     * supported locations are:
     *   "global"
     * For the location of `global` it is unspecified where logs are actually
     * stored.
     * Once a bucket has been created, the location can not be changed.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The name.
     */
    @java.lang.Override
    public java.lang.String getName() {
      return instance.getName();
    }
    /**
     * <pre>
     * The resource name of the bucket.
     * For example:
     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
     * supported locations are:
     *   "global"
     * For the location of `global` it is unspecified where logs are actually
     * stored.
     * Once a bucket has been created, the location can not be changed.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The bytes for name.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getNameBytes() {
      return instance.getNameBytes();
    }
    /**
     * <pre>
     * The resource name of the bucket.
     * For example:
     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
     * supported locations are:
     *   "global"
     * For the location of `global` it is unspecified where logs are actually
     * stored.
     * Once a bucket has been created, the location can not be changed.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(
        java.lang.String value) {
      copyOnWrite();
      instance.setName(value);
      return this;
    }
    /**
     * <pre>
     * The resource name of the bucket.
     * For example:
     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
     * supported locations are:
     *   "global"
     * For the location of `global` it is unspecified where logs are actually
     * stored.
     * Once a bucket has been created, the location can not be changed.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearName() {
      copyOnWrite();
      instance.clearName();
      return this;
    }
    /**
     * <pre>
     * The resource name of the bucket.
     * For example:
     * "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
     * supported locations are:
     *   "global"
     * For the location of `global` it is unspecified where logs are actually
     * stored.
     * Once a bucket has been created, the location can not be changed.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setNameBytes(value);
      return this;
    }

    /**
     * <pre>
     * Describes this bucket.
     * </pre>
     *
     * <code>string description = 3;</code>
     * @return The description.
     */
    @java.lang.Override
    public java.lang.String getDescription() {
      return instance.getDescription();
    }
    /**
     * <pre>
     * Describes this bucket.
     * </pre>
     *
     * <code>string description = 3;</code>
     * @return The bytes for description.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getDescriptionBytes() {
      return instance.getDescriptionBytes();
    }
    /**
     * <pre>
     * Describes this bucket.
     * </pre>
     *
     * <code>string description = 3;</code>
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(
        java.lang.String value) {
      copyOnWrite();
      instance.setDescription(value);
      return this;
    }
    /**
     * <pre>
     * Describes this bucket.
     * </pre>
     *
     * <code>string description = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      copyOnWrite();
      instance.clearDescription();
      return this;
    }
    /**
     * <pre>
     * Describes this bucket.
     * </pre>
     *
     * <code>string description = 3;</code>
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setDescriptionBytes(value);
      return this;
    }

    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    @java.lang.Override
    public boolean hasCreateTime() {
      return instance.hasCreateTime();
    }
    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    @java.lang.Override
    public com.google.protobuf.Timestamp getCreateTime() {
      return instance.getCreateTime();
    }
    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      copyOnWrite();
      instance.setCreateTime(value);
      return this;
      }
    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder setCreateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      copyOnWrite();
      instance.setCreateTime(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      copyOnWrite();
      instance.mergeCreateTime(value);
      return this;
    }
    /**
     * <pre>
     * Output only. The creation timestamp of the bucket. This is not set for any of the
     * default buckets.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder clearCreateTime() {  copyOnWrite();
      instance.clearCreateTime();
      return this;
    }

    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    @java.lang.Override
    public boolean hasUpdateTime() {
      return instance.hasUpdateTime();
    }
    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    @java.lang.Override
    public com.google.protobuf.Timestamp getUpdateTime() {
      return instance.getUpdateTime();
    }
    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      copyOnWrite();
      instance.setUpdateTime(value);
      return this;
      }
    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder setUpdateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      copyOnWrite();
      instance.setUpdateTime(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      copyOnWrite();
      instance.mergeUpdateTime(value);
      return this;
    }
    /**
     * <pre>
     * Output only. The last update timestamp of the bucket.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    public Builder clearUpdateTime() {  copyOnWrite();
      instance.clearUpdateTime();
      return this;
    }

    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int32 retention_days = 11;</code>
     * @return The retentionDays.
     */
    @java.lang.Override
    public int getRetentionDays() {
      return instance.getRetentionDays();
    }
    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int32 retention_days = 11;</code>
     * @param value The retentionDays to set.
     * @return This builder for chaining.
     */
    public Builder setRetentionDays(int value) {
      copyOnWrite();
      instance.setRetentionDays(value);
      return this;
    }
    /**
     * <pre>
     * 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.
     * </pre>
     *
     * <code>int32 retention_days = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearRetentionDays() {
      copyOnWrite();
      instance.clearRetentionDays();
      return this;
    }

    /**
     * <pre>
     * Whether the bucket has been locked.
     * The retention period on a locked bucket may not be changed.
     * Locked buckets may only be deleted if they are empty.
     * </pre>
     *
     * <code>bool locked = 9;</code>
     * @return The locked.
     */
    @java.lang.Override
    public boolean getLocked() {
      return instance.getLocked();
    }
    /**
     * <pre>
     * Whether the bucket has been locked.
     * The retention period on a locked bucket may not be changed.
     * Locked buckets may only be deleted if they are empty.
     * </pre>
     *
     * <code>bool locked = 9;</code>
     * @param value The locked to set.
     * @return This builder for chaining.
     */
    public Builder setLocked(boolean value) {
      copyOnWrite();
      instance.setLocked(value);
      return this;
    }
    /**
     * <pre>
     * Whether the bucket has been locked.
     * The retention period on a locked bucket may not be changed.
     * Locked buckets may only be deleted if they are empty.
     * </pre>
     *
     * <code>bool locked = 9;</code>
     * @return This builder for chaining.
     */
    public Builder clearLocked() {
      copyOnWrite();
      instance.clearLocked();
      return this;
    }

    /**
     * <pre>
     * Output only. The bucket lifecycle state.
     * </pre>
     *
     * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The enum numeric value on the wire for lifecycleState.
     */
    @java.lang.Override
    public int getLifecycleStateValue() {
      return instance.getLifecycleStateValue();
    }
    /**
     * <pre>
     * Output only. The bucket lifecycle state.
     * </pre>
     *
     * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The lifecycleState to set.
     * @return This builder for chaining.
     */
    public Builder setLifecycleStateValue(int value) {
      copyOnWrite();
      instance.setLifecycleStateValue(value);
      return this;
    }
    /**
     * <pre>
     * Output only. The bucket lifecycle state.
     * </pre>
     *
     * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The lifecycleState.
     */
    @java.lang.Override
    public com.google.logging.v2.LifecycleState getLifecycleState() {
      return instance.getLifecycleState();
    }
    /**
     * <pre>
     * Output only. The bucket lifecycle state.
     * </pre>
     *
     * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The enum numeric value on the wire for lifecycleState to set.
     * @return This builder for chaining.
     */
    public Builder setLifecycleState(com.google.logging.v2.LifecycleState value) {
      copyOnWrite();
      instance.setLifecycleState(value);
      return this;
    }
    /**
     * <pre>
     * Output only. The bucket lifecycle state.
     * </pre>
     *
     * <code>.google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return This builder for chaining.
     */
    public Builder clearLifecycleState() {
      copyOnWrite();
      instance.clearLifecycleState();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.logging.v2.LogBucket)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new com.google.logging.v2.LogBucket();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "name_",
            "description_",
            "createTime_",
            "updateTime_",
            "locked_",
            "retentionDays_",
            "lifecycleState_",
          };
          java.lang.String info =
              "\u0000\u0007\u0000\u0000\u0001\f\u0007\u0000\u0000\u0000\u0001\u0208\u0003\u0208" +
              "\u0004\t\u0005\t\t\u0007\u000b\u0004\f\f";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<com.google.logging.v2.LogBucket> parser = PARSER;
        if (parser == null) {
          synchronized (com.google.logging.v2.LogBucket.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<com.google.logging.v2.LogBucket>(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket)
  private static final com.google.logging.v2.LogBucket DEFAULT_INSTANCE;
  static {
    LogBucket defaultInstance = new LogBucket();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      LogBucket.class, defaultInstance);
  }

  public static com.google.logging.v2.LogBucket getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser<LogBucket> PARSER;

  public static com.google.protobuf.Parser<LogBucket> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

