public final class Session extends GeneratedMessageV3 implements SessionOrBuilder
A session in the Cloud Spanner API.Protobuf type
google.spanner.v1.Session| Modifier and Type | Class and Description |
|---|---|
static class |
Session.Builder
A session in the Cloud Spanner API.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
APPROXIMATE_LAST_USE_TIME_FIELD_NUMBER |
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
LABELS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLabels(java.lang.String key)
The labels for the session.
|
boolean |
equals(java.lang.Object obj) |
Timestamp |
getApproximateLastUseTime()
Output only.
|
TimestampOrBuilder |
getApproximateLastUseTimeOrBuilder()
Output only.
|
Timestamp |
getCreateTime()
Output only.
|
TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
static Session |
getDefaultInstance() |
Session |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
java.util.Map<java.lang.String,java.lang.String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
The labels for the session.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabelsMap()
The labels for the session.
|
java.lang.String |
getLabelsOrDefault(java.lang.String key,
java.lang.String defaultValue)
The labels for the session.
|
java.lang.String |
getLabelsOrThrow(java.lang.String key)
The labels for the session.
|
java.lang.String |
getName()
The name of the session.
|
ByteString |
getNameBytes()
The name of the session.
|
Parser<Session> |
getParserForType() |
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
boolean |
hasApproximateLastUseTime()
Output only.
|
boolean |
hasCreateTime()
Output only.
|
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static Session.Builder |
newBuilder() |
static Session.Builder |
newBuilder(Session prototype) |
Session.Builder |
newBuilderForType() |
protected Session.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Session |
parseDelimitedFrom(java.io.InputStream input) |
static Session |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Session |
parseFrom(byte[] data) |
static Session |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Session |
parseFrom(java.nio.ByteBuffer data) |
static Session |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Session |
parseFrom(ByteString data) |
static Session |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Session |
parseFrom(CodedInputStream input) |
static Session |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Session |
parseFrom(java.io.InputStream input) |
static Session |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Session> |
parser() |
Session.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int APPROXIMATE_LAST_USE_TIME_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField in class GeneratedMessageV3protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.lang.String getName()
The name of the session. This is always system-assigned; values provided when creating a session are ignored.
string name = 1;getName in interface SessionOrBuilderpublic ByteString getNameBytes()
The name of the session. This is always system-assigned; values provided when creating a session are ignored.
string name = 1;getNameBytes in interface SessionOrBuilderpublic int getLabelsCount()
SessionOrBuilder
The labels for the session.
* Label keys must be between 1 and 63 characters long and must conform to
the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* Label values must be between 0 and 63 characters long and must conform
to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
* No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
map<string, string> labels = 2;getLabelsCount in interface SessionOrBuilderpublic boolean containsLabels(java.lang.String key)
The labels for the session.
* Label keys must be between 1 and 63 characters long and must conform to
the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* Label values must be between 0 and 63 characters long and must conform
to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
* No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
map<string, string> labels = 2;containsLabels in interface SessionOrBuilder@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
getLabelsMap() instead.getLabels in interface SessionOrBuilderpublic java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
The labels for the session.
* Label keys must be between 1 and 63 characters long and must conform to
the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* Label values must be between 0 and 63 characters long and must conform
to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
* No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
map<string, string> labels = 2;getLabelsMap in interface SessionOrBuilderpublic java.lang.String getLabelsOrDefault(java.lang.String key,
java.lang.String defaultValue)
The labels for the session.
* Label keys must be between 1 and 63 characters long and must conform to
the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* Label values must be between 0 and 63 characters long and must conform
to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
* No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
map<string, string> labels = 2;getLabelsOrDefault in interface SessionOrBuilderpublic java.lang.String getLabelsOrThrow(java.lang.String key)
The labels for the session.
* Label keys must be between 1 and 63 characters long and must conform to
the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* Label values must be between 0 and 63 characters long and must conform
to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
* No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
map<string, string> labels = 2;getLabelsOrThrow in interface SessionOrBuilderpublic boolean hasCreateTime()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3;hasCreateTime in interface SessionOrBuilderpublic Timestamp getCreateTime()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3;getCreateTime in interface SessionOrBuilderpublic TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3;getCreateTimeOrBuilder in interface SessionOrBuilderpublic boolean hasApproximateLastUseTime()
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
.google.protobuf.Timestamp approximate_last_use_time = 4;hasApproximateLastUseTime in interface SessionOrBuilderpublic Timestamp getApproximateLastUseTime()
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
.google.protobuf.Timestamp approximate_last_use_time = 4;getApproximateLastUseTime in interface SessionOrBuilderpublic TimestampOrBuilder getApproximateLastUseTimeOrBuilder()
Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
.google.protobuf.Timestamp approximate_last_use_time = 4;getApproximateLastUseTimeOrBuilder in interface SessionOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static Session parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Session parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Session parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Session parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Session parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Session parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Session parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Session.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Session.Builder newBuilder()
public static Session.Builder newBuilder(Session prototype)
public Session.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected Session.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static Session getDefaultInstance()
public Parser<Session> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public Session getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder