All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy}
*/
public final class SplitPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bookkeeper.proto.stream.SplitPolicy)
SplitPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use SplitPolicy.newBuilder() to construct.
private SplitPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SplitPolicy() {
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SplitPolicy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SplitPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SplitPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.SplitPolicy.class, org.apache.bookkeeper.stream.proto.SplitPolicy.Builder.class);
}
private int policyCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object policy_;
public enum PolicyCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
FIXED_RANGE_POLICY(2),
BANDWIDTH_POLICY(3),
POLICY_NOT_SET(0);
private final int value;
private PolicyCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PolicyCase valueOf(int value) {
return forNumber(value);
}
public static PolicyCase forNumber(int value) {
switch (value) {
case 2: return FIXED_RANGE_POLICY;
case 3: return BANDWIDTH_POLICY;
case 0: return POLICY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PolicyCase
getPolicyCase() {
return PolicyCase.forNumber(
policyCase_);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @return The type.
*/
@java.lang.Override public org.apache.bookkeeper.stream.proto.SplitPolicyType getType() {
org.apache.bookkeeper.stream.proto.SplitPolicyType result = org.apache.bookkeeper.stream.proto.SplitPolicyType.forNumber(type_);
return result == null ? org.apache.bookkeeper.stream.proto.SplitPolicyType.UNRECOGNIZED : result;
}
public static final int FIXED_RANGE_POLICY_FIELD_NUMBER = 2;
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
* @return Whether the fixedRangePolicy field is set.
*/
@java.lang.Override
public boolean hasFixedRangePolicy() {
return policyCase_ == 2;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
* @return The fixedRangePolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy getFixedRangePolicy() {
if (policyCase_ == 2) {
return (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicyOrBuilder getFixedRangePolicyOrBuilder() {
if (policyCase_ == 2) {
return (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
}
public static final int BANDWIDTH_POLICY_FIELD_NUMBER = 3;
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
* @return Whether the bandwidthPolicy field is set.
*/
@java.lang.Override
public boolean hasBandwidthPolicy() {
return policyCase_ == 3;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
* @return The bandwidthPolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy getBandwidthPolicy() {
if (policyCase_ == 3) {
return (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicyOrBuilder getBandwidthPolicyOrBuilder() {
if (policyCase_ == 3) {
return (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
}
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 (type_ != org.apache.bookkeeper.stream.proto.SplitPolicyType.FIXED.getNumber()) {
output.writeEnum(1, type_);
}
if (policyCase_ == 2) {
output.writeMessage(2, (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_);
}
if (policyCase_ == 3) {
output.writeMessage(3, (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != org.apache.bookkeeper.stream.proto.SplitPolicyType.FIXED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (policyCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_);
}
if (policyCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_);
}
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.SplitPolicy)) {
return super.equals(obj);
}
org.apache.bookkeeper.stream.proto.SplitPolicy other = (org.apache.bookkeeper.stream.proto.SplitPolicy) obj;
if (type_ != other.type_) return false;
if (!getPolicyCase().equals(other.getPolicyCase())) return false;
switch (policyCase_) {
case 2:
if (!getFixedRangePolicy()
.equals(other.getFixedRangePolicy())) return false;
break;
case 3:
if (!getBandwidthPolicy()
.equals(other.getBandwidthPolicy())) return false;
break;
case 0:
default:
}
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();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
switch (policyCase_) {
case 2:
hash = (37 * hash) + FIXED_RANGE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getFixedRangePolicy().hashCode();
break;
case 3:
hash = (37 * hash) + BANDWIDTH_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getBandwidthPolicy().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy 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.SplitPolicy 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.SplitPolicy 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.SplitPolicy 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.SplitPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:bookkeeper.proto.stream.SplitPolicy)
org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SplitPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_SplitPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.SplitPolicy.class, org.apache.bookkeeper.stream.proto.SplitPolicy.Builder.class);
}
// Construct using org.apache.bookkeeper.stream.proto.SplitPolicy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = 0;
if (fixedRangePolicyBuilder_ != null) {
fixedRangePolicyBuilder_.clear();
}
if (bandwidthPolicyBuilder_ != null) {
bandwidthPolicyBuilder_.clear();
}
policyCase_ = 0;
policy_ = 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_SplitPolicy_descriptor;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicy getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance();
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicy build() {
org.apache.bookkeeper.stream.proto.SplitPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicy buildPartial() {
org.apache.bookkeeper.stream.proto.SplitPolicy result = new org.apache.bookkeeper.stream.proto.SplitPolicy(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.apache.bookkeeper.stream.proto.SplitPolicy result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
}
private void buildPartialOneofs(org.apache.bookkeeper.stream.proto.SplitPolicy result) {
result.policyCase_ = policyCase_;
result.policy_ = this.policy_;
if (policyCase_ == 2 &&
fixedRangePolicyBuilder_ != null) {
result.policy_ = fixedRangePolicyBuilder_.build();
}
if (policyCase_ == 3 &&
bandwidthPolicyBuilder_ != null) {
result.policy_ = bandwidthPolicyBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.bookkeeper.stream.proto.SplitPolicy) {
return mergeFrom((org.apache.bookkeeper.stream.proto.SplitPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.bookkeeper.stream.proto.SplitPolicy other) {
if (other == org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
switch (other.getPolicyCase()) {
case FIXED_RANGE_POLICY: {
mergeFixedRangePolicy(other.getFixedRangePolicy());
break;
}
case BANDWIDTH_POLICY: {
mergeBandwidthPolicy(other.getBandwidthPolicy());
break;
}
case POLICY_NOT_SET: {
break;
}
}
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 8: {
type_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getFixedRangePolicyFieldBuilder().getBuilder(),
extensionRegistry);
policyCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getBandwidthPolicyFieldBuilder().getBuilder(),
extensionRegistry);
policyCase_ = 3;
break;
} // case 26
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 policyCase_ = 0;
private java.lang.Object policy_;
public PolicyCase
getPolicyCase() {
return PolicyCase.forNumber(
policyCase_);
}
public Builder clearPolicy() {
policyCase_ = 0;
policy_ = null;
onChanged();
return this;
}
private int bitField0_;
private int type_ = 0;
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @return The type.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicyType getType() {
org.apache.bookkeeper.stream.proto.SplitPolicyType result = org.apache.bookkeeper.stream.proto.SplitPolicyType.forNumber(type_);
return result == null ? org.apache.bookkeeper.stream.proto.SplitPolicyType.UNRECOGNIZED : result;
}
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(org.apache.bookkeeper.stream.proto.SplitPolicyType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicyType type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicyOrBuilder> fixedRangePolicyBuilder_;
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
* @return Whether the fixedRangePolicy field is set.
*/
@java.lang.Override
public boolean hasFixedRangePolicy() {
return policyCase_ == 2;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
* @return The fixedRangePolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy getFixedRangePolicy() {
if (fixedRangePolicyBuilder_ == null) {
if (policyCase_ == 2) {
return (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
} else {
if (policyCase_ == 2) {
return fixedRangePolicyBuilder_.getMessage();
}
return org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
}
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
public Builder setFixedRangePolicy(org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy value) {
if (fixedRangePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
onChanged();
} else {
fixedRangePolicyBuilder_.setMessage(value);
}
policyCase_ = 2;
return this;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
public Builder setFixedRangePolicy(
org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.Builder builderForValue) {
if (fixedRangePolicyBuilder_ == null) {
policy_ = builderForValue.build();
onChanged();
} else {
fixedRangePolicyBuilder_.setMessage(builderForValue.build());
}
policyCase_ = 2;
return this;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
public Builder mergeFixedRangePolicy(org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy value) {
if (fixedRangePolicyBuilder_ == null) {
if (policyCase_ == 2 &&
policy_ != org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance()) {
policy_ = org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.newBuilder((org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_)
.mergeFrom(value).buildPartial();
} else {
policy_ = value;
}
onChanged();
} else {
if (policyCase_ == 2) {
fixedRangePolicyBuilder_.mergeFrom(value);
} else {
fixedRangePolicyBuilder_.setMessage(value);
}
}
policyCase_ = 2;
return this;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
public Builder clearFixedRangePolicy() {
if (fixedRangePolicyBuilder_ == null) {
if (policyCase_ == 2) {
policyCase_ = 0;
policy_ = null;
onChanged();
}
} else {
if (policyCase_ == 2) {
policyCase_ = 0;
policy_ = null;
}
fixedRangePolicyBuilder_.clear();
}
return this;
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
public org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.Builder getFixedRangePolicyBuilder() {
return getFixedRangePolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicyOrBuilder getFixedRangePolicyOrBuilder() {
if ((policyCase_ == 2) && (fixedRangePolicyBuilder_ != null)) {
return fixedRangePolicyBuilder_.getMessageOrBuilder();
} else {
if (policyCase_ == 2) {
return (org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
}
}
/**
* .bookkeeper.proto.stream.FixedRangeSplitPolicy fixed_range_policy = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicyOrBuilder>
getFixedRangePolicyFieldBuilder() {
if (fixedRangePolicyBuilder_ == null) {
if (!(policyCase_ == 2)) {
policy_ = org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.getDefaultInstance();
}
fixedRangePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicyOrBuilder>(
(org.apache.bookkeeper.stream.proto.FixedRangeSplitPolicy) policy_,
getParentForChildren(),
isClean());
policy_ = null;
}
policyCase_ = 2;
onChanged();
return fixedRangePolicyBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicyOrBuilder> bandwidthPolicyBuilder_;
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
* @return Whether the bandwidthPolicy field is set.
*/
@java.lang.Override
public boolean hasBandwidthPolicy() {
return policyCase_ == 3;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
* @return The bandwidthPolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy getBandwidthPolicy() {
if (bandwidthPolicyBuilder_ == null) {
if (policyCase_ == 3) {
return (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
} else {
if (policyCase_ == 3) {
return bandwidthPolicyBuilder_.getMessage();
}
return org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
}
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
public Builder setBandwidthPolicy(org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy value) {
if (bandwidthPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
onChanged();
} else {
bandwidthPolicyBuilder_.setMessage(value);
}
policyCase_ = 3;
return this;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
public Builder setBandwidthPolicy(
org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.Builder builderForValue) {
if (bandwidthPolicyBuilder_ == null) {
policy_ = builderForValue.build();
onChanged();
} else {
bandwidthPolicyBuilder_.setMessage(builderForValue.build());
}
policyCase_ = 3;
return this;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
public Builder mergeBandwidthPolicy(org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy value) {
if (bandwidthPolicyBuilder_ == null) {
if (policyCase_ == 3 &&
policy_ != org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance()) {
policy_ = org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.newBuilder((org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_)
.mergeFrom(value).buildPartial();
} else {
policy_ = value;
}
onChanged();
} else {
if (policyCase_ == 3) {
bandwidthPolicyBuilder_.mergeFrom(value);
} else {
bandwidthPolicyBuilder_.setMessage(value);
}
}
policyCase_ = 3;
return this;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
public Builder clearBandwidthPolicy() {
if (bandwidthPolicyBuilder_ == null) {
if (policyCase_ == 3) {
policyCase_ = 0;
policy_ = null;
onChanged();
}
} else {
if (policyCase_ == 3) {
policyCase_ = 0;
policy_ = null;
}
bandwidthPolicyBuilder_.clear();
}
return this;
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
public org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.Builder getBandwidthPolicyBuilder() {
return getBandwidthPolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicyOrBuilder getBandwidthPolicyOrBuilder() {
if ((policyCase_ == 3) && (bandwidthPolicyBuilder_ != null)) {
return bandwidthPolicyBuilder_.getMessageOrBuilder();
} else {
if (policyCase_ == 3) {
return (org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_;
}
return org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
}
}
/**
* .bookkeeper.proto.stream.BandwidthBasedSplitPolicy bandwidth_policy = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicyOrBuilder>
getBandwidthPolicyFieldBuilder() {
if (bandwidthPolicyBuilder_ == null) {
if (!(policyCase_ == 3)) {
policy_ = org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.getDefaultInstance();
}
bandwidthPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy.Builder, org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicyOrBuilder>(
(org.apache.bookkeeper.stream.proto.BandwidthBasedSplitPolicy) policy_,
getParentForChildren(),
isClean());
policy_ = null;
}
policyCase_ = 3;
onChanged();
return bandwidthPolicyBuilder_;
}
@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.SplitPolicy)
}
// @@protoc_insertion_point(class_scope:bookkeeper.proto.stream.SplitPolicy)
private static final org.apache.bookkeeper.stream.proto.SplitPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.bookkeeper.stream.proto.SplitPolicy();
}
public static org.apache.bookkeeper.stream.proto.SplitPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SplitPolicy 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.SplitPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}