tech.ydb.proto.coordination.SessionDescription Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: protos/ydb_coordination.proto
package tech.ydb.proto.coordination;
/**
*
**
* Describes an active client session
*
*
* Protobuf type {@code Ydb.Coordination.SessionDescription}
*/
public final class SessionDescription extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:Ydb.Coordination.SessionDescription)
SessionDescriptionOrBuilder {
private static final long serialVersionUID = 0L;
// Use SessionDescription.newBuilder() to construct.
private SessionDescription(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SessionDescription() {
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SessionDescription();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SessionDescription_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SessionDescription_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tech.ydb.proto.coordination.SessionDescription.class, tech.ydb.proto.coordination.SessionDescription.Builder.class);
}
public static final int SESSION_ID_FIELD_NUMBER = 1;
private long sessionId_ = 0L;
/**
*
* Session id generated by the server
*
*
* uint64 session_id = 1;
* @return The sessionId.
*/
@java.lang.Override
public long getSessionId() {
return sessionId_;
}
public static final int TIMEOUT_MILLIS_FIELD_NUMBER = 2;
private long timeoutMillis_ = 0L;
/**
*
* Expiration timeout of the session
*
*
* uint64 timeout_millis = 2;
* @return The timeoutMillis.
*/
@java.lang.Override
public long getTimeoutMillis() {
return timeoutMillis_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ATTACHED_FIELD_NUMBER = 4;
private boolean attached_ = false;
/**
*
* True if this session is currently attached to a client
*
*
* bool attached = 4;
* @return The attached.
*/
@java.lang.Override
public boolean getAttached() {
return attached_;
}
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 (sessionId_ != 0L) {
output.writeUInt64(1, sessionId_);
}
if (timeoutMillis_ != 0L) {
output.writeUInt64(2, timeoutMillis_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (attached_ != false) {
output.writeBool(4, attached_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sessionId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, sessionId_);
}
if (timeoutMillis_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, timeoutMillis_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (attached_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, attached_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tech.ydb.proto.coordination.SessionDescription)) {
return super.equals(obj);
}
tech.ydb.proto.coordination.SessionDescription other = (tech.ydb.proto.coordination.SessionDescription) obj;
if (getSessionId()
!= other.getSessionId()) return false;
if (getTimeoutMillis()
!= other.getTimeoutMillis()) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (getAttached()
!= other.getAttached()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SESSION_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSessionId());
hash = (37 * hash) + TIMEOUT_MILLIS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimeoutMillis());
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + ATTACHED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAttached());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.ydb.proto.coordination.SessionDescription parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tech.ydb.proto.coordination.SessionDescription 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 tech.ydb.proto.coordination.SessionDescription parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tech.ydb.proto.coordination.SessionDescription 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 tech.ydb.proto.coordination.SessionDescription parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tech.ydb.proto.coordination.SessionDescription 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(tech.ydb.proto.coordination.SessionDescription 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;
}
/**
*
**
* Describes an active client session
*
*
* Protobuf type {@code Ydb.Coordination.SessionDescription}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:Ydb.Coordination.SessionDescription)
tech.ydb.proto.coordination.SessionDescriptionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SessionDescription_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SessionDescription_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tech.ydb.proto.coordination.SessionDescription.class, tech.ydb.proto.coordination.SessionDescription.Builder.class);
}
// Construct using tech.ydb.proto.coordination.SessionDescription.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
sessionId_ = 0L;
timeoutMillis_ = 0L;
description_ = "";
attached_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SessionDescription_descriptor;
}
@java.lang.Override
public tech.ydb.proto.coordination.SessionDescription getDefaultInstanceForType() {
return tech.ydb.proto.coordination.SessionDescription.getDefaultInstance();
}
@java.lang.Override
public tech.ydb.proto.coordination.SessionDescription build() {
tech.ydb.proto.coordination.SessionDescription result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tech.ydb.proto.coordination.SessionDescription buildPartial() {
tech.ydb.proto.coordination.SessionDescription result = new tech.ydb.proto.coordination.SessionDescription(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(tech.ydb.proto.coordination.SessionDescription result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.sessionId_ = sessionId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.timeoutMillis_ = timeoutMillis_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.attached_ = attached_;
}
}
@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 tech.ydb.proto.coordination.SessionDescription) {
return mergeFrom((tech.ydb.proto.coordination.SessionDescription)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tech.ydb.proto.coordination.SessionDescription other) {
if (other == tech.ydb.proto.coordination.SessionDescription.getDefaultInstance()) return this;
if (other.getSessionId() != 0L) {
setSessionId(other.getSessionId());
}
if (other.getTimeoutMillis() != 0L) {
setTimeoutMillis(other.getTimeoutMillis());
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getAttached() != false) {
setAttached(other.getAttached());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
sessionId_ = input.readUInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
timeoutMillis_ = input.readUInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
attached_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long sessionId_ ;
/**
*
* Session id generated by the server
*
*
* uint64 session_id = 1;
* @return The sessionId.
*/
@java.lang.Override
public long getSessionId() {
return sessionId_;
}
/**
*
* Session id generated by the server
*
*
* uint64 session_id = 1;
* @param value The sessionId to set.
* @return This builder for chaining.
*/
public Builder setSessionId(long value) {
sessionId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Session id generated by the server
*
*
* uint64 session_id = 1;
* @return This builder for chaining.
*/
public Builder clearSessionId() {
bitField0_ = (bitField0_ & ~0x00000001);
sessionId_ = 0L;
onChanged();
return this;
}
private long timeoutMillis_ ;
/**
*
* Expiration timeout of the session
*
*
* uint64 timeout_millis = 2;
* @return The timeoutMillis.
*/
@java.lang.Override
public long getTimeoutMillis() {
return timeoutMillis_;
}
/**
*
* Expiration timeout of the session
*
*
* uint64 timeout_millis = 2;
* @param value The timeoutMillis to set.
* @return This builder for chaining.
*/
public Builder setTimeoutMillis(long value) {
timeoutMillis_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Expiration timeout of the session
*
*
* uint64 timeout_millis = 2;
* @return This builder for chaining.
*/
public Builder clearTimeoutMillis() {
bitField0_ = (bitField0_ & ~0x00000002);
timeoutMillis_ = 0L;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* User-specified description of this session
*
*
* string description = 3;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private boolean attached_ ;
/**
*
* True if this session is currently attached to a client
*
*
* bool attached = 4;
* @return The attached.
*/
@java.lang.Override
public boolean getAttached() {
return attached_;
}
/**
*
* True if this session is currently attached to a client
*
*
* bool attached = 4;
* @param value The attached to set.
* @return This builder for chaining.
*/
public Builder setAttached(boolean value) {
attached_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* True if this session is currently attached to a client
*
*
* bool attached = 4;
* @return This builder for chaining.
*/
public Builder clearAttached() {
bitField0_ = (bitField0_ & ~0x00000008);
attached_ = false;
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:Ydb.Coordination.SessionDescription)
}
// @@protoc_insertion_point(class_scope:Ydb.Coordination.SessionDescription)
private static final tech.ydb.proto.coordination.SessionDescription DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tech.ydb.proto.coordination.SessionDescription();
}
public static tech.ydb.proto.coordination.SessionDescription getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SessionDescription parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tech.ydb.proto.coordination.SessionDescription getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy