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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Session.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Session buildPartial()
clear()
public Session.Builder clear()
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];
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];
clearField(Descriptors.FieldDescriptor field)
public Session.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearLabels()
public Session.Builder clearLabels()
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];
clearOneof(Descriptors.OneofDescriptor oneof)
public Session.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Session.Builder clone()
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 |
---|
Name | Description |
key | String
|
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];
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];
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 |
---|
Type | Description |
Timestamp | The createTime.
|
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];
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];
getDefaultInstanceForType()
public Session getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getLabels()
public Map<String,String> getLabels()
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 |
---|
Type | Description |
int | |
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;
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;
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 |
---|
Name | Description |
key | String
|
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
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 |
---|
Type | Description |
ByteString | The bytes for name.
|
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()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
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];
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];
public Session.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Session.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeFrom(Session other)
public Session.Builder mergeFrom(Session other)
Parameter |
---|
Name | Description |
other | Session
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Session.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
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 |
---|
Name | Description |
key | String
|
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];
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
|
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];
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
|
setField(Descriptors.FieldDescriptor field, Object value)
public Session.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Session.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Session.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides