Class: Google::Apis::SpannerV1::ContextValue

Inherits:
Object
  • Object
show all
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 message representing context for a KeyRangeInfo, including a label, value, unit, and severity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContextValue

Returns a new instance of ContextValue.



1305
1306
1307
# File 'lib/google/apis/spanner_v1/classes.rb', line 1305

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

Instance Attribute Details

#labelGoogle::Apis::SpannerV1::LocalizedString

A message representing a user-facing string whose value may need to be translated before being displayed. Corresponds to the JSON property label



1288
1289
1290
# File 'lib/google/apis/spanner_v1/classes.rb', line 1288

def label
  @label
end

#severityString

The severity of this context. Corresponds to the JSON property severity

Returns:

  • (String)


1293
1294
1295
# File 'lib/google/apis/spanner_v1/classes.rb', line 1293

def severity
  @severity
end

#unitString

The unit of the context value. Corresponds to the JSON property unit

Returns:

  • (String)


1298
1299
1300
# File 'lib/google/apis/spanner_v1/classes.rb', line 1298

def unit
  @unit
end

#valueFloat

The value for the context. Corresponds to the JSON property value

Returns:

  • (Float)


1303
1304
1305
# File 'lib/google/apis/spanner_v1/classes.rb', line 1303

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1310
1311
1312
1313
1314
1315
# File 'lib/google/apis/spanner_v1/classes.rb', line 1310

def update!(**args)
  @label = args[:label] if args.key?(:label)
  @severity = args[:severity] if args.key?(:severity)
  @unit = args[:unit] if args.key?(:unit)
  @value = args[:value] if args.key?(:value)
end