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.
// 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.Message}
*/
public final class Message extends
com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:apache.rocketmq.v1.Message)
MessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Message.newBuilder() to construct.
private Message(com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Message() {
body_ = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Message();
}
@java.lang.Override
public final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Message(
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();
}
int mutable_bitField0_ = 0;
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 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
userAttribute_ = com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField.newMapField(
UserAttributeDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.aliyun.openservices.ons.shaded.com.google.protobuf.MapEntry
userAttribute__ = input.readMessage(
UserAttributeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
userAttribute_.getMutableMap().put(
userAttribute__.getKey(), userAttribute__.getValue());
break;
}
case 26: {
apache.rocketmq.v1.SystemAttribute.Builder subBuilder = null;
if (systemAttribute_ != null) {
subBuilder = systemAttribute_.toBuilder();
}
systemAttribute_ = input.readMessage(apache.rocketmq.v1.SystemAttribute.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(systemAttribute_);
systemAttribute_ = subBuilder.buildPartial();
}
break;
}
case 34: {
body_ = input.readBytes();
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_Message_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetUserAttribute();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@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_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
apache.rocketmq.v1.Message.class, apache.rocketmq.v1.Message.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 USER_ATTRIBUTE_FIELD_NUMBER = 2;
private static final class UserAttributeDefaultEntryHolder {
static final com.aliyun.openservices.ons.shaded.com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.aliyun.openservices.ons.shaded.com.google.protobuf.MapEntry
.newDefaultInstance(
apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Message_UserAttributeEntry_descriptor,
com.aliyun.openservices.ons.shaded.com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.aliyun.openservices.ons.shaded.com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField<
java.lang.String, java.lang.String> userAttribute_;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField
internalGetUserAttribute() {
if (userAttribute_ == null) {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField.emptyMapField(
UserAttributeDefaultEntryHolder.defaultEntry);
}
return userAttribute_;
}
public int getUserAttributeCount() {
return internalGetUserAttribute().getMap().size();
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
@java.lang.Override
public boolean containsUserAttribute(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetUserAttribute().getMap().containsKey(key);
}
/**
* Use {@link #getUserAttributeMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getUserAttribute() {
return getUserAttributeMap();
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
@java.lang.Override
public java.lang.String getUserAttributeOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetUserAttribute().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SYSTEM_ATTRIBUTE_FIELD_NUMBER = 3;
private apache.rocketmq.v1.SystemAttribute systemAttribute_;
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
* @return Whether the systemAttribute field is set.
*/
@java.lang.Override
public boolean hasSystemAttribute() {
return systemAttribute_ != null;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
* @return The systemAttribute.
*/
@java.lang.Override
public apache.rocketmq.v1.SystemAttribute getSystemAttribute() {
return systemAttribute_ == null ? apache.rocketmq.v1.SystemAttribute.getDefaultInstance() : systemAttribute_;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
@java.lang.Override
public apache.rocketmq.v1.SystemAttributeOrBuilder getSystemAttributeOrBuilder() {
return getSystemAttribute();
}
public static final int BODY_FIELD_NUMBER = 4;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString body_;
/**
* bytes body = 4;
* @return The body.
*/
@java.lang.Override
public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getBody() {
return body_;
}
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());
}
com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetUserAttribute(),
UserAttributeDefaultEntryHolder.defaultEntry,
2);
if (systemAttribute_ != null) {
output.writeMessage(3, getSystemAttribute());
}
if (!body_.isEmpty()) {
output.writeBytes(4, body_);
}
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());
}
for (java.util.Map.Entry entry
: internalGetUserAttribute().getMap().entrySet()) {
com.aliyun.openservices.ons.shaded.com.google.protobuf.MapEntry
userAttribute__ = UserAttributeDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeMessageSize(2, userAttribute__);
}
if (systemAttribute_ != null) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSystemAttribute());
}
if (!body_.isEmpty()) {
size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
.computeBytesSize(4, body_);
}
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.Message)) {
return super.equals(obj);
}
apache.rocketmq.v1.Message other = (apache.rocketmq.v1.Message) obj;
if (hasTopic() != other.hasTopic()) return false;
if (hasTopic()) {
if (!getTopic()
.equals(other.getTopic())) return false;
}
if (!internalGetUserAttribute().equals(
other.internalGetUserAttribute())) return false;
if (hasSystemAttribute() != other.hasSystemAttribute()) return false;
if (hasSystemAttribute()) {
if (!getSystemAttribute()
.equals(other.getSystemAttribute())) return false;
}
if (!getBody()
.equals(other.getBody())) 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();
}
if (!internalGetUserAttribute().getMap().isEmpty()) {
hash = (37 * hash) + USER_ATTRIBUTE_FIELD_NUMBER;
hash = (53 * hash) + internalGetUserAttribute().hashCode();
}
if (hasSystemAttribute()) {
hash = (37 * hash) + SYSTEM_ATTRIBUTE_FIELD_NUMBER;
hash = (53 * hash) + getSystemAttribute().hashCode();
}
hash = (37 * hash) + BODY_FIELD_NUMBER;
hash = (53 * hash) + getBody().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static apache.rocketmq.v1.Message parseFrom(
java.nio.ByteBuffer data)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static apache.rocketmq.v1.Message 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.Message 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.Message 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.Message parseFrom(byte[] data)
throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static apache.rocketmq.v1.Message 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.Message 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.Message 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.Message 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.Message 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.Message 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.Message 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.Message 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.Message}
*/
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.Message)
apache.rocketmq.v1.MessageOrBuilder {
public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return apache.rocketmq.v1.MQDomain.internal_static_apache_rocketmq_v1_Message_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetUserAttribute();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableUserAttribute();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@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_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
apache.rocketmq.v1.Message.class, apache.rocketmq.v1.Message.Builder.class);
}
// Construct using apache.rocketmq.v1.Message.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;
}
internalGetMutableUserAttribute().clear();
if (systemAttributeBuilder_ == null) {
systemAttribute_ = null;
} else {
systemAttribute_ = null;
systemAttributeBuilder_ = null;
}
body_ = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.EMPTY;
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_Message_descriptor;
}
@java.lang.Override
public apache.rocketmq.v1.Message getDefaultInstanceForType() {
return apache.rocketmq.v1.Message.getDefaultInstance();
}
@java.lang.Override
public apache.rocketmq.v1.Message build() {
apache.rocketmq.v1.Message result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public apache.rocketmq.v1.Message buildPartial() {
apache.rocketmq.v1.Message result = new apache.rocketmq.v1.Message(this);
int from_bitField0_ = bitField0_;
if (topicBuilder_ == null) {
result.topic_ = topic_;
} else {
result.topic_ = topicBuilder_.build();
}
result.userAttribute_ = internalGetUserAttribute();
result.userAttribute_.makeImmutable();
if (systemAttributeBuilder_ == null) {
result.systemAttribute_ = systemAttribute_;
} else {
result.systemAttribute_ = systemAttributeBuilder_.build();
}
result.body_ = body_;
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.Message) {
return mergeFrom((apache.rocketmq.v1.Message)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(apache.rocketmq.v1.Message other) {
if (other == apache.rocketmq.v1.Message.getDefaultInstance()) return this;
if (other.hasTopic()) {
mergeTopic(other.getTopic());
}
internalGetMutableUserAttribute().mergeFrom(
other.internalGetUserAttribute());
if (other.hasSystemAttribute()) {
mergeSystemAttribute(other.getSystemAttribute());
}
if (other.getBody() != com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.EMPTY) {
setBody(other.getBody());
}
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.Message parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (apache.rocketmq.v1.Message) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
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 com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField<
java.lang.String, java.lang.String> userAttribute_;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField
internalGetUserAttribute() {
if (userAttribute_ == null) {
return com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField.emptyMapField(
UserAttributeDefaultEntryHolder.defaultEntry);
}
return userAttribute_;
}
private com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField
internalGetMutableUserAttribute() {
onChanged();;
if (userAttribute_ == null) {
userAttribute_ = com.aliyun.openservices.ons.shaded.com.google.protobuf.MapField.newMapField(
UserAttributeDefaultEntryHolder.defaultEntry);
}
if (!userAttribute_.isMutable()) {
userAttribute_ = userAttribute_.copy();
}
return userAttribute_;
}
public int getUserAttributeCount() {
return internalGetUserAttribute().getMap().size();
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
@java.lang.Override
public boolean containsUserAttribute(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetUserAttribute().getMap().containsKey(key);
}
/**
* Use {@link #getUserAttributeMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getUserAttribute() {
return getUserAttributeMap();
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
@java.lang.Override
public java.lang.String getUserAttributeOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetUserAttribute().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearUserAttribute() {
internalGetMutableUserAttribute().getMutableMap()
.clear();
return this;
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
public Builder removeUserAttribute(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableUserAttribute().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableUserAttribute() {
return internalGetMutableUserAttribute().getMutableMap();
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
public Builder putUserAttribute(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableUserAttribute().getMutableMap()
.put(key, value);
return this;
}
/**
*
* User defined key-value pairs.
* If user_attribute contains the reserved keys by RocketMQ,
* the send message request will be aborted with status `INVALID_ARGUMENT`.
* See below links for the reserved keys
* https://github.com/apache/rocketmq/blob/master/common/src/main/java/org/apache/rocketmq/common/message/MessageConst.java#L58
*
*
* map<string, string> user_attribute = 2;
*/
public Builder putAllUserAttribute(
java.util.Map values) {
internalGetMutableUserAttribute().getMutableMap()
.putAll(values);
return this;
}
private apache.rocketmq.v1.SystemAttribute systemAttribute_;
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.SystemAttribute, apache.rocketmq.v1.SystemAttribute.Builder, apache.rocketmq.v1.SystemAttributeOrBuilder> systemAttributeBuilder_;
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
* @return Whether the systemAttribute field is set.
*/
public boolean hasSystemAttribute() {
return systemAttributeBuilder_ != null || systemAttribute_ != null;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
* @return The systemAttribute.
*/
public apache.rocketmq.v1.SystemAttribute getSystemAttribute() {
if (systemAttributeBuilder_ == null) {
return systemAttribute_ == null ? apache.rocketmq.v1.SystemAttribute.getDefaultInstance() : systemAttribute_;
} else {
return systemAttributeBuilder_.getMessage();
}
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public Builder setSystemAttribute(apache.rocketmq.v1.SystemAttribute value) {
if (systemAttributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
systemAttribute_ = value;
onChanged();
} else {
systemAttributeBuilder_.setMessage(value);
}
return this;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public Builder setSystemAttribute(
apache.rocketmq.v1.SystemAttribute.Builder builderForValue) {
if (systemAttributeBuilder_ == null) {
systemAttribute_ = builderForValue.build();
onChanged();
} else {
systemAttributeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public Builder mergeSystemAttribute(apache.rocketmq.v1.SystemAttribute value) {
if (systemAttributeBuilder_ == null) {
if (systemAttribute_ != null) {
systemAttribute_ =
apache.rocketmq.v1.SystemAttribute.newBuilder(systemAttribute_).mergeFrom(value).buildPartial();
} else {
systemAttribute_ = value;
}
onChanged();
} else {
systemAttributeBuilder_.mergeFrom(value);
}
return this;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public Builder clearSystemAttribute() {
if (systemAttributeBuilder_ == null) {
systemAttribute_ = null;
onChanged();
} else {
systemAttribute_ = null;
systemAttributeBuilder_ = null;
}
return this;
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public apache.rocketmq.v1.SystemAttribute.Builder getSystemAttributeBuilder() {
onChanged();
return getSystemAttributeFieldBuilder().getBuilder();
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
public apache.rocketmq.v1.SystemAttributeOrBuilder getSystemAttributeOrBuilder() {
if (systemAttributeBuilder_ != null) {
return systemAttributeBuilder_.getMessageOrBuilder();
} else {
return systemAttribute_ == null ?
apache.rocketmq.v1.SystemAttribute.getDefaultInstance() : systemAttribute_;
}
}
/**
* .apache.rocketmq.v1.SystemAttribute system_attribute = 3;
*/
private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.SystemAttribute, apache.rocketmq.v1.SystemAttribute.Builder, apache.rocketmq.v1.SystemAttributeOrBuilder>
getSystemAttributeFieldBuilder() {
if (systemAttributeBuilder_ == null) {
systemAttributeBuilder_ = new com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
apache.rocketmq.v1.SystemAttribute, apache.rocketmq.v1.SystemAttribute.Builder, apache.rocketmq.v1.SystemAttributeOrBuilder>(
getSystemAttribute(),
getParentForChildren(),
isClean());
systemAttribute_ = null;
}
return systemAttributeBuilder_;
}
private com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString body_ = com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.EMPTY;
/**
* bytes body = 4;
* @return The body.
*/
@java.lang.Override
public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString getBody() {
return body_;
}
/**
* bytes body = 4;
* @param value The body to set.
* @return This builder for chaining.
*/
public Builder setBody(com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
onChanged();
return this;
}
/**
* bytes body = 4;
* @return This builder for chaining.
*/
public Builder clearBody() {
body_ = getDefaultInstance().getBody();
onChanged();
return this;
}
@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.Message)
}
// @@protoc_insertion_point(class_scope:apache.rocketmq.v1.Message)
private static final apache.rocketmq.v1.Message DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new apache.rocketmq.v1.Message();
}
public static apache.rocketmq.v1.Message 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 Message 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 Message(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.Message getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}