io.nats.streaming.protobuf.SubscriptionRequest Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: protocol.proto
package io.nats.streaming.protobuf;
/**
* Protobuf type {@code pb.SubscriptionRequest}
*
*
* Protocol for a client to subscribe
*
*/
public final class SubscriptionRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:pb.SubscriptionRequest)
SubscriptionRequestOrBuilder {
// Use SubscriptionRequest.newBuilder() to construct.
private SubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
super(builder);
}
private SubscriptionRequest() {
clientID_ = "";
subject_ = "";
qGroup_ = "";
inbox_ = "";
maxInFlight_ = 0;
ackWaitInSecs_ = 0;
durableName_ = "";
startPosition_ = 0;
startSequence_ = 0L;
startTimeDelta_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private SubscriptionRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
clientID_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
subject_ = bs;
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
qGroup_ = bs;
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
inbox_ = bs;
break;
}
case 40: {
maxInFlight_ = input.readInt32();
break;
}
case 48: {
ackWaitInSecs_ = input.readInt32();
break;
}
case 58: {
com.google.protobuf.ByteString bs = input.readBytes();
durableName_ = bs;
break;
}
case 80: {
int rawValue = input.readEnum();
startPosition_ = rawValue;
break;
}
case 88: {
startSequence_ = input.readUInt64();
break;
}
case 96: {
startTimeDelta_ = input.readInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_SubscriptionRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_SubscriptionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.nats.streaming.protobuf.SubscriptionRequest.class, io.nats.streaming.protobuf.SubscriptionRequest.Builder.class);
}
public static final int CLIENTID_FIELD_NUMBER = 1;
private volatile java.lang.Object clientID_;
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public java.lang.String getClientID() {
java.lang.Object ref = clientID_;
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();
if (bs.isValidUtf8()) {
clientID_ = s;
}
return s;
}
}
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public com.google.protobuf.ByteString
getClientIDBytes() {
java.lang.Object ref = clientID_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientID_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBJECT_FIELD_NUMBER = 2;
private volatile java.lang.Object subject_;
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
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();
if (bs.isValidUtf8()) {
subject_ = s;
}
return s;
}
}
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QGROUP_FIELD_NUMBER = 3;
private volatile java.lang.Object qGroup_;
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public java.lang.String getQGroup() {
java.lang.Object ref = qGroup_;
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();
if (bs.isValidUtf8()) {
qGroup_ = s;
}
return s;
}
}
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public com.google.protobuf.ByteString
getQGroupBytes() {
java.lang.Object ref = qGroup_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
qGroup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INBOX_FIELD_NUMBER = 4;
private volatile java.lang.Object inbox_;
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public java.lang.String getInbox() {
java.lang.Object ref = inbox_;
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();
if (bs.isValidUtf8()) {
inbox_ = s;
}
return s;
}
}
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public com.google.protobuf.ByteString
getInboxBytes() {
java.lang.Object ref = inbox_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
inbox_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAXINFLIGHT_FIELD_NUMBER = 5;
private int maxInFlight_;
/**
* optional int32 maxInFlight = 5;
*
*
* Maximum inflight messages without an ack allowed
*
*/
public int getMaxInFlight() {
return maxInFlight_;
}
public static final int ACKWAITINSECS_FIELD_NUMBER = 6;
private int ackWaitInSecs_;
/**
* optional int32 ackWaitInSecs = 6;
*
*
* Timeout for receiving an ack from the client
*
*/
public int getAckWaitInSecs() {
return ackWaitInSecs_;
}
public static final int DURABLENAME_FIELD_NUMBER = 7;
private volatile java.lang.Object durableName_;
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public java.lang.String getDurableName() {
java.lang.Object ref = durableName_;
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();
if (bs.isValidUtf8()) {
durableName_ = s;
}
return s;
}
}
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public com.google.protobuf.ByteString
getDurableNameBytes() {
java.lang.Object ref = durableName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
durableName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STARTPOSITION_FIELD_NUMBER = 10;
private int startPosition_;
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public int getStartPositionValue() {
return startPosition_;
}
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public io.nats.streaming.protobuf.StartPosition getStartPosition() {
io.nats.streaming.protobuf.StartPosition result = io.nats.streaming.protobuf.StartPosition.valueOf(startPosition_);
return result == null ? io.nats.streaming.protobuf.StartPosition.UNRECOGNIZED : result;
}
public static final int STARTSEQUENCE_FIELD_NUMBER = 11;
private long startSequence_;
/**
* optional uint64 startSequence = 11;
*
*
* Optional start sequence number
*
*/
public long getStartSequence() {
return startSequence_;
}
public static final int STARTTIMEDELTA_FIELD_NUMBER = 12;
private long startTimeDelta_;
/**
* optional int64 startTimeDelta = 12;
*
*
* Optional start time
*
*/
public long getStartTimeDelta() {
return startTimeDelta_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getClientIDBytes().isEmpty()) {
output.writeBytes(1, getClientIDBytes());
}
if (!getSubjectBytes().isEmpty()) {
output.writeBytes(2, getSubjectBytes());
}
if (!getQGroupBytes().isEmpty()) {
output.writeBytes(3, getQGroupBytes());
}
if (!getInboxBytes().isEmpty()) {
output.writeBytes(4, getInboxBytes());
}
if (maxInFlight_ != 0) {
output.writeInt32(5, maxInFlight_);
}
if (ackWaitInSecs_ != 0) {
output.writeInt32(6, ackWaitInSecs_);
}
if (!getDurableNameBytes().isEmpty()) {
output.writeBytes(7, getDurableNameBytes());
}
if (startPosition_ != io.nats.streaming.protobuf.StartPosition.NewOnly.getNumber()) {
output.writeEnum(10, startPosition_);
}
if (startSequence_ != 0L) {
output.writeUInt64(11, startSequence_);
}
if (startTimeDelta_ != 0L) {
output.writeInt64(12, startTimeDelta_);
}
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (!getClientIDBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getClientIDBytes());
}
if (!getSubjectBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getSubjectBytes());
}
if (!getQGroupBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getQGroupBytes());
}
if (!getInboxBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, getInboxBytes());
}
if (maxInFlight_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, maxInFlight_);
}
if (ackWaitInSecs_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, ackWaitInSecs_);
}
if (!getDurableNameBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, getDurableNameBytes());
}
if (startPosition_ != io.nats.streaming.protobuf.StartPosition.NewOnly.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, startPosition_);
}
if (startSequence_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(11, startSequence_);
}
if (startTimeDelta_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(12, startTimeDelta_);
}
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static io.nats.streaming.protobuf.SubscriptionRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.nats.streaming.protobuf.SubscriptionRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code pb.SubscriptionRequest}
*
*
* Protocol for a client to subscribe
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:pb.SubscriptionRequest)
io.nats.streaming.protobuf.SubscriptionRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_SubscriptionRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_SubscriptionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.nats.streaming.protobuf.SubscriptionRequest.class, io.nats.streaming.protobuf.SubscriptionRequest.Builder.class);
}
// Construct using io.nats.streaming.protobuf.SubscriptionRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
clientID_ = "";
subject_ = "";
qGroup_ = "";
inbox_ = "";
maxInFlight_ = 0;
ackWaitInSecs_ = 0;
durableName_ = "";
startPosition_ = 0;
startSequence_ = 0L;
startTimeDelta_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_SubscriptionRequest_descriptor;
}
public io.nats.streaming.protobuf.SubscriptionRequest getDefaultInstanceForType() {
return io.nats.streaming.protobuf.SubscriptionRequest.getDefaultInstance();
}
public io.nats.streaming.protobuf.SubscriptionRequest build() {
io.nats.streaming.protobuf.SubscriptionRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.nats.streaming.protobuf.SubscriptionRequest buildPartial() {
io.nats.streaming.protobuf.SubscriptionRequest result = new io.nats.streaming.protobuf.SubscriptionRequest(this);
result.clientID_ = clientID_;
result.subject_ = subject_;
result.qGroup_ = qGroup_;
result.inbox_ = inbox_;
result.maxInFlight_ = maxInFlight_;
result.ackWaitInSecs_ = ackWaitInSecs_;
result.durableName_ = durableName_;
result.startPosition_ = startPosition_;
result.startSequence_ = startSequence_;
result.startTimeDelta_ = startTimeDelta_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.nats.streaming.protobuf.SubscriptionRequest) {
return mergeFrom((io.nats.streaming.protobuf.SubscriptionRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.nats.streaming.protobuf.SubscriptionRequest other) {
if (other == io.nats.streaming.protobuf.SubscriptionRequest.getDefaultInstance()) return this;
if (!other.getClientID().isEmpty()) {
clientID_ = other.clientID_;
onChanged();
}
if (!other.getSubject().isEmpty()) {
subject_ = other.subject_;
onChanged();
}
if (!other.getQGroup().isEmpty()) {
qGroup_ = other.qGroup_;
onChanged();
}
if (!other.getInbox().isEmpty()) {
inbox_ = other.inbox_;
onChanged();
}
if (other.getMaxInFlight() != 0) {
setMaxInFlight(other.getMaxInFlight());
}
if (other.getAckWaitInSecs() != 0) {
setAckWaitInSecs(other.getAckWaitInSecs());
}
if (!other.getDurableName().isEmpty()) {
durableName_ = other.durableName_;
onChanged();
}
if (other.startPosition_ != 0) {
setStartPositionValue(other.getStartPositionValue());
}
if (other.getStartSequence() != 0L) {
setStartSequence(other.getStartSequence());
}
if (other.getStartTimeDelta() != 0L) {
setStartTimeDelta(other.getStartTimeDelta());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.nats.streaming.protobuf.SubscriptionRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.nats.streaming.protobuf.SubscriptionRequest) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object clientID_ = "";
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public java.lang.String getClientID() {
java.lang.Object ref = clientID_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
clientID_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public com.google.protobuf.ByteString
getClientIDBytes() {
java.lang.Object ref = clientID_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientID_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public Builder setClientID(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientID_ = value;
onChanged();
return this;
}
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public Builder clearClientID() {
clientID_ = getDefaultInstance().getClientID();
onChanged();
return this;
}
/**
* optional string clientID = 1;
*
*
* ClientID
*
*/
public Builder setClientIDBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
clientID_ = value;
onChanged();
return this;
}
private java.lang.Object subject_ = "";
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
subject_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public Builder setSubject(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subject_ = value;
onChanged();
return this;
}
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public Builder clearSubject() {
subject_ = getDefaultInstance().getSubject();
onChanged();
return this;
}
/**
* optional string subject = 2;
*
*
* Formal subject to subscribe to, e.g. foo.bar
*
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
subject_ = value;
onChanged();
return this;
}
private java.lang.Object qGroup_ = "";
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public java.lang.String getQGroup() {
java.lang.Object ref = qGroup_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
qGroup_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public com.google.protobuf.ByteString
getQGroupBytes() {
java.lang.Object ref = qGroup_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
qGroup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public Builder setQGroup(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
qGroup_ = value;
onChanged();
return this;
}
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public Builder clearQGroup() {
qGroup_ = getDefaultInstance().getQGroup();
onChanged();
return this;
}
/**
* optional string qGroup = 3;
*
*
* Optional queue group
*
*/
public Builder setQGroupBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
qGroup_ = value;
onChanged();
return this;
}
private java.lang.Object inbox_ = "";
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public java.lang.String getInbox() {
java.lang.Object ref = inbox_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
inbox_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public com.google.protobuf.ByteString
getInboxBytes() {
java.lang.Object ref = inbox_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
inbox_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public Builder setInbox(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inbox_ = value;
onChanged();
return this;
}
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public Builder clearInbox() {
inbox_ = getDefaultInstance().getInbox();
onChanged();
return this;
}
/**
* optional string inbox = 4;
*
*
* Inbox subject to deliver messages on
*
*/
public Builder setInboxBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
inbox_ = value;
onChanged();
return this;
}
private int maxInFlight_ ;
/**
* optional int32 maxInFlight = 5;
*
*
* Maximum inflight messages without an ack allowed
*
*/
public int getMaxInFlight() {
return maxInFlight_;
}
/**
* optional int32 maxInFlight = 5;
*
*
* Maximum inflight messages without an ack allowed
*
*/
public Builder setMaxInFlight(int value) {
maxInFlight_ = value;
onChanged();
return this;
}
/**
* optional int32 maxInFlight = 5;
*
*
* Maximum inflight messages without an ack allowed
*
*/
public Builder clearMaxInFlight() {
maxInFlight_ = 0;
onChanged();
return this;
}
private int ackWaitInSecs_ ;
/**
* optional int32 ackWaitInSecs = 6;
*
*
* Timeout for receiving an ack from the client
*
*/
public int getAckWaitInSecs() {
return ackWaitInSecs_;
}
/**
* optional int32 ackWaitInSecs = 6;
*
*
* Timeout for receiving an ack from the client
*
*/
public Builder setAckWaitInSecs(int value) {
ackWaitInSecs_ = value;
onChanged();
return this;
}
/**
* optional int32 ackWaitInSecs = 6;
*
*
* Timeout for receiving an ack from the client
*
*/
public Builder clearAckWaitInSecs() {
ackWaitInSecs_ = 0;
onChanged();
return this;
}
private java.lang.Object durableName_ = "";
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public java.lang.String getDurableName() {
java.lang.Object ref = durableName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
durableName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public com.google.protobuf.ByteString
getDurableNameBytes() {
java.lang.Object ref = durableName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
durableName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public Builder setDurableName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
durableName_ = value;
onChanged();
return this;
}
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public Builder clearDurableName() {
durableName_ = getDefaultInstance().getDurableName();
onChanged();
return this;
}
/**
* optional string durableName = 7;
*
*
* Optional durable name which survives client restarts
*
*/
public Builder setDurableNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
durableName_ = value;
onChanged();
return this;
}
private int startPosition_ = 0;
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public int getStartPositionValue() {
return startPosition_;
}
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public Builder setStartPositionValue(int value) {
startPosition_ = value;
onChanged();
return this;
}
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public io.nats.streaming.protobuf.StartPosition getStartPosition() {
io.nats.streaming.protobuf.StartPosition result = io.nats.streaming.protobuf.StartPosition.valueOf(startPosition_);
return result == null ? io.nats.streaming.protobuf.StartPosition.UNRECOGNIZED : result;
}
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public Builder setStartPosition(io.nats.streaming.protobuf.StartPosition value) {
if (value == null) {
throw new NullPointerException();
}
startPosition_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .pb.StartPosition startPosition = 10;
*
*
* Start position
*
*/
public Builder clearStartPosition() {
startPosition_ = 0;
onChanged();
return this;
}
private long startSequence_ ;
/**
* optional uint64 startSequence = 11;
*
*
* Optional start sequence number
*
*/
public long getStartSequence() {
return startSequence_;
}
/**
* optional uint64 startSequence = 11;
*
*
* Optional start sequence number
*
*/
public Builder setStartSequence(long value) {
startSequence_ = value;
onChanged();
return this;
}
/**
* optional uint64 startSequence = 11;
*
*
* Optional start sequence number
*
*/
public Builder clearStartSequence() {
startSequence_ = 0L;
onChanged();
return this;
}
private long startTimeDelta_ ;
/**
* optional int64 startTimeDelta = 12;
*
*
* Optional start time
*
*/
public long getStartTimeDelta() {
return startTimeDelta_;
}
/**
* optional int64 startTimeDelta = 12;
*
*
* Optional start time
*
*/
public Builder setStartTimeDelta(long value) {
startTimeDelta_ = value;
onChanged();
return this;
}
/**
* optional int64 startTimeDelta = 12;
*
*
* Optional start time
*
*/
public Builder clearStartTimeDelta() {
startTimeDelta_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:pb.SubscriptionRequest)
}
// @@protoc_insertion_point(class_scope:pb.SubscriptionRequest)
private static final io.nats.streaming.protobuf.SubscriptionRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.nats.streaming.protobuf.SubscriptionRequest();
}
public static io.nats.streaming.protobuf.SubscriptionRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public SubscriptionRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new SubscriptionRequest(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public io.nats.streaming.protobuf.SubscriptionRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy