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
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SegmentRollingPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder subBuilder = null;
if (sizePolicy_ != null) {
subBuilder = sizePolicy_.toBuilder();
}
sizePolicy_ = input.readMessage(org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sizePolicy_);
sizePolicy_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder subBuilder = null;
if (timePolicy_ != null) {
subBuilder = timePolicy_.toBuilder();
}
timePolicy_ = input.readMessage(org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timePolicy_);
timePolicy_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_descriptor;
}
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;
*/
public boolean hasSizePolicy() {
return sizePolicy_ != null;
}
/**
* .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
*/
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;
*/
public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicyOrBuilder getSizePolicyOrBuilder() {
return getSizePolicy();
}
public static final int TIME_POLICY_FIELD_NUMBER = 2;
private org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy timePolicy_;
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
public boolean hasTimePolicy() {
return timePolicy_ != null;
}
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
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;
*/
public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicyOrBuilder getTimePolicyOrBuilder() {
return getTimePolicy();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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());
}
unknownFields.writeTo(output);
}
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 += unknownFields.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;
boolean result = true;
result = result && (hasSizePolicy() == other.hasSizePolicy());
if (hasSizePolicy()) {
result = result && getSizePolicy()
.equals(other.getSizePolicy());
}
result = result && (hasTimePolicy() == other.hasTimePolicy());
if (hasTimePolicy()) {
result = result && getTimePolicy()
.equals(other.getTimePolicy());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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) + unknownFields.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);
}
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);
}
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;
}
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() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (sizePolicyBuilder_ == null) {
sizePolicy_ = null;
} else {
sizePolicy_ = null;
sizePolicyBuilder_ = null;
}
if (timePolicyBuilder_ == null) {
timePolicy_ = null;
} else {
timePolicy_ = null;
timePolicyBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SegmentRollingPolicy_descriptor;
}
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance();
}
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy build() {
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy buildPartial() {
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy result = new org.apache.bookkeeper.stream.proto.SegmentRollingPolicy(this);
if (sizePolicyBuilder_ == null) {
result.sizePolicy_ = sizePolicy_;
} else {
result.sizePolicy_ = sizePolicyBuilder_.build();
}
if (timePolicyBuilder_ == null) {
result.timePolicy_ = timePolicy_;
} else {
result.timePolicy_ = timePolicyBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.bookkeeper.stream.proto.SegmentRollingPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy sizePolicy_ = null;
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;
*/
public boolean hasSizePolicy() {
return sizePolicyBuilder_ != null || sizePolicy_ != null;
}
/**
* .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
*/
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;
onChanged();
} else {
sizePolicyBuilder_.setMessage(value);
}
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();
onChanged();
} else {
sizePolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
*/
public Builder mergeSizePolicy(org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy value) {
if (sizePolicyBuilder_ == null) {
if (sizePolicy_ != null) {
sizePolicy_ =
org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.newBuilder(sizePolicy_).mergeFrom(value).buildPartial();
} else {
sizePolicy_ = value;
}
onChanged();
} else {
sizePolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
* .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
*/
public Builder clearSizePolicy() {
if (sizePolicyBuilder_ == null) {
sizePolicy_ = null;
onChanged();
} else {
sizePolicy_ = null;
sizePolicyBuilder_ = null;
}
return this;
}
/**
* .bookkeeper.proto.stream.SizeBasedSegmentRollingPolicy size_policy = 1;
*/
public org.apache.bookkeeper.stream.proto.SizeBasedSegmentRollingPolicy.Builder getSizePolicyBuilder() {
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_ = null;
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;
*/
public boolean hasTimePolicy() {
return timePolicyBuilder_ != null || timePolicy_ != null;
}
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
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;
onChanged();
} else {
timePolicyBuilder_.setMessage(value);
}
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();
onChanged();
} else {
timePolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
public Builder mergeTimePolicy(org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy value) {
if (timePolicyBuilder_ == null) {
if (timePolicy_ != null) {
timePolicy_ =
org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.newBuilder(timePolicy_).mergeFrom(value).buildPartial();
} else {
timePolicy_ = value;
}
onChanged();
} else {
timePolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
public Builder clearTimePolicy() {
if (timePolicyBuilder_ == null) {
timePolicy_ = null;
onChanged();
} else {
timePolicy_ = null;
timePolicyBuilder_ = null;
}
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedSegmentRollingPolicy time_policy = 2;
*/
public org.apache.bookkeeper.stream.proto.TimeBasedSegmentRollingPolicy.Builder getTimePolicyBuilder() {
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_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
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() {
public SegmentRollingPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SegmentRollingPolicy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy