// Generated by the protocol buffer compiler. DO NOT EDIT! // source: rt_msg_content.proto package com.xiaopeng.api.vo.automaticPilot.protobuf; /** *
* 消息头 ** * Protobuf type {@code acm.proto.intelliservices.rt.MsgHeader} */ public final class MsgHeader extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acm.proto.intelliservices.rt.MsgHeader) MsgHeaderOrBuilder { private static final long serialVersionUID = 0L; // Use MsgHeader.newBuilder() to construct. private MsgHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private MsgHeader() { type_ = 0; msgId_ = ""; source_ = 0; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new MsgHeader(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MsgHeader( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { timestamp_ = input.readInt64(); break; } case 16: { cmd_ = input.readUInt32(); break; } case 24: { sequence_ = input.readUInt64(); break; } case 32: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 42: { String s = input.readStringRequireUtf8(); msgId_ = s; break; } case 48: { int rawValue = input.readEnum(); source_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return RtMsgContent.internal_static_acm_proto_intelliservices_rt_MsgHeader_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return RtMsgContent.internal_static_acm_proto_intelliservices_rt_MsgHeader_fieldAccessorTable .ensureFieldAccessorsInitialized( MsgHeader.class, Builder.class); } public static final int TIMESTAMP_FIELD_NUMBER = 1; private long timestamp_; /** *
* 发送时间戳,单位ms ** *
int64 timestamp = 1;
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return timestamp_;
}
public static final int CMD_FIELD_NUMBER = 2;
private int cmd_;
/**
* * 消息头 ** *
uint32 cmd = 2;
* @return The cmd.
*/
@Override
public int getCmd() {
return cmd_;
}
public static final int SEQUENCE_FIELD_NUMBER = 3;
private long sequence_;
/**
* uint64 sequence = 3;
* @return The sequence.
*/
@Override
public long getSequence() {
return sequence_;
}
public static final int TYPE_FIELD_NUMBER = 4;
private int type_;
/**
* * 请求或应答 ** *
.acm.proto.intelliservices.rt.MessageType type = 4;
* @return The enum numeric value on the wire for type.
*/
@Override public int getTypeValue() {
return type_;
}
/**
* * 请求或应答 ** *
.acm.proto.intelliservices.rt.MessageType type = 4;
* @return The type.
*/
@Override public MessageType getType() {
@SuppressWarnings("deprecation")
MessageType result = MessageType.valueOf(type_);
return result == null ? MessageType.UNRECOGNIZED : result;
}
public static final int MSG_ID_FIELD_NUMBER = 5;
private volatile Object msgId_;
/**
* * 消息唯一ID(UUID) ** *
string msg_id = 5;
* @return The msgId.
*/
@Override
public String getMsgId() {
Object ref = msgId_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
msgId_ = s;
return s;
}
}
/**
* * 消息唯一ID(UUID) ** *
string msg_id = 5;
* @return The bytes for msgId.
*/
@Override
public com.google.protobuf.ByteString
getMsgIdBytes() {
Object ref = msgId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(String) ref);
msgId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SOURCE_FIELD_NUMBER = 6;
private int source_;
/**
* * 消息来源:cloud、cdu、xpu ** *
.acm.proto.intelliservices.rt.SourceType source = 6;
* @return The enum numeric value on the wire for source.
*/
@Override public int getSourceValue() {
return source_;
}
/**
* * 消息来源:cloud、cdu、xpu ** *
.acm.proto.intelliservices.rt.SourceType source = 6;
* @return The source.
*/
@Override public SourceType getSource() {
@SuppressWarnings("deprecation")
SourceType result = SourceType.valueOf(source_);
return result == null ? SourceType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (timestamp_ != 0L) {
output.writeInt64(1, timestamp_);
}
if (cmd_ != 0) {
output.writeUInt32(2, cmd_);
}
if (sequence_ != 0L) {
output.writeUInt64(3, sequence_);
}
if (type_ != MessageType.MESSAGE_TYPE_UNKNOWN.getNumber()) {
output.writeEnum(4, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, msgId_);
}
if (source_ != SourceType.SOURCE_UNKNOWN.getNumber()) {
output.writeEnum(6, source_);
}
unknownFields.writeTo(output);
}
@Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, timestamp_);
}
if (cmd_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, cmd_);
}
if (sequence_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, sequence_);
}
if (type_ != MessageType.MESSAGE_TYPE_UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, msgId_);
}
if (source_ != SourceType.SOURCE_UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, source_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MsgHeader)) {
return super.equals(obj);
}
MsgHeader other = (MsgHeader) obj;
if (getTimestamp()
!= other.getTimestamp()) return false;
if (getCmd()
!= other.getCmd()) return false;
if (getSequence()
!= other.getSequence()) return false;
if (type_ != other.type_) return false;
if (!getMsgId()
.equals(other.getMsgId())) return false;
if (source_ != other.source_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (37 * hash) + CMD_FIELD_NUMBER;
hash = (53 * hash) + getCmd();
hash = (37 * hash) + SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSequence());
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + MSG_ID_FIELD_NUMBER;
hash = (53 * hash) + getMsgId().hashCode();
hash = (37 * hash) + SOURCE_FIELD_NUMBER;
hash = (53 * hash) + source_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static MsgHeader parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static MsgHeader parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static MsgHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static MsgHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static MsgHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static MsgHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static MsgHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static MsgHeader 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 MsgHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static MsgHeader 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 MsgHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static MsgHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(MsgHeader prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@Override
protected Builder newBuilderForType(
BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* * 消息头 ** * Protobuf type {@code acm.proto.intelliservices.rt.MsgHeader} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* 发送时间戳,单位ms
*
*
* int64 timestamp = 1;
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* 发送时间戳,单位ms
*
*
* int64 timestamp = 1;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
*
* 发送时间戳,单位ms
*
*
* int64 timestamp = 1;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
return this;
}
private int cmd_ ;
/**
*
* 消息头
*
*
* uint32 cmd = 2;
* @return The cmd.
*/
@Override
public int getCmd() {
return cmd_;
}
/**
*
* 消息头
*
*
* uint32 cmd = 2;
* @param value The cmd to set.
* @return This builder for chaining.
*/
public Builder setCmd(int value) {
cmd_ = value;
onChanged();
return this;
}
/**
*
* 消息头
*
*
* uint32 cmd = 2;
* @return This builder for chaining.
*/
public Builder clearCmd() {
cmd_ = 0;
onChanged();
return this;
}
private long sequence_ ;
/**
* uint64 sequence = 3;
* @return The sequence.
*/
@Override
public long getSequence() {
return sequence_;
}
/**
* uint64 sequence = 3;
* @param value The sequence to set.
* @return This builder for chaining.
*/
public Builder setSequence(long value) {
sequence_ = value;
onChanged();
return this;
}
/**
* uint64 sequence = 3;
* @return This builder for chaining.
*/
public Builder clearSequence() {
sequence_ = 0L;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* 请求或应答
*
*
* .acm.proto.intelliservices.rt.MessageType type = 4;
* @return The enum numeric value on the wire for type.
*/
@Override public int getTypeValue() {
return type_;
}
/**
*
* 请求或应答
*
*
* .acm.proto.intelliservices.rt.MessageType type = 4;
* @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;
onChanged();
return this;
}
/**
*
* 请求或应答
*
*
* .acm.proto.intelliservices.rt.MessageType type = 4;
* @return The type.
*/
@Override
public MessageType getType() {
@SuppressWarnings("deprecation")
MessageType result = MessageType.valueOf(type_);
return result == null ? MessageType.UNRECOGNIZED : result;
}
/**
*
* 请求或应答
*
*
* .acm.proto.intelliservices.rt.MessageType type = 4;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(MessageType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* 请求或应答
*
*
* .acm.proto.intelliservices.rt.MessageType type = 4;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private Object msgId_ = "";
/**
*
* 消息唯一ID(UUID)
*
*
* string msg_id = 5;
* @return The msgId.
*/
public String getMsgId() {
Object ref = msgId_;
if (!(ref instanceof String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
msgId_ = s;
return s;
} else {
return (String) ref;
}
}
/**
*
* 消息唯一ID(UUID)
*
*
* string msg_id = 5;
* @return The bytes for msgId.
*/
public com.google.protobuf.ByteString
getMsgIdBytes() {
Object ref = msgId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(String) ref);
msgId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 消息唯一ID(UUID)
*
*
* string msg_id = 5;
* @param value The msgId to set.
* @return This builder for chaining.
*/
public Builder setMsgId(
String value) {
if (value == null) {
throw new NullPointerException();
}
msgId_ = value;
onChanged();
return this;
}
/**
*
* 消息唯一ID(UUID)
*
*
* string msg_id = 5;
* @return This builder for chaining.
*/
public Builder clearMsgId() {
msgId_ = getDefaultInstance().getMsgId();
onChanged();
return this;
}
/**
*
* 消息唯一ID(UUID)
*
*
* string msg_id = 5;
* @param value The bytes for msgId to set.
* @return This builder for chaining.
*/
public Builder setMsgIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
msgId_ = value;
onChanged();
return this;
}
private int source_ = 0;
/**
*
* 消息来源:cloud、cdu、xpu
*
*
* .acm.proto.intelliservices.rt.SourceType source = 6;
* @return The enum numeric value on the wire for source.
*/
@Override public int getSourceValue() {
return source_;
}
/**
*
* 消息来源:cloud、cdu、xpu
*
*
* .acm.proto.intelliservices.rt.SourceType source = 6;
* @param value The enum numeric value on the wire for source to set.
* @return This builder for chaining.
*/
public Builder setSourceValue(int value) {
source_ = value;
onChanged();
return this;
}
/**
*
* 消息来源:cloud、cdu、xpu
*
*
* .acm.proto.intelliservices.rt.SourceType source = 6;
* @return The source.
*/
@Override
public SourceType getSource() {
@SuppressWarnings("deprecation")
SourceType result = SourceType.valueOf(source_);
return result == null ? SourceType.UNRECOGNIZED : result;
}
/**
*
* 消息来源:cloud、cdu、xpu
*
*
* .acm.proto.intelliservices.rt.SourceType source = 6;
* @param value The source to set.
* @return This builder for chaining.
*/
public Builder setSource(SourceType value) {
if (value == null) {
throw new NullPointerException();
}
source_ = value.getNumber();
onChanged();
return this;
}
/**
*
* 消息来源:cloud、cdu、xpu
*
*
* .acm.proto.intelliservices.rt.SourceType source = 6;
* @return This builder for chaining.
*/
public Builder clearSource() {
source_ = 0;
onChanged();
return this;
}
@Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:acm.proto.intelliservices.rt.MsgHeader)
}
// @@protoc_insertion_point(class_scope:acm.proto.intelliservices.rt.MsgHeader)
private static final MsgHeader DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new MsgHeader();
}
public static MsgHeader getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser