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 typegoogle.spanner.v1.Session
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Session.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Session
build()
Session
buildPartial()
Session.Builder
clear()
Session.Builder
clearApproximateLastUseTime()
Output only.Session.Builder
clearCreateTime()
Output only.Session.Builder
clearCreatorRole()
The database role which created this session.Session.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Session.Builder
clearLabels()
Session.Builder
clearName()
Output only.Session.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Session.Builder
clone()
boolean
containsLabels(String key)
The labels for the session.com.google.protobuf.Timestamp
getApproximateLastUseTime()
Output only.com.google.protobuf.Timestamp.Builder
getApproximateLastUseTimeBuilder()
Output only.com.google.protobuf.TimestampOrBuilder
getApproximateLastUseTimeOrBuilder()
Output only.com.google.protobuf.Timestamp
getCreateTime()
Output only.com.google.protobuf.Timestamp.Builder
getCreateTimeBuilder()
Output only.com.google.protobuf.TimestampOrBuilder
getCreateTimeOrBuilder()
Output only.String
getCreatorRole()
The database role which created this session.com.google.protobuf.ByteString
getCreatorRoleBytes()
The database role which created this session.Session
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
The labels for the session.Map<String,String>
getLabelsMap()
The labels for the session.String
getLabelsOrDefault(String key, String defaultValue)
The labels for the session.String
getLabelsOrThrow(String key)
The labels for the session.Map<String,String>
getMutableLabels()
Deprecated.String
getName()
Output only.com.google.protobuf.ByteString
getNameBytes()
Output only.boolean
hasApproximateLastUseTime()
Output only.boolean
hasCreateTime()
Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
Session.Builder
mergeApproximateLastUseTime(com.google.protobuf.Timestamp value)
Output only.Session.Builder
mergeCreateTime(com.google.protobuf.Timestamp value)
Output only.Session.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Session.Builder
mergeFrom(com.google.protobuf.Message other)
Session.Builder
mergeFrom(Session other)
Session.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Session.Builder
putAllLabels(Map<String,String> values)
The labels for the session.Session.Builder
putLabels(String key, String value)
The labels for the session.Session.Builder
removeLabels(String key)
The labels for the session.Session.Builder
setApproximateLastUseTime(com.google.protobuf.Timestamp value)
Output only.Session.Builder
setApproximateLastUseTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.Session.Builder
setCreateTime(com.google.protobuf.Timestamp value)
Output only.Session.Builder
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.Session.Builder
setCreatorRole(String value)
The database role which created this session.Session.Builder
setCreatorRoleBytes(com.google.protobuf.ByteString value)
The database role which created this session.Session.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Session.Builder
setName(String value)
Output only.Session.Builder
setNameBytes(com.google.protobuf.ByteString value)
Output only.Session.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Session.Builder
setUnknownFields(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:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clear
public Session.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
getDefaultInstanceForType
public Session getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Session build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Session buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Session.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
setField
public Session.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clearField
public Session.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
clearOneof
public Session.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
setRepeatedField
public Session.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
addRepeatedField
public Session.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeFrom
public Session.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Session.Builder>
-
mergeFrom
public Session.Builder mergeFrom(Session other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getName
in 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:
getNameBytes
in 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: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;
- Specified by:
getLabelsCount
in 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:
containsLabels
in interfaceSessionOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in 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:
getLabelsMap
in 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:
getLabelsOrDefault
in 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:
getLabelsOrThrow
in 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:
hasCreateTime
in 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:
getCreateTime
in 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:
getCreateTimeOrBuilder
in 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:
hasApproximateLastUseTime
in 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:
getApproximateLastUseTime
in 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:
getApproximateLastUseTimeOrBuilder
in interfaceSessionOrBuilder
-
getCreatorRole
public String getCreatorRole()
The database role which created this session.
string creator_role = 5;
- Specified by:
getCreatorRole
in interfaceSessionOrBuilder
- Returns:
- The creatorRole.
-
getCreatorRoleBytes
public com.google.protobuf.ByteString getCreatorRoleBytes()
The database role which created this session.
string creator_role = 5;
- Specified by:
getCreatorRoleBytes
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
mergeUnknownFields
public final Session.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Session.Builder>
-
-