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.
apache.rocketmq.v1.Partition Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: apache/rocketmq/v1/definition.proto
package apache.rocketmq.v1;
/**
* Protobuf type {@code apache.rocketmq.v1.Partition}
*/
public final class Partition extends
com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:apache.rocketmq.v1.Partition)
PartitionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Partition.newBuilder() to construct.
private Partition(com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Partition() {
permission_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Partition();
}
@java.lang.Override
public final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Partition(
com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
apache.rocketmq.v1.Resource.Builder subBuilder = null;
if (topic_ != null) {
subBuilder = topic_.toBuilder();
}
topic_ = input.readMessage(apache.rocketmq.v1.Resource.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(topic_);
topic_ = subBuilder.buildPartial();
}
break;
}
case 16: {
id_ = input.readInt32();
break;
}
case 24: {
int rawValue = input.readEnum();
permission_ = rawValue;
break;
}
case 34: {
apache.rocketmq.v1.Broker.Builder subBuilder = null;
if (broker_ != null) {
subBuilder = broker_.toBuilder();
}
broker_ = input.readMessage(apache.rocketmq.v1.Broker.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(broker_);
broker_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Partition_descriptor;
}
@java.lang.Override
protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Partition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
apache.rocketmq.v1.Partition.class, apache.rocketmq.v1.Partition.Builder.class);
}
public static final int TOPIC_FIELD_NUMBER = 1;
private apache.rocketmq.v1.Resource topic_;
/**
* .apache.rocketmq.v1.Resource topic = 1;
* @return Whether the topic field is set.
*/
@java.lang.Override
public boolean hasTopic() {
return topic_ != null;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
* @return The topic.
*/
@java.lang.Override
public apache.rocketmq.v1.Resource getTopic() {
return topic_ == null ? apache.rocketmq.v1.Resource.getDefaultInstance() : topic_;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
@java.lang.Override
public apache.rocketmq.v1.ResourceOrBuilder getTopicOrBuilder() {
return getTopic();
}
public static final int ID_FIELD_NUMBER = 2;
private int id_;
/**
* int32 id = 2;
* @return The id.
*/
@java.lang.Override
public int getId() {
return id_;
}
public static final int PERMISSION_FIELD_NUMBER = 3;
private int permission_;
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @return The enum numeric value on the wire for permission.
*/
@java.lang.Override public int getPermissionValue() {
return permission_;
}
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @return The permission.
*/
@java.lang.Override public apache.rocketmq.v1.Permission getPermission() {
@SuppressWarnings("deprecation")
apache.rocketmq.v1.Permission result = apache.rocketmq.v1.Permission.valueOf(permission_);
return result == null ? apache.rocketmq.v1.Permission.UNRECOGNIZED : result;
}
public static final int BROKER_FIELD_NUMBER = 4;
private apache.rocketmq.v1.Broker broker_;
/**
* .apache.rocketmq.v1.Broker broker = 4;
* @return Whether the broker field is set.
*/
@java.lang.Override
public boolean hasBroker() {
return broker_ != null;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
* @return The broker.
*/
@java.lang.Override
public apache.rocketmq.v1.Broker getBroker() {
return broker_ == null ? apache.rocketmq.v1.Broker.getDefaultInstance() : broker_;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
@java.lang.Override
public apache.rocketmq.v1.BrokerOrBuilder getBrokerOrBuilder() {
return getBroker();
}
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.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (topic_ != null) {
output.writeMessage(1, getTopic());
}
if (id_ != 0) {
output.writeInt32(2, id_);
}
if (permission_ != apache.rocketmq.v1.Permission.NONE.getNumber()) {
output.writeEnum(3, permission_);
}
if (broker_ != null) {
output.writeMessage(4, getBroker());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (topic_ != null) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTopic());
}
if (id_ != 0) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeInt32Size(2, id_);
}
if (permission_ != apache.rocketmq.v1.Permission.NONE.getNumber()) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeEnumSize(3, permission_);
}
if (broker_ != null) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getBroker());
}
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 apache.rocketmq.v1.Partition)) {
return super.equals(obj);
}
apache.rocketmq.v1.Partition other = (apache.rocketmq.v1.Partition) obj;
if (hasTopic() != other.hasTopic()) return false;
if (hasTopic()) {
if (!getTopic()
.equals(other.getTopic())) return false;
}
if (getId()
!= other.getId()) return false;
if (permission_ != other.permission_) return false;
if (hasBroker() != other.hasBroker()) return false;
if (hasBroker()) {
if (!getBroker()
.equals(other.getBroker())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTopic()) {
hash = (37 * hash) + TOPIC_FIELD_NUMBER;
hash = (53 * hash) + getTopic().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
hash = (37 * hash) + PERMISSION_FIELD_NUMBER;
hash = (53 * hash) + permission_;
if (hasBroker()) {
hash = (37 * hash) + BROKER_FIELD_NUMBER;
hash = (53 * hash) + getBroker().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static apache.rocketmq.v1.Partition parseFrom(
java.nio.ByteBuffer data)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static apache.rocketmq.v1.Partition parseFrom(
java.nio.ByteBuffer data,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static apache.rocketmq.v1.Partition parseFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static apache.rocketmq.v1.Partition parseFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static apache.rocketmq.v1.Partition parseFrom(byte[] data)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static apache.rocketmq.v1.Partition parseFrom(
byte[] data,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static apache.rocketmq.v1.Partition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static apache.rocketmq.v1.Partition parseFrom(
java.io.InputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static apache.rocketmq.v1.Partition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static apache.rocketmq.v1.Partition parseDelimitedFrom(
java.io.InputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static apache.rocketmq.v1.Partition parseFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static apache.rocketmq.v1.Partition parseFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.aliyun.openservices.ons.shaded.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(apache.rocketmq.v1.Partition 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.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code apache.rocketmq.v1.Partition}
*/
public static final class Builder extends
com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:apache.rocketmq.v1.Partition)
apache.rocketmq.v1.PartitionOrBuilder {
public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Partition_descriptor;
}
@java.lang.Override
protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Partition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
apache.rocketmq.v1.Partition.class, apache.rocketmq.v1.Partition.Builder.class);
}
// Construct using apache.rocketmq.v1.Partition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (topicBuilder_ == null) {
topic_ = null;
} else {
topic_ = null;
topicBuilder_ = null;
}
id_ = 0;
permission_ = 0;
if (brokerBuilder_ == null) {
broker_ = null;
} else {
broker_ = null;
brokerBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Partition_descriptor;
}
@java.lang.Override
public apache.rocketmq.v1.Partition getDefaultInstanceForType() {
return apache.rocketmq.v1.Partition.getDefaultInstance();
}
@java.lang.Override
public apache.rocketmq.v1.Partition build() {
apache.rocketmq.v1.Partition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public apache.rocketmq.v1.Partition buildPartial() {
apache.rocketmq.v1.Partition result = new apache.rocketmq.v1.Partition(this);
if (topicBuilder_ == null) {
result.topic_ = topic_;
} else {
result.topic_ = topicBuilder_.build();
}
result.id_ = id_;
result.permission_ = permission_;
if (brokerBuilder_ == null) {
result.broker_ = broker_;
} else {
result.broker_ = brokerBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.aliyun.openservices.ons.shaded.com.google.protobuf.Message other) {
if (other instanceof apache.rocketmq.v1.Partition) {
return mergeFrom((apache.rocketmq.v1.Partition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(apache.rocketmq.v1.Partition other) {
if (other == apache.rocketmq.v1.Partition.getDefaultInstance()) return this;
if (other.hasTopic()) {
mergeTopic(other.getTopic());
}
if (other.getId() != 0) {
setId(other.getId());
}
if (other.permission_ != 0) {
setPermissionValue(other.getPermissionValue());
}
if (other.hasBroker()) {
mergeBroker(other.getBroker());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
apache.rocketmq.v1.Partition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (apache.rocketmq.v1.Partition) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private apache.rocketmq.v1.Resource topic_;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Resource, apache.rocketmq.v1.Resource.Builder, apache.rocketmq.v1.ResourceOrBuilder> topicBuilder_;
/**
* .apache.rocketmq.v1.Resource topic = 1;
* @return Whether the topic field is set.
*/
public boolean hasTopic() {
return topicBuilder_ != null || topic_ != null;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
* @return The topic.
*/
public apache.rocketmq.v1.Resource getTopic() {
if (topicBuilder_ == null) {
return topic_ == null ? apache.rocketmq.v1.Resource.getDefaultInstance() : topic_;
} else {
return topicBuilder_.getMessage();
}
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public Builder setTopic(apache.rocketmq.v1.Resource value) {
if (topicBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
topic_ = value;
onChanged();
} else {
topicBuilder_.setMessage(value);
}
return this;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public Builder setTopic(
apache.rocketmq.v1.Resource.Builder builderForValue) {
if (topicBuilder_ == null) {
topic_ = builderForValue.build();
onChanged();
} else {
topicBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public Builder mergeTopic(apache.rocketmq.v1.Resource value) {
if (topicBuilder_ == null) {
if (topic_ != null) {
topic_ =
apache.rocketmq.v1.Resource.newBuilder(topic_).mergeFrom(value).buildPartial();
} else {
topic_ = value;
}
onChanged();
} else {
topicBuilder_.mergeFrom(value);
}
return this;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public Builder clearTopic() {
if (topicBuilder_ == null) {
topic_ = null;
onChanged();
} else {
topic_ = null;
topicBuilder_ = null;
}
return this;
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public apache.rocketmq.v1.Resource.Builder getTopicBuilder() {
onChanged();
return getTopicFieldBuilder().getBuilder();
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
public apache.rocketmq.v1.ResourceOrBuilder getTopicOrBuilder() {
if (topicBuilder_ != null) {
return topicBuilder_.getMessageOrBuilder();
} else {
return topic_ == null ?
apache.rocketmq.v1.Resource.getDefaultInstance() : topic_;
}
}
/**
* .apache.rocketmq.v1.Resource topic = 1;
*/
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Resource, apache.rocketmq.v1.Resource.Builder, apache.rocketmq.v1.ResourceOrBuilder>
getTopicFieldBuilder() {
if (topicBuilder_ == null) {
topicBuilder_ = new com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Resource, apache.rocketmq.v1.Resource.Builder, apache.rocketmq.v1.ResourceOrBuilder>(
getTopic(),
getParentForChildren(),
isClean());
topic_ = null;
}
return topicBuilder_;
}
private int id_ ;
/**
* int32 id = 2;
* @return The id.
*/
@java.lang.Override
public int getId() {
return id_;
}
/**
* int32 id = 2;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(int value) {
id_ = value;
onChanged();
return this;
}
/**
* int32 id = 2;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = 0;
onChanged();
return this;
}
private int permission_ = 0;
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @return The enum numeric value on the wire for permission.
*/
@java.lang.Override public int getPermissionValue() {
return permission_;
}
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @param value The enum numeric value on the wire for permission to set.
* @return This builder for chaining.
*/
public Builder setPermissionValue(int value) {
permission_ = value;
onChanged();
return this;
}
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @return The permission.
*/
@java.lang.Override
public apache.rocketmq.v1.Permission getPermission() {
@SuppressWarnings("deprecation")
apache.rocketmq.v1.Permission result = apache.rocketmq.v1.Permission.valueOf(permission_);
return result == null ? apache.rocketmq.v1.Permission.UNRECOGNIZED : result;
}
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @param value The permission to set.
* @return This builder for chaining.
*/
public Builder setPermission(apache.rocketmq.v1.Permission value) {
if (value == null) {
throw new NullPointerException();
}
permission_ = value.getNumber();
onChanged();
return this;
}
/**
* .apache.rocketmq.v1.Permission permission = 3;
* @return This builder for chaining.
*/
public Builder clearPermission() {
permission_ = 0;
onChanged();
return this;
}
private apache.rocketmq.v1.Broker broker_;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Broker, apache.rocketmq.v1.Broker.Builder, apache.rocketmq.v1.BrokerOrBuilder> brokerBuilder_;
/**
* .apache.rocketmq.v1.Broker broker = 4;
* @return Whether the broker field is set.
*/
public boolean hasBroker() {
return brokerBuilder_ != null || broker_ != null;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
* @return The broker.
*/
public apache.rocketmq.v1.Broker getBroker() {
if (brokerBuilder_ == null) {
return broker_ == null ? apache.rocketmq.v1.Broker.getDefaultInstance() : broker_;
} else {
return brokerBuilder_.getMessage();
}
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public Builder setBroker(apache.rocketmq.v1.Broker value) {
if (brokerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
broker_ = value;
onChanged();
} else {
brokerBuilder_.setMessage(value);
}
return this;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public Builder setBroker(
apache.rocketmq.v1.Broker.Builder builderForValue) {
if (brokerBuilder_ == null) {
broker_ = builderForValue.build();
onChanged();
} else {
brokerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public Builder mergeBroker(apache.rocketmq.v1.Broker value) {
if (brokerBuilder_ == null) {
if (broker_ != null) {
broker_ =
apache.rocketmq.v1.Broker.newBuilder(broker_).mergeFrom(value).buildPartial();
} else {
broker_ = value;
}
onChanged();
} else {
brokerBuilder_.mergeFrom(value);
}
return this;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public Builder clearBroker() {
if (brokerBuilder_ == null) {
broker_ = null;
onChanged();
} else {
broker_ = null;
brokerBuilder_ = null;
}
return this;
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public apache.rocketmq.v1.Broker.Builder getBrokerBuilder() {
onChanged();
return getBrokerFieldBuilder().getBuilder();
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
public apache.rocketmq.v1.BrokerOrBuilder getBrokerOrBuilder() {
if (brokerBuilder_ != null) {
return brokerBuilder_.getMessageOrBuilder();
} else {
return broker_ == null ?
apache.rocketmq.v1.Broker.getDefaultInstance() : broker_;
}
}
/**
* .apache.rocketmq.v1.Broker broker = 4;
*/
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Broker, apache.rocketmq.v1.Broker.Builder, apache.rocketmq.v1.BrokerOrBuilder>
getBrokerFieldBuilder() {
if (brokerBuilder_ == null) {
brokerBuilder_ = new com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.Broker, apache.rocketmq.v1.Broker.Builder, apache.rocketmq.v1.BrokerOrBuilder>(
getBroker(),
getParentForChildren(),
isClean());
broker_ = null;
}
return brokerBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:apache.rocketmq.v1.Partition)
}
// @@protoc_insertion_point(class_scope:apache.rocketmq.v1.Partition)
private static final apache.rocketmq.v1.Partition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new apache.rocketmq.v1.Partition();
}
public static apache.rocketmq.v1.Partition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser
PARSER = new com.aliyun.openservices.ons.shaded.com.google.protobuf.AbstractParser() {
@java.lang.Override
public Partition parsePartialFrom(
com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return new Partition(input, extensionRegistry);
}
};
public static com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public apache.rocketmq.v1.Partition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}