io.temporal.api.common.v1.Callback Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: temporal/api/common/v1/message.proto
package io.temporal.api.common.v1;
/**
*
* Callback to attach to various events in the system, e.g. workflow run completion.
*
*
* Protobuf type {@code temporal.api.common.v1.Callback}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:Callback.java.pb.meta")
public final class Callback extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:temporal.api.common.v1.Callback)
CallbackOrBuilder {
private static final long serialVersionUID = 0L;
// Use Callback.newBuilder() to construct.
private Callback(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Callback() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Callback();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Callback(
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 18: {
io.temporal.api.common.v1.Callback.Nexus.Builder subBuilder = null;
if (variantCase_ == 2) {
subBuilder = ((io.temporal.api.common.v1.Callback.Nexus) variant_).toBuilder();
}
variant_ =
input.readMessage(io.temporal.api.common.v1.Callback.Nexus.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.temporal.api.common.v1.Callback.Nexus) variant_);
variant_ = subBuilder.buildPartial();
}
variantCase_ = 2;
break;
}
case 26: {
io.temporal.api.common.v1.Callback.Internal.Builder subBuilder = null;
if (variantCase_ == 3) {
subBuilder = ((io.temporal.api.common.v1.Callback.Internal) variant_).toBuilder();
}
variant_ =
input.readMessage(io.temporal.api.common.v1.Callback.Internal.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.temporal.api.common.v1.Callback.Internal) variant_);
variant_ = subBuilder.buildPartial();
}
variantCase_ = 3;
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.class, io.temporal.api.common.v1.Callback.Builder.class);
}
public interface NexusOrBuilder extends
// @@protoc_insertion_point(interface_extends:temporal.api.common.v1.Callback.Nexus)
com.google.protobuf.MessageOrBuilder {
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
int getHeaderCount();
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
boolean containsHeader(
java.lang.String key);
/**
* Use {@link #getHeaderMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getHeader();
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
java.util.Map
getHeaderMap();
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
java.lang.String getHeaderOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
java.lang.String getHeaderOrThrow(
java.lang.String key);
}
/**
* Protobuf type {@code temporal.api.common.v1.Callback.Nexus}
*/
public static final class Nexus extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:temporal.api.common.v1.Callback.Nexus)
NexusOrBuilder {
private static final long serialVersionUID = 0L;
// Use Nexus.newBuilder() to construct.
private Nexus(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Nexus() {
url_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Nexus();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Nexus(
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: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
case 18: {
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;
}
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.Nexus.class, io.temporal.api.common.v1.Callback.Nexus.Builder.class);
}
public static final int URL_FIELD_NUMBER = 1;
private volatile java.lang.Object url_;
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
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();
url_ = s;
return s;
}
}
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HEADER_FIELD_NUMBER = 2;
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_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();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
public java.util.Map getHeaderMap() {
return internalGetHeader().getMap();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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;
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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);
}
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 (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetHeader(),
HeaderDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
}
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(2, header__);
}
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.common.v1.Callback.Nexus)) {
return super.equals(obj);
}
io.temporal.api.common.v1.Callback.Nexus other = (io.temporal.api.common.v1.Callback.Nexus) obj;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!internalGetHeader().equals(
other.internalGetHeader())) 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();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
if (!internalGetHeader().getMap().isEmpty()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + internalGetHeader().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.temporal.api.common.v1.Callback.Nexus parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Nexus 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.common.v1.Callback.Nexus parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Nexus 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.common.v1.Callback.Nexus parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Nexus parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.common.v1.Callback.Nexus parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Nexus 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.common.v1.Callback.Nexus parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Nexus 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.common.v1.Callback.Nexus parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Nexus 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.common.v1.Callback.Nexus 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;
}
/**
* Protobuf type {@code temporal.api.common.v1.Callback.Nexus}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:temporal.api.common.v1.Callback.Nexus)
io.temporal.api.common.v1.Callback.NexusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetHeader();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.Nexus.class, io.temporal.api.common.v1.Callback.Nexus.Builder.class);
}
// Construct using io.temporal.api.common.v1.Callback.Nexus.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();
url_ = "";
internalGetMutableHeader().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Nexus_descriptor;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Nexus getDefaultInstanceForType() {
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Nexus build() {
io.temporal.api.common.v1.Callback.Nexus result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Nexus buildPartial() {
io.temporal.api.common.v1.Callback.Nexus result = new io.temporal.api.common.v1.Callback.Nexus(this);
int from_bitField0_ = bitField0_;
result.url_ = url_;
result.header_ = internalGetHeader();
result.header_.makeImmutable();
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.common.v1.Callback.Nexus) {
return mergeFrom((io.temporal.api.common.v1.Callback.Nexus)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.temporal.api.common.v1.Callback.Nexus other) {
if (other == io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance()) return this;
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
internalGetMutableHeader().mergeFrom(
other.internalGetHeader());
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.common.v1.Callback.Nexus parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.temporal.api.common.v1.Callback.Nexus) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object url_ = "";
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Callback URL.
*
*
* string url = 1;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Callback URL.
*
*
* string url = 1;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* Callback URL.
*
*
* string url = 1;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* Callback URL.
*
*
* string url = 1;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
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();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
public java.util.Map getHeaderMap() {
return internalGetHeader().getMap();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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;
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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;
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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();
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
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;
}
/**
*
* Header to attach to callback request.
*
*
* map<string, string> header = 2;
*/
public Builder putAllHeader(
java.util.Map values) {
internalGetMutableHeader().getMutableMap()
.putAll(values);
return this;
}
@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.common.v1.Callback.Nexus)
}
// @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback.Nexus)
private static final io.temporal.api.common.v1.Callback.Nexus DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.temporal.api.common.v1.Callback.Nexus();
}
public static io.temporal.api.common.v1.Callback.Nexus getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Nexus parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Nexus(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.common.v1.Callback.Nexus getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface InternalOrBuilder extends
// @@protoc_insertion_point(interface_extends:temporal.api.common.v1.Callback.Internal)
com.google.protobuf.MessageOrBuilder {
/**
*
* Opaque internal data.
*
*
* bytes data = 1;
* @return The data.
*/
com.google.protobuf.ByteString getData();
}
/**
*
* Callbacks to be delivered internally within the system.
* This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.
* The only reason that this is exposed is because callbacks are replicated across clusters via the
* WorkflowExecutionStarted event, which is defined in the public API.
*
*
* Protobuf type {@code temporal.api.common.v1.Callback.Internal}
*/
public static final class Internal extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:temporal.api.common.v1.Callback.Internal)
InternalOrBuilder {
private static final long serialVersionUID = 0L;
// Use Internal.newBuilder() to construct.
private Internal(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Internal() {
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Internal();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Internal(
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: {
data_ = input.readBytes();
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.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Internal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Internal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.Internal.class, io.temporal.api.common.v1.Callback.Internal.Builder.class);
}
public static final int DATA_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString data_;
/**
*
* Opaque internal data.
*
*
* bytes data = 1;
* @return The data.
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
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 (!data_.isEmpty()) {
output.writeBytes(1, data_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, data_);
}
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.common.v1.Callback.Internal)) {
return super.equals(obj);
}
io.temporal.api.common.v1.Callback.Internal other = (io.temporal.api.common.v1.Callback.Internal) obj;
if (!getData()
.equals(other.getData())) 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();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.temporal.api.common.v1.Callback.Internal parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Internal 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.common.v1.Callback.Internal parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Internal 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.common.v1.Callback.Internal parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback.Internal parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.common.v1.Callback.Internal parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Internal 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.common.v1.Callback.Internal parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Internal 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.common.v1.Callback.Internal parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback.Internal 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.common.v1.Callback.Internal 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;
}
/**
*
* Callbacks to be delivered internally within the system.
* This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.
* The only reason that this is exposed is because callbacks are replicated across clusters via the
* WorkflowExecutionStarted event, which is defined in the public API.
*
*
* Protobuf type {@code temporal.api.common.v1.Callback.Internal}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:temporal.api.common.v1.Callback.Internal)
io.temporal.api.common.v1.Callback.InternalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Internal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Internal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.Internal.class, io.temporal.api.common.v1.Callback.Internal.Builder.class);
}
// Construct using io.temporal.api.common.v1.Callback.Internal.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();
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_Internal_descriptor;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Internal getDefaultInstanceForType() {
return io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Internal build() {
io.temporal.api.common.v1.Callback.Internal result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback.Internal buildPartial() {
io.temporal.api.common.v1.Callback.Internal result = new io.temporal.api.common.v1.Callback.Internal(this);
result.data_ = data_;
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.common.v1.Callback.Internal) {
return mergeFrom((io.temporal.api.common.v1.Callback.Internal)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.temporal.api.common.v1.Callback.Internal other) {
if (other == io.temporal.api.common.v1.Callback.Internal.getDefaultInstance()) return this;
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
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.common.v1.Callback.Internal parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.temporal.api.common.v1.Callback.Internal) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Opaque internal data.
*
*
* bytes data = 1;
* @return The data.
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
*
* Opaque internal data.
*
*
* bytes data = 1;
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
*
* Opaque internal data.
*
*
* bytes data = 1;
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
@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.common.v1.Callback.Internal)
}
// @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback.Internal)
private static final io.temporal.api.common.v1.Callback.Internal DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.temporal.api.common.v1.Callback.Internal();
}
public static io.temporal.api.common.v1.Callback.Internal getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Internal parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Internal(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.common.v1.Callback.Internal getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int variantCase_ = 0;
private java.lang.Object variant_;
public enum VariantCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NEXUS(2),
INTERNAL(3),
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 2: return NEXUS;
case 3: return INTERNAL;
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 NEXUS_FIELD_NUMBER = 2;
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
* @return Whether the nexus field is set.
*/
public boolean hasNexus() {
return variantCase_ == 2;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
* @return The nexus.
*/
public io.temporal.api.common.v1.Callback.Nexus getNexus() {
if (variantCase_ == 2) {
return (io.temporal.api.common.v1.Callback.Nexus) variant_;
}
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public io.temporal.api.common.v1.Callback.NexusOrBuilder getNexusOrBuilder() {
if (variantCase_ == 2) {
return (io.temporal.api.common.v1.Callback.Nexus) variant_;
}
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
public static final int INTERNAL_FIELD_NUMBER = 3;
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
* @return Whether the internal field is set.
*/
public boolean hasInternal() {
return variantCase_ == 3;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
* @return The internal.
*/
public io.temporal.api.common.v1.Callback.Internal getInternal() {
if (variantCase_ == 3) {
return (io.temporal.api.common.v1.Callback.Internal) variant_;
}
return io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public io.temporal.api.common.v1.Callback.InternalOrBuilder getInternalOrBuilder() {
if (variantCase_ == 3) {
return (io.temporal.api.common.v1.Callback.Internal) variant_;
}
return io.temporal.api.common.v1.Callback.Internal.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 {
if (variantCase_ == 2) {
output.writeMessage(2, (io.temporal.api.common.v1.Callback.Nexus) variant_);
}
if (variantCase_ == 3) {
output.writeMessage(3, (io.temporal.api.common.v1.Callback.Internal) variant_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (variantCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.temporal.api.common.v1.Callback.Nexus) variant_);
}
if (variantCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.temporal.api.common.v1.Callback.Internal) 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.common.v1.Callback)) {
return super.equals(obj);
}
io.temporal.api.common.v1.Callback other = (io.temporal.api.common.v1.Callback) obj;
if (!getVariantCase().equals(other.getVariantCase())) return false;
switch (variantCase_) {
case 2:
if (!getNexus()
.equals(other.getNexus())) return false;
break;
case 3:
if (!getInternal()
.equals(other.getInternal())) 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();
switch (variantCase_) {
case 2:
hash = (37 * hash) + NEXUS_FIELD_NUMBER;
hash = (53 * hash) + getNexus().hashCode();
break;
case 3:
hash = (37 * hash) + INTERNAL_FIELD_NUMBER;
hash = (53 * hash) + getInternal().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.temporal.api.common.v1.Callback parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback 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.common.v1.Callback parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback 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.common.v1.Callback parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.temporal.api.common.v1.Callback parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.temporal.api.common.v1.Callback parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback 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.common.v1.Callback parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback 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.common.v1.Callback parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.temporal.api.common.v1.Callback 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.common.v1.Callback 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;
}
/**
*
* Callback to attach to various events in the system, e.g. workflow run completion.
*
*
* Protobuf type {@code temporal.api.common.v1.Callback}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:temporal.api.common.v1.Callback)
io.temporal.api.common.v1.CallbackOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.temporal.api.common.v1.Callback.class, io.temporal.api.common.v1.Callback.Builder.class);
}
// Construct using io.temporal.api.common.v1.Callback.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();
variantCase_ = 0;
variant_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_Callback_descriptor;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback getDefaultInstanceForType() {
return io.temporal.api.common.v1.Callback.getDefaultInstance();
}
@java.lang.Override
public io.temporal.api.common.v1.Callback build() {
io.temporal.api.common.v1.Callback result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.temporal.api.common.v1.Callback buildPartial() {
io.temporal.api.common.v1.Callback result = new io.temporal.api.common.v1.Callback(this);
if (variantCase_ == 2) {
if (nexusBuilder_ == null) {
result.variant_ = variant_;
} else {
result.variant_ = nexusBuilder_.build();
}
}
if (variantCase_ == 3) {
if (internalBuilder_ == null) {
result.variant_ = variant_;
} else {
result.variant_ = internalBuilder_.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.common.v1.Callback) {
return mergeFrom((io.temporal.api.common.v1.Callback)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.temporal.api.common.v1.Callback other) {
if (other == io.temporal.api.common.v1.Callback.getDefaultInstance()) return this;
switch (other.getVariantCase()) {
case NEXUS: {
mergeNexus(other.getNexus());
break;
}
case INTERNAL: {
mergeInternal(other.getInternal());
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.common.v1.Callback parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.temporal.api.common.v1.Callback) 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 com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Nexus, io.temporal.api.common.v1.Callback.Nexus.Builder, io.temporal.api.common.v1.Callback.NexusOrBuilder> nexusBuilder_;
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
* @return Whether the nexus field is set.
*/
public boolean hasNexus() {
return variantCase_ == 2;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
* @return The nexus.
*/
public io.temporal.api.common.v1.Callback.Nexus getNexus() {
if (nexusBuilder_ == null) {
if (variantCase_ == 2) {
return (io.temporal.api.common.v1.Callback.Nexus) variant_;
}
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
} else {
if (variantCase_ == 2) {
return nexusBuilder_.getMessage();
}
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public Builder setNexus(io.temporal.api.common.v1.Callback.Nexus value) {
if (nexusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
variant_ = value;
onChanged();
} else {
nexusBuilder_.setMessage(value);
}
variantCase_ = 2;
return this;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public Builder setNexus(
io.temporal.api.common.v1.Callback.Nexus.Builder builderForValue) {
if (nexusBuilder_ == null) {
variant_ = builderForValue.build();
onChanged();
} else {
nexusBuilder_.setMessage(builderForValue.build());
}
variantCase_ = 2;
return this;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public Builder mergeNexus(io.temporal.api.common.v1.Callback.Nexus value) {
if (nexusBuilder_ == null) {
if (variantCase_ == 2 &&
variant_ != io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance()) {
variant_ = io.temporal.api.common.v1.Callback.Nexus.newBuilder((io.temporal.api.common.v1.Callback.Nexus) variant_)
.mergeFrom(value).buildPartial();
} else {
variant_ = value;
}
onChanged();
} else {
if (variantCase_ == 2) {
nexusBuilder_.mergeFrom(value);
}
nexusBuilder_.setMessage(value);
}
variantCase_ = 2;
return this;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public Builder clearNexus() {
if (nexusBuilder_ == null) {
if (variantCase_ == 2) {
variantCase_ = 0;
variant_ = null;
onChanged();
}
} else {
if (variantCase_ == 2) {
variantCase_ = 0;
variant_ = null;
}
nexusBuilder_.clear();
}
return this;
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public io.temporal.api.common.v1.Callback.Nexus.Builder getNexusBuilder() {
return getNexusFieldBuilder().getBuilder();
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
public io.temporal.api.common.v1.Callback.NexusOrBuilder getNexusOrBuilder() {
if ((variantCase_ == 2) && (nexusBuilder_ != null)) {
return nexusBuilder_.getMessageOrBuilder();
} else {
if (variantCase_ == 2) {
return (io.temporal.api.common.v1.Callback.Nexus) variant_;
}
return io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
}
/**
* .temporal.api.common.v1.Callback.Nexus nexus = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Nexus, io.temporal.api.common.v1.Callback.Nexus.Builder, io.temporal.api.common.v1.Callback.NexusOrBuilder>
getNexusFieldBuilder() {
if (nexusBuilder_ == null) {
if (!(variantCase_ == 2)) {
variant_ = io.temporal.api.common.v1.Callback.Nexus.getDefaultInstance();
}
nexusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Nexus, io.temporal.api.common.v1.Callback.Nexus.Builder, io.temporal.api.common.v1.Callback.NexusOrBuilder>(
(io.temporal.api.common.v1.Callback.Nexus) variant_,
getParentForChildren(),
isClean());
variant_ = null;
}
variantCase_ = 2;
onChanged();;
return nexusBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Internal, io.temporal.api.common.v1.Callback.Internal.Builder, io.temporal.api.common.v1.Callback.InternalOrBuilder> internalBuilder_;
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
* @return Whether the internal field is set.
*/
public boolean hasInternal() {
return variantCase_ == 3;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
* @return The internal.
*/
public io.temporal.api.common.v1.Callback.Internal getInternal() {
if (internalBuilder_ == null) {
if (variantCase_ == 3) {
return (io.temporal.api.common.v1.Callback.Internal) variant_;
}
return io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
} else {
if (variantCase_ == 3) {
return internalBuilder_.getMessage();
}
return io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
}
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public Builder setInternal(io.temporal.api.common.v1.Callback.Internal value) {
if (internalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
variant_ = value;
onChanged();
} else {
internalBuilder_.setMessage(value);
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public Builder setInternal(
io.temporal.api.common.v1.Callback.Internal.Builder builderForValue) {
if (internalBuilder_ == null) {
variant_ = builderForValue.build();
onChanged();
} else {
internalBuilder_.setMessage(builderForValue.build());
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public Builder mergeInternal(io.temporal.api.common.v1.Callback.Internal value) {
if (internalBuilder_ == null) {
if (variantCase_ == 3 &&
variant_ != io.temporal.api.common.v1.Callback.Internal.getDefaultInstance()) {
variant_ = io.temporal.api.common.v1.Callback.Internal.newBuilder((io.temporal.api.common.v1.Callback.Internal) variant_)
.mergeFrom(value).buildPartial();
} else {
variant_ = value;
}
onChanged();
} else {
if (variantCase_ == 3) {
internalBuilder_.mergeFrom(value);
}
internalBuilder_.setMessage(value);
}
variantCase_ = 3;
return this;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public Builder clearInternal() {
if (internalBuilder_ == null) {
if (variantCase_ == 3) {
variantCase_ = 0;
variant_ = null;
onChanged();
}
} else {
if (variantCase_ == 3) {
variantCase_ = 0;
variant_ = null;
}
internalBuilder_.clear();
}
return this;
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public io.temporal.api.common.v1.Callback.Internal.Builder getInternalBuilder() {
return getInternalFieldBuilder().getBuilder();
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
public io.temporal.api.common.v1.Callback.InternalOrBuilder getInternalOrBuilder() {
if ((variantCase_ == 3) && (internalBuilder_ != null)) {
return internalBuilder_.getMessageOrBuilder();
} else {
if (variantCase_ == 3) {
return (io.temporal.api.common.v1.Callback.Internal) variant_;
}
return io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
}
}
/**
* .temporal.api.common.v1.Callback.Internal internal = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Internal, io.temporal.api.common.v1.Callback.Internal.Builder, io.temporal.api.common.v1.Callback.InternalOrBuilder>
getInternalFieldBuilder() {
if (internalBuilder_ == null) {
if (!(variantCase_ == 3)) {
variant_ = io.temporal.api.common.v1.Callback.Internal.getDefaultInstance();
}
internalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.temporal.api.common.v1.Callback.Internal, io.temporal.api.common.v1.Callback.Internal.Builder, io.temporal.api.common.v1.Callback.InternalOrBuilder>(
(io.temporal.api.common.v1.Callback.Internal) variant_,
getParentForChildren(),
isClean());
variant_ = null;
}
variantCase_ = 3;
onChanged();;
return internalBuilder_;
}
@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.common.v1.Callback)
}
// @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback)
private static final io.temporal.api.common.v1.Callback DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.temporal.api.common.v1.Callback();
}
public static io.temporal.api.common.v1.Callback getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Callback parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Callback(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.common.v1.Callback getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy