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.RetentionPolicy 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.RetentionPolicy}
*/
public final class RetentionPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bookkeeper.proto.stream.RetentionPolicy)
RetentionPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use RetentionPolicy.newBuilder() to construct.
private RetentionPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RetentionPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RetentionPolicy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RetentionPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RetentionPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.RetentionPolicy.class, org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder.class);
}
public static final int TIME_POLICY_FIELD_NUMBER = 1;
private org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy timePolicy_;
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
* @return Whether the timePolicy field is set.
*/
@java.lang.Override
public boolean hasTimePolicy() {
return timePolicy_ != null;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
* @return The timePolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy getTimePolicy() {
return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.getDefaultInstance() : timePolicy_;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicyOrBuilder getTimePolicyOrBuilder() {
return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.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 (timePolicy_ != null) {
output.writeMessage(1, getTimePolicy());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (timePolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, 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.RetentionPolicy)) {
return super.equals(obj);
}
org.apache.bookkeeper.stream.proto.RetentionPolicy other = (org.apache.bookkeeper.stream.proto.RetentionPolicy) obj;
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 (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.RetentionPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy 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.RetentionPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy 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.RetentionPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy 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.RetentionPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy 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.RetentionPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy 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.RetentionPolicy 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.RetentionPolicy 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.RetentionPolicy 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.RetentionPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:bookkeeper.proto.stream.RetentionPolicy)
org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RetentionPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RetentionPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.RetentionPolicy.class, org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder.class);
}
// Construct using org.apache.bookkeeper.stream.proto.RetentionPolicy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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_RetentionPolicy_descriptor;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RetentionPolicy getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance();
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RetentionPolicy build() {
org.apache.bookkeeper.stream.proto.RetentionPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RetentionPolicy buildPartial() {
org.apache.bookkeeper.stream.proto.RetentionPolicy result = new org.apache.bookkeeper.stream.proto.RetentionPolicy(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.apache.bookkeeper.stream.proto.RetentionPolicy result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 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.RetentionPolicy) {
return mergeFrom((org.apache.bookkeeper.stream.proto.RetentionPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.bookkeeper.stream.proto.RetentionPolicy other) {
if (other == org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance()) return this;
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(
getTimePolicyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
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.TimeBasedRetentionPolicy timePolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicyOrBuilder> timePolicyBuilder_;
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
* @return Whether the timePolicy field is set.
*/
public boolean hasTimePolicy() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
* @return The timePolicy.
*/
public org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy getTimePolicy() {
if (timePolicyBuilder_ == null) {
return timePolicy_ == null ? org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.getDefaultInstance() : timePolicy_;
} else {
return timePolicyBuilder_.getMessage();
}
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public Builder setTimePolicy(org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy value) {
if (timePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timePolicy_ = value;
} else {
timePolicyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public Builder setTimePolicy(
org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.Builder builderForValue) {
if (timePolicyBuilder_ == null) {
timePolicy_ = builderForValue.build();
} else {
timePolicyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public Builder mergeTimePolicy(org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy value) {
if (timePolicyBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
timePolicy_ != null &&
timePolicy_ != org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.getDefaultInstance()) {
getTimePolicyBuilder().mergeFrom(value);
} else {
timePolicy_ = value;
}
} else {
timePolicyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public Builder clearTimePolicy() {
bitField0_ = (bitField0_ & ~0x00000001);
timePolicy_ = null;
if (timePolicyBuilder_ != null) {
timePolicyBuilder_.dispose();
timePolicyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.Builder getTimePolicyBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTimePolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
public org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicyOrBuilder getTimePolicyOrBuilder() {
if (timePolicyBuilder_ != null) {
return timePolicyBuilder_.getMessageOrBuilder();
} else {
return timePolicy_ == null ?
org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.getDefaultInstance() : timePolicy_;
}
}
/**
* .bookkeeper.proto.stream.TimeBasedRetentionPolicy time_policy = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicyOrBuilder>
getTimePolicyFieldBuilder() {
if (timePolicyBuilder_ == null) {
timePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.TimeBasedRetentionPolicyOrBuilder>(
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.RetentionPolicy)
}
// @@protoc_insertion_point(class_scope:bookkeeper.proto.stream.RetentionPolicy)
private static final org.apache.bookkeeper.stream.proto.RetentionPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.bookkeeper.stream.proto.RetentionPolicy();
}
public static org.apache.bookkeeper.stream.proto.RetentionPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RetentionPolicy 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.RetentionPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}