All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.bookkeeper.stream.proto.SegmentRollingPolicy Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: stream.proto

package org.apache.bookkeeper.stream.proto;

/**
 * Protobuf type {@code bookkeeper.proto.stream.SegmentRollingPolicy}
 */
public final class SegmentRollingPolicy extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:bookkeeper.proto.stream.SegmentRollingPolicy)
    SegmentRollingPolicyOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SegmentRollingPolicy.newBuilder() to construct.
  private SegmentRollingPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private SegmentRollingPolicy() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new SegmentRollingPolicy();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.class, org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder.class);
  }

  public static final int SIZE_POLICY_FIELD_NUMBER = 1;
  private org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy sizePolicy_;
  /**
   * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
   * @return Whether the sizePolicy field is set.
   */
  @java.lang.Override
  public boolean hasSizePolicy() {
    return sizePolicy_ != null;
  }
  /**
   * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
   * @return The sizePolicy.
   */
  @java.lang.Override
  public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy getSizePolicy() {
    return sizePolicy_ == null ? org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.getDefaultInstance() : sizePolicy_;
  }
  /**
   * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
   */
  @java.lang.Override
  public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder getSizePolicyOrBuilder() {
    return sizePolicy_ == null ? org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.getDefaultInstance() : sizePolicy_;
  }

  public static final int TIME_POLICY_FIELD_NUMBER = 2;
  private org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy timePolicy_;
  /**
   * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
   * @return Whether the timePolicy field is set.
   */
  @java.lang.Override
  public boolean hasTimePolicy() {
    return timePolicy_ != null;
  }
  /**
   * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
   * @return The timePolicy.
   */
  @java.lang.Override
  public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy getTimePolicy() {
    return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.getDefaultInstance() : timePolicy_;
  }
  /**
   * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
   */
  @java.lang.Override
  public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder getTimePolicyOrBuilder() {
    return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.getDefaultInstance() : timePolicy_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (sizePolicy_ != null) {
      output.writeMessage(1, getSizePolicy());
    }
    if (timePolicy_ != null) {
      output.writeMessage(2, getTimePolicy());
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (sizePolicy_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getSizePolicy());
    }
    if (timePolicy_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getTimePolicy());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.apache.bookkeeper.stream.proto.SegmentRollingPolicy)) {
      return super.equals(obj);
    }
    org.apache.bookkeeper.stream.proto.SegmentRollingPolicy other = (org.apache.bookkeeper.stream.proto.SegmentRollingPolicy) obj;

    if (hasSizePolicy() != other.hasSizePolicy()) return false;
    if (hasSizePolicy()) {
      if (!getSizePolicy()
          .equals(other.getSizePolicy())) return false;
    }
    if (hasTimePolicy() != other.hasTimePolicy()) return false;
    if (hasTimePolicy()) {
      if (!getTimePolicy()
          .equals(other.getTimePolicy())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasSizePolicy()) {
      hash = (37 * hash) + SIZE_POLICY_FIELD_NUMBER;
      hash = (53 * hash) + getSizePolicy().hashCode();
    }
    if (hasTimePolicy()) {
      hash = (37 * hash) + TIME_POLICY_FIELD_NUMBER;
      hash = (53 * hash) + getTimePolicy().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.apache.bookkeeper.stream.proto.SegmentRollingPolicy prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code bookkeeper.proto.stream.SegmentRollingPolicy}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:bookkeeper.proto.stream.SegmentRollingPolicy)
      org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.class, org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder.class);
    }

    // Construct using org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      sizePolicy_ = null;
      if (sizePolicyBuilder_ != null) {
        sizePolicyBuilder_.dispose();
        sizePolicyBuilder_ = null;
      }
      timePolicy_ = null;
      if (timePolicyBuilder_ != null) {
        timePolicyBuilder_.dispose();
        timePolicyBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_descriptor;
    }

    @java.lang.Override
    public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getDefaultInstanceForType() {
      return org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance();
    }

    @java.lang.Override
    public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy build() {
      org.apache.bookkeeper.stream.proto.SegmentRollingPolicy result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy buildPartial() {
      org.apache.bookkeeper.stream.proto.SegmentRollingPolicy result = new org.apache.bookkeeper.stream.proto.SegmentRollingPolicy(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(org.apache.bookkeeper.stream.proto.SegmentRollingPolicy result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.sizePolicy_ = sizePolicyBuilder_ == null
            ? sizePolicy_
            : sizePolicyBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.timePolicy_ = timePolicyBuilder_ == null
            ? timePolicy_
            : timePolicyBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.apache.bookkeeper.stream.proto.SegmentRollingPolicy) {
        return mergeFrom((org.apache.bookkeeper.stream.proto.SegmentRollingPolicy)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.apache.bookkeeper.stream.proto.SegmentRollingPolicy other) {
      if (other == org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance()) return this;
      if (other.hasSizePolicy()) {
        mergeSizePolicy(other.getSizePolicy());
      }
      if (other.hasTimePolicy()) {
        mergeTimePolicy(other.getTimePolicy());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getSizePolicyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getTimePolicyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy sizePolicy_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder> sizePolicyBuilder_;
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     * @return Whether the sizePolicy field is set.
     */
    public boolean hasSizePolicy() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     * @return The sizePolicy.
     */
    public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy getSizePolicy() {
      if (sizePolicyBuilder_ == null) {
        return sizePolicy_ == null ? org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.getDefaultInstance() : sizePolicy_;
      } else {
        return sizePolicyBuilder_.getMessage();
      }
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public Builder setSizePolicy(org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy value) {
      if (sizePolicyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        sizePolicy_ = value;
      } else {
        sizePolicyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public Builder setSizePolicy(
        org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder builderForValue) {
      if (sizePolicyBuilder_ == null) {
        sizePolicy_ = builderForValue.build();
      } else {
        sizePolicyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public Builder mergeSizePolicy(org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy value) {
      if (sizePolicyBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          sizePolicy_ != null &&
          sizePolicy_ != org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.getDefaultInstance()) {
          getSizePolicyBuilder().mergeFrom(value);
        } else {
          sizePolicy_ = value;
        }
      } else {
        sizePolicyBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public Builder clearSizePolicy() {
      bitField0_ = (bitField0_ & ~0x00000001);
      sizePolicy_ = null;
      if (sizePolicyBuilder_ != null) {
        sizePolicyBuilder_.dispose();
        sizePolicyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder getSizePolicyBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getSizePolicyFieldBuilder().getBuilder();
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder getSizePolicyOrBuilder() {
      if (sizePolicyBuilder_ != null) {
        return sizePolicyBuilder_.getMessageOrBuilder();
      } else {
        return sizePolicy_ == null ?
            org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.getDefaultInstance() : sizePolicy_;
      }
    }
    /**
     * .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder> 
        getSizePolicyFieldBuilder() {
      if (sizePolicyBuilder_ == null) {
        sizePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder>(
                getSizePolicy(),
                getParentForChildren(),
                isClean());
        sizePolicy_ = null;
      }
      return sizePolicyBuilder_;
    }

    private org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy timePolicy_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder> timePolicyBuilder_;
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     * @return Whether the timePolicy field is set.
     */
    public boolean hasTimePolicy() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     * @return The timePolicy.
     */
    public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy getTimePolicy() {
      if (timePolicyBuilder_ == null) {
        return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.getDefaultInstance() : timePolicy_;
      } else {
        return timePolicyBuilder_.getMessage();
      }
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public Builder setTimePolicy(org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy value) {
      if (timePolicyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        timePolicy_ = value;
      } else {
        timePolicyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public Builder setTimePolicy(
        org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder builderForValue) {
      if (timePolicyBuilder_ == null) {
        timePolicy_ = builderForValue.build();
      } else {
        timePolicyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public Builder mergeTimePolicy(org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy value) {
      if (timePolicyBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          timePolicy_ != null &&
          timePolicy_ != org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.getDefaultInstance()) {
          getTimePolicyBuilder().mergeFrom(value);
        } else {
          timePolicy_ = value;
        }
      } else {
        timePolicyBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public Builder clearTimePolicy() {
      bitField0_ = (bitField0_ & ~0x00000002);
      timePolicy_ = null;
      if (timePolicyBuilder_ != null) {
        timePolicyBuilder_.dispose();
        timePolicyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder getTimePolicyBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getTimePolicyFieldBuilder().getBuilder();
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder getTimePolicyOrBuilder() {
      if (timePolicyBuilder_ != null) {
        return timePolicyBuilder_.getMessageOrBuilder();
      } else {
        return timePolicy_ == null ?
            org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.getDefaultInstance() : timePolicy_;
      }
    }
    /**
     * .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder> 
        getTimePolicyFieldBuilder() {
      if (timePolicyBuilder_ == null) {
        timePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder>(
                getTimePolicy(),
                getParentForChildren(),
                isClean());
        timePolicy_ = null;
      }
      return timePolicyBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:bookkeeper.proto.stream.SegmentRollingPolicy)
  }

  // @@protoc_insertion_point(class_scope:bookkeeper.proto.stream.SegmentRollingPolicy)
  private static final org.apache.bookkeeper.stream.proto.SegmentRollingPolicy DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.apache.bookkeeper.stream.proto.SegmentRollingPolicy();
  }

  public static org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public SegmentRollingPolicy parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy