io.temporal.api.nexus.v1.Request Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: temporal/api/nexus/v1/message.proto
package io.temporal.api.nexus.v1;
/**
*
* A Nexus request.
*
*
* Protobuf type {@code temporal.api.nexus.v1.Request}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:Request.java.pb.meta")
public final class Request extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:temporal.api.nexus.v1.Request)
RequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use Request.newBuilder() to construct.
private Request(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Request() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Request();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Request(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
header_ = com.google.protobuf.MapField.newMapField(
HeaderDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
header__ = input.readMessage(
HeaderDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
header_.getMutableMap().put(
header__.getKey(), header__.getValue());
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (scheduledTime_ != null) {
subBuilder = scheduledTime_.toBuilder();
}
scheduledTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scheduledTime_);
scheduledTime_ = subBuilder.buildPartial();
}
break;
}
case 26: {
io.temporal.api.nexus.v1.StartOperationRequest.Builder subBuilder = null;
if (variantCase_ == 3) {
subBuilder = ((io.temporal.api.nexus.v1.StartOperationRequest) variant_).toBuilder();
}
variant_ =
input.readMessage(io.temporal.api.nexus.v1.StartOperationRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.temporal.api.nexus.v1.StartOperationRequest) variant_);
variant_ = subBuilder.buildPartial();
}
variantCase_ = 3;
break;
}
case 34: {
io.temporal.api.nexus.v1.CancelOperationRequest.Builder subBuilder = null;
if (variantCase_ == 4) {
subBuilder = ((io.temporal.api.nexus.v1.CancelOperationRequest) variant_).toBuilder();
}
variant_ =
input.readMessage(io.temporal.api.nexus.v1.CancelOperationRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.temporal.api.nexus.v1.CancelOperationRequest) variant_);
variant_ = subBuilder.buildPartial();
}
variantCase_ = 4;
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.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetHeader();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.nexus.v1.Request.class, io.temporal.api.nexus.v1.Request.Builder.class);
}
private int variantCase_ = 0;
private java.lang.Object variant_;
public enum VariantCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
START_OPERATION(3),
CANCEL_OPERATION(4),
VARIANT_NOT_SET(0);
private final int value;
private VariantCase(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 VariantCase valueOf(int value) {
return forNumber(value);
}
public static VariantCase forNumber(int value) {
switch (value) {
case 3: return START_OPERATION;
case 4: return CANCEL_OPERATION;
case 0: return VARIANT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public VariantCase
getVariantCase() {
return VariantCase.forNumber(
variantCase_);
}
public static final int HEADER_FIELD_NUMBER = 1;
private static final class HeaderDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.temporal.api.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_HeaderEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> header_;
private com.google.protobuf.MapField
internalGetHeader() {
if (header_ == null) {
return com.google.protobuf.MapField.emptyMapField(
HeaderDefaultEntryHolder.defaultEntry);
}
return header_;
}
public int getHeaderCount() {
return internalGetHeader().getMap().size();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public boolean containsHeader(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetHeader().getMap().containsKey(key);
}
/**
* Use {@link #getHeaderMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getHeader() {
return getHeaderMap();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.util.Map getHeaderMap() {
return internalGetHeader().getMap();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.lang.String getHeaderOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHeader().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.lang.String getHeaderOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHeader().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SCHEDULED_TIME_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp scheduledTime_;
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
* @return Whether the scheduledTime field is set.
*/
public boolean hasScheduledTime() {
return scheduledTime_ != null;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
* @return The scheduledTime.
*/
public com.google.protobuf.Timestamp getScheduledTime() {
return scheduledTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduledTime_;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public com.google.protobuf.TimestampOrBuilder getScheduledTimeOrBuilder() {
return getScheduledTime();
}
public static final int START_OPERATION_FIELD_NUMBER = 3;
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
* @return Whether the startOperation field is set.
*/
public boolean hasStartOperation() {
return variantCase_ == 3;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
* @return The startOperation.
*/
public io.temporal.api.nexus.v1.StartOperationRequest getStartOperation() {
if (variantCase_ == 3) {
return (io.temporal.api.nexus.v1.StartOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public io.temporal.api.nexus.v1.StartOperationRequestOrBuilder getStartOperationOrBuilder() {
if (variantCase_ == 3) {
return (io.temporal.api.nexus.v1.StartOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
}
public static final int CANCEL_OPERATION_FIELD_NUMBER = 4;
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
* @return Whether the cancelOperation field is set.
*/
public boolean hasCancelOperation() {
return variantCase_ == 4;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
* @return The cancelOperation.
*/
public io.temporal.api.nexus.v1.CancelOperationRequest getCancelOperation() {
if (variantCase_ == 4) {
return (io.temporal.api.nexus.v1.CancelOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public io.temporal.api.nexus.v1.CancelOperationRequestOrBuilder getCancelOperationOrBuilder() {
if (variantCase_ == 4) {
return (io.temporal.api.nexus.v1.CancelOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetHeader(),
HeaderDefaultEntryHolder.defaultEntry,
1);
if (scheduledTime_ != null) {
output.writeMessage(2, getScheduledTime());
}
if (variantCase_ == 3) {
output.writeMessage(3, (io.temporal.api.nexus.v1.StartOperationRequest) variant_);
}
if (variantCase_ == 4) {
output.writeMessage(4, (io.temporal.api.nexus.v1.CancelOperationRequest) variant_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetHeader().getMap().entrySet()) {
com.google.protobuf.MapEntry
header__ = HeaderDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, header__);
}
if (scheduledTime_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getScheduledTime());
}
if (variantCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.temporal.api.nexus.v1.StartOperationRequest) variant_);
}
if (variantCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (io.temporal.api.nexus.v1.CancelOperationRequest) variant_);
}
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.nexus.v1.Request)) {
return super.equals(obj);
}
io.temporal.api.nexus.v1.Request other = (io.temporal.api.nexus.v1.Request) obj;
if (!internalGetHeader().equals(
other.internalGetHeader())) return false;
if (hasScheduledTime() != other.hasScheduledTime()) return false;
if (hasScheduledTime()) {
if (!getScheduledTime()
.equals(other.getScheduledTime())) return false;
}
if (!getVariantCase().equals(other.getVariantCase())) return false;
switch (variantCase_) {
case 3:
if (!getStartOperation()
.equals(other.getStartOperation())) return false;
break;
case 4:
if (!getCancelOperation()
.equals(other.getCancelOperation())) 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();
if (!internalGetHeader().getMap().isEmpty()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + internalGetHeader().hashCode();
}
if (hasScheduledTime()) {
hash = (37 * hash) + SCHEDULED_TIME_FIELD_NUMBER;
hash = (53 * hash) + getScheduledTime().hashCode();
}
switch (variantCase_) {
case 3:
hash = (37 * hash) + START_OPERATION_FIELD_NUMBER;
hash = (53 * hash) + getStartOperation().hashCode();
break;
case 4:
hash = (37 * hash) + CANCEL_OPERATION_FIELD_NUMBER;
hash = (53 * hash) + getCancelOperation().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.temporal.api.nexus.v1.Request parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.nexus.v1.Request 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.nexus.v1.Request parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.nexus.v1.Request 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.nexus.v1.Request parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.nexus.v1.Request parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.nexus.v1.Request parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.nexus.v1.Request 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.nexus.v1.Request parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.temporal.api.nexus.v1.Request 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.nexus.v1.Request parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.nexus.v1.Request 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.nexus.v1.Request 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;
}
/**
*
* A Nexus request.
*
*
* Protobuf type {@code temporal.api.nexus.v1.Request}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:temporal.api.nexus.v1.Request)
io.temporal.api.nexus.v1.RequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.temporal.api.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetHeader();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableHeader();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.nexus.v1.Request.class, io.temporal.api.nexus.v1.Request.Builder.class);
}
// Construct using io.temporal.api.nexus.v1.Request.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();
internalGetMutableHeader().clear();
if (scheduledTimeBuilder_ == null) {
scheduledTime_ = null;
} else {
scheduledTime_ = null;
scheduledTimeBuilder_ = null;
}
variantCase_ = 0;
variant_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.temporal.api.nexus.v1.MessageProto.internal_static_temporal_api_nexus_v1_Request_descriptor;
}
@java.lang.Override
public io.temporal.api.nexus.v1.Request getDefaultInstanceForType() {
return io.temporal.api.nexus.v1.Request.getDefaultInstance();
}
@java.lang.Override
public io.temporal.api.nexus.v1.Request build() {
io.temporal.api.nexus.v1.Request result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.temporal.api.nexus.v1.Request buildPartial() {
io.temporal.api.nexus.v1.Request result = new io.temporal.api.nexus.v1.Request(this);
int from_bitField0_ = bitField0_;
result.header_ = internalGetHeader();
result.header_.makeImmutable();
if (scheduledTimeBuilder_ == null) {
result.scheduledTime_ = scheduledTime_;
} else {
result.scheduledTime_ = scheduledTimeBuilder_.build();
}
if (variantCase_ == 3) {
if (startOperationBuilder_ == null) {
result.variant_ = variant_;
} else {
result.variant_ = startOperationBuilder_.build();
}
}
if (variantCase_ == 4) {
if (cancelOperationBuilder_ == null) {
result.variant_ = variant_;
} else {
result.variant_ = cancelOperationBuilder_.build();
}
}
result.variantCase_ = variantCase_;
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.nexus.v1.Request) {
return mergeFrom((io.temporal.api.nexus.v1.Request)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.temporal.api.nexus.v1.Request other) {
if (other == io.temporal.api.nexus.v1.Request.getDefaultInstance()) return this;
internalGetMutableHeader().mergeFrom(
other.internalGetHeader());
if (other.hasScheduledTime()) {
mergeScheduledTime(other.getScheduledTime());
}
switch (other.getVariantCase()) {
case START_OPERATION: {
mergeStartOperation(other.getStartOperation());
break;
}
case CANCEL_OPERATION: {
mergeCancelOperation(other.getCancelOperation());
break;
}
case VARIANT_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.nexus.v1.Request parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.temporal.api.nexus.v1.Request) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int variantCase_ = 0;
private java.lang.Object variant_;
public VariantCase
getVariantCase() {
return VariantCase.forNumber(
variantCase_);
}
public Builder clearVariant() {
variantCase_ = 0;
variant_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> header_;
private com.google.protobuf.MapField
internalGetHeader() {
if (header_ == null) {
return com.google.protobuf.MapField.emptyMapField(
HeaderDefaultEntryHolder.defaultEntry);
}
return header_;
}
private com.google.protobuf.MapField
internalGetMutableHeader() {
onChanged();;
if (header_ == null) {
header_ = com.google.protobuf.MapField.newMapField(
HeaderDefaultEntryHolder.defaultEntry);
}
if (!header_.isMutable()) {
header_ = header_.copy();
}
return header_;
}
public int getHeaderCount() {
return internalGetHeader().getMap().size();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public boolean containsHeader(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetHeader().getMap().containsKey(key);
}
/**
* Use {@link #getHeaderMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getHeader() {
return getHeaderMap();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.util.Map getHeaderMap() {
return internalGetHeader().getMap();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.lang.String getHeaderOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHeader().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public java.lang.String getHeaderOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHeader().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearHeader() {
internalGetMutableHeader().getMutableMap()
.clear();
return this;
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public Builder removeHeader(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableHeader().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableHeader() {
return internalGetMutableHeader().getMutableMap();
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public Builder putHeader(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableHeader().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Headers extracted from the original request in the Temporal frontend.
* When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
*
*
* map<string, string> header = 1;
*/
public Builder putAllHeader(
java.util.Map values) {
internalGetMutableHeader().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.Timestamp scheduledTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduledTimeBuilder_;
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
* @return Whether the scheduledTime field is set.
*/
public boolean hasScheduledTime() {
return scheduledTimeBuilder_ != null || scheduledTime_ != null;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
* @return The scheduledTime.
*/
public com.google.protobuf.Timestamp getScheduledTime() {
if (scheduledTimeBuilder_ == null) {
return scheduledTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduledTime_;
} else {
return scheduledTimeBuilder_.getMessage();
}
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public Builder setScheduledTime(com.google.protobuf.Timestamp value) {
if (scheduledTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scheduledTime_ = value;
onChanged();
} else {
scheduledTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public Builder setScheduledTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (scheduledTimeBuilder_ == null) {
scheduledTime_ = builderForValue.build();
onChanged();
} else {
scheduledTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public Builder mergeScheduledTime(com.google.protobuf.Timestamp value) {
if (scheduledTimeBuilder_ == null) {
if (scheduledTime_ != null) {
scheduledTime_ =
com.google.protobuf.Timestamp.newBuilder(scheduledTime_).mergeFrom(value).buildPartial();
} else {
scheduledTime_ = value;
}
onChanged();
} else {
scheduledTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public Builder clearScheduledTime() {
if (scheduledTimeBuilder_ == null) {
scheduledTime_ = null;
onChanged();
} else {
scheduledTime_ = null;
scheduledTimeBuilder_ = null;
}
return this;
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public com.google.protobuf.Timestamp.Builder getScheduledTimeBuilder() {
onChanged();
return getScheduledTimeFieldBuilder().getBuilder();
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
public com.google.protobuf.TimestampOrBuilder getScheduledTimeOrBuilder() {
if (scheduledTimeBuilder_ != null) {
return scheduledTimeBuilder_.getMessageOrBuilder();
} else {
return scheduledTime_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : scheduledTime_;
}
}
/**
*
* The timestamp when the request was scheduled in the frontend.
* (-- api-linter: core::0142::time-field-names=disabled
* aip.dev/not-precedent: Not following linter rules. --)
*
*
* .google.protobuf.Timestamp scheduled_time = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getScheduledTimeFieldBuilder() {
if (scheduledTimeBuilder_ == null) {
scheduledTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getScheduledTime(),
getParentForChildren(),
isClean());
scheduledTime_ = null;
}
return scheduledTimeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.StartOperationRequest, io.temporal.api.nexus.v1.StartOperationRequest.Builder, io.temporal.api.nexus.v1.StartOperationRequestOrBuilder> startOperationBuilder_;
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
* @return Whether the startOperation field is set.
*/
public boolean hasStartOperation() {
return variantCase_ == 3;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
* @return The startOperation.
*/
public io.temporal.api.nexus.v1.StartOperationRequest getStartOperation() {
if (startOperationBuilder_ == null) {
if (variantCase_ == 3) {
return (io.temporal.api.nexus.v1.StartOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
} else {
if (variantCase_ == 3) {
return startOperationBuilder_.getMessage();
}
return io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
}
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public Builder setStartOperation(io.temporal.api.nexus.v1.StartOperationRequest value) {
if (startOperationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
variant_ = value;
onChanged();
} else {
startOperationBuilder_.setMessage(value);
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public Builder setStartOperation(
io.temporal.api.nexus.v1.StartOperationRequest.Builder builderForValue) {
if (startOperationBuilder_ == null) {
variant_ = builderForValue.build();
onChanged();
} else {
startOperationBuilder_.setMessage(builderForValue.build());
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public Builder mergeStartOperation(io.temporal.api.nexus.v1.StartOperationRequest value) {
if (startOperationBuilder_ == null) {
if (variantCase_ == 3 &&
variant_ != io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance()) {
variant_ = io.temporal.api.nexus.v1.StartOperationRequest.newBuilder((io.temporal.api.nexus.v1.StartOperationRequest) variant_)
.mergeFrom(value).buildPartial();
} else {
variant_ = value;
}
onChanged();
} else {
if (variantCase_ == 3) {
startOperationBuilder_.mergeFrom(value);
}
startOperationBuilder_.setMessage(value);
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public Builder clearStartOperation() {
if (startOperationBuilder_ == null) {
if (variantCase_ == 3) {
variantCase_ = 0;
variant_ = null;
onChanged();
}
} else {
if (variantCase_ == 3) {
variantCase_ = 0;
variant_ = null;
}
startOperationBuilder_.clear();
}
return this;
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public io.temporal.api.nexus.v1.StartOperationRequest.Builder getStartOperationBuilder() {
return getStartOperationFieldBuilder().getBuilder();
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
public io.temporal.api.nexus.v1.StartOperationRequestOrBuilder getStartOperationOrBuilder() {
if ((variantCase_ == 3) && (startOperationBuilder_ != null)) {
return startOperationBuilder_.getMessageOrBuilder();
} else {
if (variantCase_ == 3) {
return (io.temporal.api.nexus.v1.StartOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
}
}
/**
* .temporal.api.nexus.v1.StartOperationRequest start_operation = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.StartOperationRequest, io.temporal.api.nexus.v1.StartOperationRequest.Builder, io.temporal.api.nexus.v1.StartOperationRequestOrBuilder>
getStartOperationFieldBuilder() {
if (startOperationBuilder_ == null) {
if (!(variantCase_ == 3)) {
variant_ = io.temporal.api.nexus.v1.StartOperationRequest.getDefaultInstance();
}
startOperationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.StartOperationRequest, io.temporal.api.nexus.v1.StartOperationRequest.Builder, io.temporal.api.nexus.v1.StartOperationRequestOrBuilder>(
(io.temporal.api.nexus.v1.StartOperationRequest) variant_,
getParentForChildren(),
isClean());
variant_ = null;
}
variantCase_ = 3;
onChanged();;
return startOperationBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.CancelOperationRequest, io.temporal.api.nexus.v1.CancelOperationRequest.Builder, io.temporal.api.nexus.v1.CancelOperationRequestOrBuilder> cancelOperationBuilder_;
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
* @return Whether the cancelOperation field is set.
*/
public boolean hasCancelOperation() {
return variantCase_ == 4;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
* @return The cancelOperation.
*/
public io.temporal.api.nexus.v1.CancelOperationRequest getCancelOperation() {
if (cancelOperationBuilder_ == null) {
if (variantCase_ == 4) {
return (io.temporal.api.nexus.v1.CancelOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
} else {
if (variantCase_ == 4) {
return cancelOperationBuilder_.getMessage();
}
return io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
}
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public Builder setCancelOperation(io.temporal.api.nexus.v1.CancelOperationRequest value) {
if (cancelOperationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
variant_ = value;
onChanged();
} else {
cancelOperationBuilder_.setMessage(value);
}
variantCase_ = 4;
return this;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public Builder setCancelOperation(
io.temporal.api.nexus.v1.CancelOperationRequest.Builder builderForValue) {
if (cancelOperationBuilder_ == null) {
variant_ = builderForValue.build();
onChanged();
} else {
cancelOperationBuilder_.setMessage(builderForValue.build());
}
variantCase_ = 4;
return this;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public Builder mergeCancelOperation(io.temporal.api.nexus.v1.CancelOperationRequest value) {
if (cancelOperationBuilder_ == null) {
if (variantCase_ == 4 &&
variant_ != io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance()) {
variant_ = io.temporal.api.nexus.v1.CancelOperationRequest.newBuilder((io.temporal.api.nexus.v1.CancelOperationRequest) variant_)
.mergeFrom(value).buildPartial();
} else {
variant_ = value;
}
onChanged();
} else {
if (variantCase_ == 4) {
cancelOperationBuilder_.mergeFrom(value);
}
cancelOperationBuilder_.setMessage(value);
}
variantCase_ = 4;
return this;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public Builder clearCancelOperation() {
if (cancelOperationBuilder_ == null) {
if (variantCase_ == 4) {
variantCase_ = 0;
variant_ = null;
onChanged();
}
} else {
if (variantCase_ == 4) {
variantCase_ = 0;
variant_ = null;
}
cancelOperationBuilder_.clear();
}
return this;
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public io.temporal.api.nexus.v1.CancelOperationRequest.Builder getCancelOperationBuilder() {
return getCancelOperationFieldBuilder().getBuilder();
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
public io.temporal.api.nexus.v1.CancelOperationRequestOrBuilder getCancelOperationOrBuilder() {
if ((variantCase_ == 4) && (cancelOperationBuilder_ != null)) {
return cancelOperationBuilder_.getMessageOrBuilder();
} else {
if (variantCase_ == 4) {
return (io.temporal.api.nexus.v1.CancelOperationRequest) variant_;
}
return io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
}
}
/**
* .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.CancelOperationRequest, io.temporal.api.nexus.v1.CancelOperationRequest.Builder, io.temporal.api.nexus.v1.CancelOperationRequestOrBuilder>
getCancelOperationFieldBuilder() {
if (cancelOperationBuilder_ == null) {
if (!(variantCase_ == 4)) {
variant_ = io.temporal.api.nexus.v1.CancelOperationRequest.getDefaultInstance();
}
cancelOperationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.nexus.v1.CancelOperationRequest, io.temporal.api.nexus.v1.CancelOperationRequest.Builder, io.temporal.api.nexus.v1.CancelOperationRequestOrBuilder>(
(io.temporal.api.nexus.v1.CancelOperationRequest) variant_,
getParentForChildren(),
isClean());
variant_ = null;
}
variantCase_ = 4;
onChanged();;
return cancelOperationBuilder_;
}
@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.nexus.v1.Request)
}
// @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Request)
private static final io.temporal.api.nexus.v1.Request DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.temporal.api.nexus.v1.Request();
}
public static io.temporal.api.nexus.v1.Request getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Request parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Request(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.nexus.v1.Request getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy