public static final class Session.Builder extends GeneratedMessageV3.Builder<Session.Builder> implements SessionOrBuilder
A session in the Cloud Spanner API.
Protobuf type google.spanner.v1.Session
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Session.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Session buildPartial()
Returns
clear()
public Session.Builder clear()
Returns
Overrides
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];
Returns
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];
Returns
clearField(Descriptors.FieldDescriptor field)
public Session.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLabels()
public Session.Builder clearLabels()
Returns
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
clearOneof(Descriptors.OneofDescriptor oneof)
public Session.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public Session.Builder clone()
Returns
Overrides
containsLabels(String key)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameter
Returns
getApproximateLastUseTime()
public 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];
Returns
Type | Description |
Timestamp | The approximateLastUseTime.
|
getApproximateLastUseTimeBuilder()
public 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];
Returns
getApproximateLastUseTimeOrBuilder()
public 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];
Returns
getCreateTime()
public Timestamp getCreateTime()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCreateTimeBuilder()
public Timestamp.Builder getCreateTimeBuilder()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getDefaultInstanceForType()
public Session getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Returns
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Returns
getLabelsOrDefault(String key, String defaultValue)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameters
Returns
getLabelsOrThrow(String key)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameter
Returns
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns
getName()
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
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];
Returns
Type | Description |
boolean | Whether the approximateLastUseTime field is set.
|
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];
Returns
Type | Description |
boolean | Whether the createTime field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeApproximateLastUseTime(Timestamp value)
public Session.Builder mergeApproximateLastUseTime(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];
Parameter
Returns
mergeCreateTime(Timestamp value)
public Session.Builder mergeCreateTime(Timestamp value)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Returns
public Session.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Session.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(Session other)
public Session.Builder mergeFrom(Session other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Session.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameter
Returns
putLabels(String key, String value)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameters
Returns
removeLabels(String key)
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?
.
- Label values must be between 0 and 63 characters long and must conform
to the regular expression
(a-z?)?
.
- 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;
Parameter
Returns
setApproximateLastUseTime(Timestamp value)
public Session.Builder setApproximateLastUseTime(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];
Parameter
Returns
setApproximateLastUseTime(Timestamp.Builder builderForValue)
public Session.Builder setApproximateLastUseTime(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];
Parameter
Name | Description |
builderForValue | Builder
|
Returns
setCreateTime(Timestamp value)
public Session.Builder setCreateTime(Timestamp value)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Returns
setCreateTime(Timestamp.Builder builderForValue)
public Session.Builder setCreateTime(Timestamp.Builder builderForValue)
Output only. The timestamp when the session is created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name | Description |
builderForValue | Builder
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Session.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
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];
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public Session.Builder setNameBytes(ByteString value)
Output only. The name of the session. This is always system-assigned.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Session.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Session.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides