Package com.google.spanner.v1
Class Session.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- 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 typegoogle.spanner.v1.Session
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Session.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Sessionbuild()SessionbuildPartial()Session.Builderclear()Session.BuilderclearApproximateLastUseTime()Output only.Session.BuilderclearCreateTime()Output only.Session.BuilderclearCreatorRole()The database role which created this session.Session.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Session.BuilderclearLabels()Session.BuilderclearName()Output only.Session.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Session.Builderclone()booleancontainsLabels(String key)The labels for the session.com.google.protobuf.TimestampgetApproximateLastUseTime()Output only.com.google.protobuf.Timestamp.BuildergetApproximateLastUseTimeBuilder()Output only.com.google.protobuf.TimestampOrBuildergetApproximateLastUseTimeOrBuilder()Output only.com.google.protobuf.TimestampgetCreateTime()Output only.com.google.protobuf.Timestamp.BuildergetCreateTimeBuilder()Output only.com.google.protobuf.TimestampOrBuildergetCreateTimeOrBuilder()Output only.StringgetCreatorRole()The database role which created this session.com.google.protobuf.ByteStringgetCreatorRoleBytes()The database role which created this session.SessiongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Map<String,String>getLabels()Deprecated.intgetLabelsCount()The labels for the session.Map<String,String>getLabelsMap()The labels for the session.StringgetLabelsOrDefault(String key, String defaultValue)The labels for the session.StringgetLabelsOrThrow(String key)The labels for the session.Map<String,String>getMutableLabels()Deprecated.StringgetName()Output only.com.google.protobuf.ByteStringgetNameBytes()Output only.booleanhasApproximateLastUseTime()Output only.booleanhasCreateTime()Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number)booleanisInitialized()Session.BuildermergeApproximateLastUseTime(com.google.protobuf.Timestamp value)Output only.Session.BuildermergeCreateTime(com.google.protobuf.Timestamp value)Output only.Session.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Session.BuildermergeFrom(com.google.protobuf.Message other)Session.BuildermergeFrom(Session other)Session.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Session.BuilderputAllLabels(Map<String,String> values)The labels for the session.Session.BuilderputLabels(String key, String value)The labels for the session.Session.BuilderremoveLabels(String key)The labels for the session.Session.BuildersetApproximateLastUseTime(com.google.protobuf.Timestamp value)Output only.Session.BuildersetApproximateLastUseTime(com.google.protobuf.Timestamp.Builder builderForValue)Output only.Session.BuildersetCreateTime(com.google.protobuf.Timestamp value)Output only.Session.BuildersetCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)Output only.Session.BuildersetCreatorRole(String value)The database role which created this session.Session.BuildersetCreatorRoleBytes(com.google.protobuf.ByteString value)The database role which created this session.Session.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Session.BuildersetName(String value)Output only.Session.BuildersetNameBytes(com.google.protobuf.ByteString value)Output only.Session.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)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, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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
public 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
public Session getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Session build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Session buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Session.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
public Session.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clearOneof
public Session.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- 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
public Session.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Session.Builder>
-
mergeFrom
public Session.Builder mergeFrom(Session other)
-
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
public String 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
public Session.Builder setName(String value)
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
public Session.Builder 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
public Session.Builder setNameBytes(com.google.protobuf.ByteString value)
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
public boolean containsLabels(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;- Specified by:
containsLabelsin interfaceSessionOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceSessionOrBuilder
-
getLabelsMap
public Map<String,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;- Specified by:
getLabelsMapin interfaceSessionOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, 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;- Specified by:
getLabelsOrDefaultin interfaceSessionOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(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;- Specified by:
getLabelsOrThrowin interfaceSessionOrBuilder
-
clearLabels
public Session.Builder clearLabels()
-
removeLabels
public Session.Builder removeLabels(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;
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public Session.Builder putLabels(String key, String value)
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
public Session.Builder putAllLabels(Map<String,String> values)
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
public Session.Builder setCreateTime(com.google.protobuf.Timestamp value)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
setCreateTime
public Session.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
mergeCreateTime
public Session.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
-
clearCreateTime
public Session.Builder 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
public Session.Builder setApproximateLastUseTime(com.google.protobuf.Timestamp value)
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
public Session.Builder mergeApproximateLastUseTime(com.google.protobuf.Timestamp value)
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
public Session.Builder 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
public String 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
public Session.Builder setCreatorRole(String value)
The database role which created this session.
string creator_role = 5;- Parameters:
value- The creatorRole to set.- Returns:
- This builder for chaining.
-
clearCreatorRole
public Session.Builder clearCreatorRole()
The database role which created this session.
string creator_role = 5;- Returns:
- This builder for chaining.
-
setCreatorRoleBytes
public Session.Builder setCreatorRoleBytes(com.google.protobuf.ByteString value)
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
public final Session.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeUnknownFields
public final Session.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
-