Class: Google::Apis::SpannerV1::Session
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Session
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
A session in the Cloud Spanner API.
Instance Attribute Summary collapse
-
#approximate_last_use_time ⇒ String
Output only.
-
#create_time ⇒ String
Output only.
-
#creator_role ⇒ String
The database role which created this session.
-
#labels ⇒ Hash<String,String>
The labels for the session.
-
#multiplexed ⇒ Boolean
(also: #multiplexed?)
Optional.
-
#name ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Session
constructor
A new instance of Session.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Session
Returns a new instance of Session.
6426 6427 6428 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6426 def initialize(**args) update!(**args) end |
Instance Attribute Details
#approximate_last_use_time ⇒ String
Output only. The approximate timestamp when the session is last used. It's
typically earlier than the actual last use time.
Corresponds to the JSON property approximateLastUseTime
6389 6390 6391 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6389 def approximate_last_use_time @approximate_last_use_time end |
#create_time ⇒ String
Output only. The timestamp when the session is created.
Corresponds to the JSON property createTime
6394 6395 6396 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6394 def create_time @create_time end |
#creator_role ⇒ String
The database role which created this session.
Corresponds to the JSON property creatorRole
6399 6400 6401 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6399 def creator_role @creator_role end |
#labels ⇒ Hash<String,String>
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.
Corresponds to the JSON property labels
6409 6410 6411 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6409 def labels @labels end |
#multiplexed ⇒ Boolean Also known as: multiplexed?
Optional. If true, specifies a multiplexed session. Use a multiplexed
session for multiple, concurrent read-only operations. Don't use them for read-
write transactions, partitioned reads, or partitioned queries. Use sessions.
create to create multiplexed sessions. Don't use BatchCreateSessions to
create a multiplexed session. You can't delete or list multiplexed sessions.
Corresponds to the JSON property multiplexed
6418 6419 6420 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6418 def multiplexed @multiplexed end |
#name ⇒ String
Output only. The name of the session. This is always system-assigned.
Corresponds to the JSON property name
6424 6425 6426 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6424 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6431 6432 6433 6434 6435 6436 6437 6438 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 6431 def update!(**args) @approximate_last_use_time = args[:approximate_last_use_time] if args.key?(:approximate_last_use_time) @create_time = args[:create_time] if args.key?(:create_time) @creator_role = args[:creator_role] if args.key?(:creator_role) @labels = args[:labels] if args.key?(:labels) @multiplexed = args[:multiplexed] if args.key?(:multiplexed) @name = args[:name] if args.key?(:name) end |