Package com.google.spanner.v1
Class Session.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
com.google.spanner.v1.Session.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,SessionOrBuilder,Cloneable
- Enclosing class:
- Session
public static final class Session.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
implements SessionOrBuilder
A session in the Cloud Spanner API.Protobuf type
google.spanner.v1.Session-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Output only.Output only.The database role which created this session.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Output only.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()booleancontainsLabels(String key) The labels for the session.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.The database role which created this session.com.google.protobuf.ByteStringThe database role which created this session.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intThe labels for the session.The labels for the session.getLabelsOrDefault(String key, String defaultValue) The labels for the session.getLabelsOrThrow(String key) The labels for the session.Deprecated.getName()Output only.com.google.protobuf.ByteStringOutput only.booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldinternalGetMapField(int number) protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number) final booleanmergeApproximateLastUseTime(com.google.protobuf.Timestamp value) Output only.mergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) final Session.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) putAllLabels(Map<String, String> values) The labels for the session.The labels for the session.removeLabels(String key) The labels for the session.setApproximateLastUseTime(com.google.protobuf.Timestamp value) Output only.setApproximateLastUseTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setCreatorRole(String value) The database role which created this session.setCreatorRoleBytes(com.google.protobuf.ByteString value) The database role which created this session.Output only.setNameBytes(com.google.protobuf.ByteString value) Output only.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final Session.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapFieldReflection, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number) - Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number) - Overrides:
internalGetMutableMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
setField
public Session.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
setRepeatedField
public Session.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
addRepeatedField
public Session.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Session.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeFrom
public Session.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Session.Builder>- Throws:
IOException
-
getName
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getNamein interfaceSessionOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getNameBytesin interfaceSessionOrBuilder- Returns:
- The bytes for name.
-
setName
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setNameBytes
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:SessionOrBuilderThe 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;- Specified by:
getLabelsCountin interfaceSessionOrBuilder
-
containsLabels
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;- Specified by:
containsLabelsin interfaceSessionOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceSessionOrBuilder
-
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;- Specified by:
getLabelsMapin interfaceSessionOrBuilder
-
getLabelsOrDefault
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;- Specified by:
getLabelsOrDefaultin interfaceSessionOrBuilder
-
getLabelsOrThrow
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;- Specified by:
getLabelsOrThrowin interfaceSessionOrBuilder
-
clearLabels
-
removeLabels
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; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
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; -
putAllLabels
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; -
hasCreateTime
public boolean hasCreateTime()Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasCreateTimein interfaceSessionOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.Timestamp getCreateTime()Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimein interfaceSessionOrBuilder- Returns:
- The createTime.
-
setCreateTime
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setCreateTime
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeCreateTime
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearCreateTime
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeBuilder
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimeOrBuilderin interfaceSessionOrBuilder
-
hasApproximateLastUseTime
public 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 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasApproximateLastUseTimein interfaceSessionOrBuilder- Returns:
- Whether the approximateLastUseTime field is set.
-
getApproximateLastUseTime
public com.google.protobuf.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 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getApproximateLastUseTimein interfaceSessionOrBuilder- Returns:
- The approximateLastUseTime.
-
setApproximateLastUseTime
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 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setApproximateLastUseTime
public Session.Builder setApproximateLastUseTime(com.google.protobuf.Timestamp.Builder builderForValue) 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeApproximateLastUseTime
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 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearApproximateLastUseTime
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 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getApproximateLastUseTimeBuilder
public com.google.protobuf.Timestamp.Builder getApproximateLastUseTimeBuilder()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 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getApproximateLastUseTimeOrBuilder
public com.google.protobuf.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 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getApproximateLastUseTimeOrBuilderin interfaceSessionOrBuilder
-
getCreatorRole
The database role which created this session.
string creator_role = 5;- Specified by:
getCreatorRolein interfaceSessionOrBuilder- Returns:
- The creatorRole.
-
getCreatorRoleBytes
public com.google.protobuf.ByteString getCreatorRoleBytes()The database role which created this session.
string creator_role = 5;- Specified by:
getCreatorRoleBytesin interfaceSessionOrBuilder- Returns:
- The bytes for creatorRole.
-
setCreatorRole
The database role which created this session.
string creator_role = 5;- Parameters:
value- The creatorRole to set.- Returns:
- This builder for chaining.
-
clearCreatorRole
The database role which created this session.
string creator_role = 5;- Returns:
- This builder for chaining.
-
setCreatorRoleBytes
The database role which created this session.
string creator_role = 5;- Parameters:
value- The bytes for creatorRole to set.- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-