Class: Google::Apis::SpannerV1::Session

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/spanner_v1/classes.rb,
generated/google/apis/spanner_v1/representations.rb,
generated/google/apis/spanner_v1/representations.rb

Overview

A session in the Cloud Spanner API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Session

Returns a new instance of Session



1992
1993
1994
# File 'generated/google/apis/spanner_v1/classes.rb', line 1992

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#approximate_last_use_timeString

Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time. Corresponds to the JSON property approximateLastUseTime

Returns:

  • (String)


1970
1971
1972
# File 'generated/google/apis/spanner_v1/classes.rb', line 1970

def approximate_last_use_time
  @approximate_last_use_time
end

#create_timeString

Output only. The timestamp when the session is created. Corresponds to the JSON property createTime

Returns:

  • (String)


1975
1976
1977
# File 'generated/google/apis/spanner_v1/classes.rb', line 1975

def create_time
  @create_time
end

#labelsHash<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 20 labels can be associated with a given session. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1985
1986
1987
# File 'generated/google/apis/spanner_v1/classes.rb', line 1985

def labels
  @labels
end

#nameString

The name of the session. Corresponds to the JSON property name

Returns:

  • (String)


1990
1991
1992
# File 'generated/google/apis/spanner_v1/classes.rb', line 1990

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1997
1998
1999
2000
2001
2002
# File 'generated/google/apis/spanner_v1/classes.rb', line 1997

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)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
end