Class Session.Builder (6.25.1)

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

Implements

SessionOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Session.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Session.Builder
Overrides

build()

public Session build()
Returns
TypeDescription
Session

buildPartial()

public Session buildPartial()
Returns
TypeDescription
Session

clear()

public Session.Builder clear()
Returns
TypeDescription
Session.Builder
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
TypeDescription
Session.Builder

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
TypeDescription
Session.Builder

clearField(Descriptors.FieldDescriptor field)

public Session.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Session.Builder
Overrides

clearLabels()

public Session.Builder clearLabels()
Returns
TypeDescription
Session.Builder

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
TypeDescription
Session.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Session.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Session.Builder
Overrides

clone()

public Session.Builder clone()
Returns
TypeDescription
Session.Builder
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
NameDescription
keyString
Returns
TypeDescription
boolean

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
TypeDescription
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
TypeDescription
Builder

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
TypeDescription
TimestampOrBuilder

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
TypeDescription
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];

Returns
TypeDescription
Builder

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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Session getDefaultInstanceForType()
Returns
TypeDescription
Session

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
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;

Returns
TypeDescription
Map<String,String>

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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

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];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
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
NameDescription
valueTimestamp
Returns
TypeDescription
Session.Builder

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
NameDescription
valueTimestamp
Returns
TypeDescription
Session.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Session.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Session.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Session.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Session.Builder
Overrides

mergeFrom(Session other)

public Session.Builder mergeFrom(Session other)
Parameter
NameDescription
otherSession
Returns
TypeDescription
Session.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Session.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Session.Builder
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Session.Builder

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
NameDescription
keyString
valueString
Returns
TypeDescription
Session.Builder

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
NameDescription
keyString
Returns
TypeDescription
Session.Builder

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
NameDescription
valueTimestamp
Returns
TypeDescription
Session.Builder

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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Session.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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Session.Builder

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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Session.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Session.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Session.Builder
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
Session.Builder

This builder for chaining.

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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Session.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Session.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Session.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Session.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Session.Builder
Overrides