io.temporal.api.protocol.v1.Message Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: temporal/api/protocol/v1/message.proto
package io.temporal.api.protocol.v1;
/**
*
* (-- api-linter: core::0146::any=disabled
* aip.dev/not-precedent: We want runtime extensibility for the body field --)
*
*
* Protobuf type {@code temporal.api.protocol.v1.Message}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:Message.java.pb.meta")
public final class Message extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:temporal.api.protocol.v1.Message)
MessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Message.newBuilder() to construct.
private Message(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Message() {
id_ = "";
protocolInstanceId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Message();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Message(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.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 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
protocolInstanceId_ = s;
break;
}
case 24: {
sequencingIdCase_ = 3;
sequencingId_ = input.readInt64();
break;
}
case 32: {
sequencingIdCase_ = 4;
sequencingId_ = input.readInt64();
break;
}
case 42: {
com.google.protobuf.Any.Builder subBuilder = null;
if (body_ != null) {
subBuilder = body_.toBuilder();
}
body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(body_);
body_ = subBuilder.buildPartial();
}
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 io.temporal.api.protocol.v1.MessageProto.internal_static_temporal_api_protocol_v1_Message_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.protocol.v1.MessageProto.internal_static_temporal_api_protocol_v1_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.protocol.v1.Message.class, io.temporal.api.protocol.v1.Message.Builder.class);
}
private int sequencingIdCase_ = 0;
private java.lang.Object sequencingId_;
public enum SequencingIdCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
EVENT_ID(3),
COMMAND_INDEX(4),
SEQUENCINGID_NOT_SET(0);
private final int value;
private SequencingIdCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SequencingIdCase valueOf(int value) {
return forNumber(value);
}
public static SequencingIdCase forNumber(int value) {
switch (value) {
case 3: return EVENT_ID;
case 4: return COMMAND_INDEX;
case 0: return SEQUENCINGID_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SequencingIdCase
getSequencingIdCase() {
return SequencingIdCase.forNumber(
sequencingIdCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROTOCOL_INSTANCE_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object protocolInstanceId_;
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @return The protocolInstanceId.
*/
public java.lang.String getProtocolInstanceId() {
java.lang.Object ref = protocolInstanceId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
protocolInstanceId_ = s;
return s;
}
}
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @return The bytes for protocolInstanceId.
*/
public com.google.protobuf.ByteString
getProtocolInstanceIdBytes() {
java.lang.Object ref = protocolInstanceId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
protocolInstanceId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EVENT_ID_FIELD_NUMBER = 3;
/**
* int64 event_id = 3;
* @return The eventId.
*/
public long getEventId() {
if (sequencingIdCase_ == 3) {
return (java.lang.Long) sequencingId_;
}
return 0L;
}
public static final int COMMAND_INDEX_FIELD_NUMBER = 4;
/**
* int64 command_index = 4;
* @return The commandIndex.
*/
public long getCommandIndex() {
if (sequencingIdCase_ == 4) {
return (java.lang.Long) sequencingId_;
}
return 0L;
}
public static final int BODY_FIELD_NUMBER = 5;
private com.google.protobuf.Any body_;
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
* @return Whether the body field is set.
*/
public boolean hasBody() {
return body_ != null;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
* @return The body.
*/
public com.google.protobuf.Any getBody() {
return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() {
return getBody();
}
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 (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getProtocolInstanceIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, protocolInstanceId_);
}
if (sequencingIdCase_ == 3) {
output.writeInt64(
3, (long)((java.lang.Long) sequencingId_));
}
if (sequencingIdCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) sequencingId_));
}
if (body_ != null) {
output.writeMessage(5, getBody());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getProtocolInstanceIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, protocolInstanceId_);
}
if (sequencingIdCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
3, (long)((java.lang.Long) sequencingId_));
}
if (sequencingIdCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) sequencingId_));
}
if (body_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getBody());
}
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 io.temporal.api.protocol.v1.Message)) {
return super.equals(obj);
}
io.temporal.api.protocol.v1.Message other = (io.temporal.api.protocol.v1.Message) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getProtocolInstanceId()
.equals(other.getProtocolInstanceId())) return false;
if (hasBody() != other.hasBody()) return false;
if (hasBody()) {
if (!getBody()
.equals(other.getBody())) return false;
}
if (!getSequencingIdCase().equals(other.getSequencingIdCase())) return false;
switch (sequencingIdCase_) {
case 3:
if (getEventId()
!= other.getEventId()) return false;
break;
case 4:
if (getCommandIndex()
!= other.getCommandIndex()) return false;
break;
case 0:
default:
}
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();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + PROTOCOL_INSTANCE_ID_FIELD_NUMBER;
hash = (53 * hash) + getProtocolInstanceId().hashCode();
if (hasBody()) {
hash = (37 * hash) + BODY_FIELD_NUMBER;
hash = (53 * hash) + getBody().hashCode();
}
switch (sequencingIdCase_) {
case 3:
hash = (37 * hash) + EVENT_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEventId());
break;
case 4:
hash = (37 * hash) + COMMAND_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCommandIndex());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.temporal.api.protocol.v1.Message parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.protocol.v1.Message parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.protocol.v1.Message parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.protocol.v1.Message parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.protocol.v1.Message parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.protocol.v1.Message parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.protocol.v1.Message parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.protocol.v1.Message 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 io.temporal.api.protocol.v1.Message parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.temporal.api.protocol.v1.Message 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 io.temporal.api.protocol.v1.Message parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.protocol.v1.Message 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(io.temporal.api.protocol.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.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* (-- api-linter: core::0146::any=disabled
* aip.dev/not-precedent: We want runtime extensibility for the body field --)
*
*
* Protobuf type {@code temporal.api.protocol.v1.Message}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:temporal.api.protocol.v1.Message)
io.temporal.api.protocol.v1.MessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.temporal.api.protocol.v1.MessageProto.internal_static_temporal_api_protocol_v1_Message_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.protocol.v1.MessageProto.internal_static_temporal_api_protocol_v1_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.protocol.v1.Message.class, io.temporal.api.protocol.v1.Message.Builder.class);
}
// Construct using io.temporal.api.protocol.v1.Message.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
protocolInstanceId_ = "";
if (bodyBuilder_ == null) {
body_ = null;
} else {
body_ = null;
bodyBuilder_ = null;
}
sequencingIdCase_ = 0;
sequencingId_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.temporal.api.protocol.v1.MessageProto.internal_static_temporal_api_protocol_v1_Message_descriptor;
}
@java.lang.Override
public io.temporal.api.protocol.v1.Message getDefaultInstanceForType() {
return io.temporal.api.protocol.v1.Message.getDefaultInstance();
}
@java.lang.Override
public io.temporal.api.protocol.v1.Message build() {
io.temporal.api.protocol.v1.Message result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.temporal.api.protocol.v1.Message buildPartial() {
io.temporal.api.protocol.v1.Message result = new io.temporal.api.protocol.v1.Message(this);
result.id_ = id_;
result.protocolInstanceId_ = protocolInstanceId_;
if (sequencingIdCase_ == 3) {
result.sequencingId_ = sequencingId_;
}
if (sequencingIdCase_ == 4) {
result.sequencingId_ = sequencingId_;
}
if (bodyBuilder_ == null) {
result.body_ = body_;
} else {
result.body_ = bodyBuilder_.build();
}
result.sequencingIdCase_ = sequencingIdCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
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.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.temporal.api.protocol.v1.Message) {
return mergeFrom((io.temporal.api.protocol.v1.Message)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.temporal.api.protocol.v1.Message other) {
if (other == io.temporal.api.protocol.v1.Message.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getProtocolInstanceId().isEmpty()) {
protocolInstanceId_ = other.protocolInstanceId_;
onChanged();
}
if (other.hasBody()) {
mergeBody(other.getBody());
}
switch (other.getSequencingIdCase()) {
case EVENT_ID: {
setEventId(other.getEventId());
break;
}
case COMMAND_INDEX: {
setCommandIndex(other.getCommandIndex());
break;
}
case SEQUENCINGID_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
io.temporal.api.protocol.v1.Message parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.temporal.api.protocol.v1.Message) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int sequencingIdCase_ = 0;
private java.lang.Object sequencingId_;
public SequencingIdCase
getSequencingIdCase() {
return SequencingIdCase.forNumber(
sequencingIdCase_);
}
public Builder clearSequencingId() {
sequencingIdCase_ = 0;
sequencingId_ = null;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* An ID for this specific message.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object protocolInstanceId_ = "";
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @return The protocolInstanceId.
*/
public java.lang.String getProtocolInstanceId() {
java.lang.Object ref = protocolInstanceId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
protocolInstanceId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @return The bytes for protocolInstanceId.
*/
public com.google.protobuf.ByteString
getProtocolInstanceIdBytes() {
java.lang.Object ref = protocolInstanceId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
protocolInstanceId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @param value The protocolInstanceId to set.
* @return This builder for chaining.
*/
public Builder setProtocolInstanceId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
protocolInstanceId_ = value;
onChanged();
return this;
}
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @return This builder for chaining.
*/
public Builder clearProtocolInstanceId() {
protocolInstanceId_ = getDefaultInstance().getProtocolInstanceId();
onChanged();
return this;
}
/**
*
* Identifies the specific instance of a protocol to which this message
* belongs.
*
*
* string protocol_instance_id = 2;
* @param value The bytes for protocolInstanceId to set.
* @return This builder for chaining.
*/
public Builder setProtocolInstanceIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
protocolInstanceId_ = value;
onChanged();
return this;
}
/**
* int64 event_id = 3;
* @return The eventId.
*/
public long getEventId() {
if (sequencingIdCase_ == 3) {
return (java.lang.Long) sequencingId_;
}
return 0L;
}
/**
* int64 event_id = 3;
* @param value The eventId to set.
* @return This builder for chaining.
*/
public Builder setEventId(long value) {
sequencingIdCase_ = 3;
sequencingId_ = value;
onChanged();
return this;
}
/**
* int64 event_id = 3;
* @return This builder for chaining.
*/
public Builder clearEventId() {
if (sequencingIdCase_ == 3) {
sequencingIdCase_ = 0;
sequencingId_ = null;
onChanged();
}
return this;
}
/**
* int64 command_index = 4;
* @return The commandIndex.
*/
public long getCommandIndex() {
if (sequencingIdCase_ == 4) {
return (java.lang.Long) sequencingId_;
}
return 0L;
}
/**
* int64 command_index = 4;
* @param value The commandIndex to set.
* @return This builder for chaining.
*/
public Builder setCommandIndex(long value) {
sequencingIdCase_ = 4;
sequencingId_ = value;
onChanged();
return this;
}
/**
* int64 command_index = 4;
* @return This builder for chaining.
*/
public Builder clearCommandIndex() {
if (sequencingIdCase_ == 4) {
sequencingIdCase_ = 0;
sequencingId_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.Any body_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_;
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
* @return Whether the body field is set.
*/
public boolean hasBody() {
return bodyBuilder_ != null || body_ != null;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
* @return The body.
*/
public com.google.protobuf.Any getBody() {
if (bodyBuilder_ == null) {
return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_;
} else {
return bodyBuilder_.getMessage();
}
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public Builder setBody(com.google.protobuf.Any value) {
if (bodyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
onChanged();
} else {
bodyBuilder_.setMessage(value);
}
return this;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public Builder setBody(
com.google.protobuf.Any.Builder builderForValue) {
if (bodyBuilder_ == null) {
body_ = builderForValue.build();
onChanged();
} else {
bodyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public Builder mergeBody(com.google.protobuf.Any value) {
if (bodyBuilder_ == null) {
if (body_ != null) {
body_ =
com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial();
} else {
body_ = value;
}
onChanged();
} else {
bodyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public Builder clearBody() {
if (bodyBuilder_ == null) {
body_ = null;
onChanged();
} else {
body_ = null;
bodyBuilder_ = null;
}
return this;
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public com.google.protobuf.Any.Builder getBodyBuilder() {
onChanged();
return getBodyFieldBuilder().getBuilder();
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() {
if (bodyBuilder_ != null) {
return bodyBuilder_.getMessageOrBuilder();
} else {
return body_ == null ?
com.google.protobuf.Any.getDefaultInstance() : body_;
}
}
/**
*
* The opaque data carried by this message. The protocol type can be
* extracted from the package name of the message carried inside the Any.
*
*
* .google.protobuf.Any body = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getBodyFieldBuilder() {
if (bodyBuilder_ == null) {
bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
getBody(),
getParentForChildren(),
isClean());
body_ = null;
}
return bodyBuilder_;
}
@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:temporal.api.protocol.v1.Message)
}
// @@protoc_insertion_point(class_scope:temporal.api.protocol.v1.Message)
private static final io.temporal.api.protocol.v1.Message DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.temporal.api.protocol.v1.Message();
}
public static io.temporal.api.protocol.v1.Message getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Message parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Message(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.temporal.api.protocol.v1.Message getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy