io.nats.streaming.protobuf.UnsubscribeRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-nats-streaming Show documentation
Show all versions of java-nats-streaming Show documentation
Client library for working with the NATS messaging system.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: protocol.proto
package io.nats.streaming.protobuf;
/**
* Protobuf type {@code pb.UnsubscribeRequest}
*
*
* Protocol for a clients to unsubscribe. Will return a SubscriptionResponse
*
*/
public final class UnsubscribeRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:pb.UnsubscribeRequest)
UnsubscribeRequestOrBuilder {
// Use UnsubscribeRequest.newBuilder() to construct.
private UnsubscribeRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
super(builder);
}
private UnsubscribeRequest() {
clientID_ = "";
subject_ = "";
inbox_ = "";
durableName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private UnsubscribeRequest(
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();
inbox_ = bs;
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
durableName_ = bs;
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_UnsubscribeRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_UnsubscribeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.nats.streaming.protobuf.UnsubscribeRequest.class, io.nats.streaming.protobuf.UnsubscribeRequest.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;
*
*
* subject for the subscription
*
*/
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;
*
*
* subject for the subscription
*
*/
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 INBOX_FIELD_NUMBER = 3;
private volatile java.lang.Object inbox_;
/**
* optional string inbox = 3;
*
*
* Inbox subject to identify subscription
*
*/
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 = 3;
*
*
* Inbox subject to identify subscription
*
*/
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 DURABLENAME_FIELD_NUMBER = 4;
private volatile java.lang.Object durableName_;
/**
* optional string durableName = 4;
*
*
* 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 = 4;
*
*
* 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;
}
}
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 (!getInboxBytes().isEmpty()) {
output.writeBytes(3, getInboxBytes());
}
if (!getDurableNameBytes().isEmpty()) {
output.writeBytes(4, getDurableNameBytes());
}
}
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 (!getInboxBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getInboxBytes());
}
if (!getDurableNameBytes().isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, getDurableNameBytes());
}
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
public static io.nats.streaming.protobuf.UnsubscribeRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest 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.UnsubscribeRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest 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.UnsubscribeRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest 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.UnsubscribeRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static io.nats.streaming.protobuf.UnsubscribeRequest 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.UnsubscribeRequest 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.UnsubscribeRequest}
*
*
* Protocol for a clients to unsubscribe. Will return a SubscriptionResponse
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:pb.UnsubscribeRequest)
io.nats.streaming.protobuf.UnsubscribeRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_UnsubscribeRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_UnsubscribeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.nats.streaming.protobuf.UnsubscribeRequest.class, io.nats.streaming.protobuf.UnsubscribeRequest.Builder.class);
}
// Construct using io.nats.streaming.protobuf.UnsubscribeRequest.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_ = "";
inbox_ = "";
durableName_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.nats.streaming.protobuf.Protocol.internal_static_pb_UnsubscribeRequest_descriptor;
}
public io.nats.streaming.protobuf.UnsubscribeRequest getDefaultInstanceForType() {
return io.nats.streaming.protobuf.UnsubscribeRequest.getDefaultInstance();
}
public io.nats.streaming.protobuf.UnsubscribeRequest build() {
io.nats.streaming.protobuf.UnsubscribeRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.nats.streaming.protobuf.UnsubscribeRequest buildPartial() {
io.nats.streaming.protobuf.UnsubscribeRequest result = new io.nats.streaming.protobuf.UnsubscribeRequest(this);
result.clientID_ = clientID_;
result.subject_ = subject_;
result.inbox_ = inbox_;
result.durableName_ = durableName_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.nats.streaming.protobuf.UnsubscribeRequest) {
return mergeFrom((io.nats.streaming.protobuf.UnsubscribeRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.nats.streaming.protobuf.UnsubscribeRequest other) {
if (other == io.nats.streaming.protobuf.UnsubscribeRequest.getDefaultInstance()) return this;
if (!other.getClientID().isEmpty()) {
clientID_ = other.clientID_;
onChanged();
}
if (!other.getSubject().isEmpty()) {
subject_ = other.subject_;
onChanged();
}
if (!other.getInbox().isEmpty()) {
inbox_ = other.inbox_;
onChanged();
}
if (!other.getDurableName().isEmpty()) {
durableName_ = other.durableName_;
onChanged();
}
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.UnsubscribeRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.nats.streaming.protobuf.UnsubscribeRequest) 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;
*
*
* subject for the subscription
*
*/
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;
*
*
* subject for the subscription
*
*/
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;
*
*
* subject for the subscription
*
*/
public Builder setSubject(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subject_ = value;
onChanged();
return this;
}
/**
* optional string subject = 2;
*
*
* subject for the subscription
*
*/
public Builder clearSubject() {
subject_ = getDefaultInstance().getSubject();
onChanged();
return this;
}
/**
* optional string subject = 2;
*
*
* subject for the subscription
*
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
subject_ = value;
onChanged();
return this;
}
private java.lang.Object inbox_ = "";
/**
* optional string inbox = 3;
*
*
* Inbox subject to identify subscription
*
*/
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 = 3;
*
*
* Inbox subject to identify subscription
*
*/
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 = 3;
*
*
* Inbox subject to identify subscription
*
*/
public Builder setInbox(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inbox_ = value;
onChanged();
return this;
}
/**
* optional string inbox = 3;
*
*
* Inbox subject to identify subscription
*
*/
public Builder clearInbox() {
inbox_ = getDefaultInstance().getInbox();
onChanged();
return this;
}
/**
* optional string inbox = 3;
*
*
* Inbox subject to identify subscription
*
*/
public Builder setInboxBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
inbox_ = value;
onChanged();
return this;
}
private java.lang.Object durableName_ = "";
/**
* optional string durableName = 4;
*
*
* 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 = 4;
*
*
* 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 = 4;
*
*
* 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 = 4;
*
*
* Optional durable name which survives client restarts
*
*/
public Builder clearDurableName() {
durableName_ = getDefaultInstance().getDurableName();
onChanged();
return this;
}
/**
* optional string durableName = 4;
*
*
* 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;
}
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.UnsubscribeRequest)
}
// @@protoc_insertion_point(class_scope:pb.UnsubscribeRequest)
private static final io.nats.streaming.protobuf.UnsubscribeRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.nats.streaming.protobuf.UnsubscribeRequest();
}
public static io.nats.streaming.protobuf.UnsubscribeRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
public static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public UnsubscribeRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new UnsubscribeRequest(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.UnsubscribeRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy