Class: Google::Apis::SpannerV1::ContextValue
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ContextValue
- 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
-
#label ⇒ Google::Apis::SpannerV1::LocalizedString
A message representing a user-facing string whose value may need to be translated before being displayed.
-
#severity ⇒ String
The severity of this context.
-
#unit ⇒ String
The unit of the context value.
-
#value ⇒ Float
The value for the context.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ContextValue
constructor
A new instance of ContextValue.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ContextValue
Returns a new instance of ContextValue.
861 862 863 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 861 def initialize(**args) update!(**args) end |
Instance Attribute Details
#label ⇒ Google::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
844 845 846 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 844 def label @label end |
#severity ⇒ String
The severity of this context.
Corresponds to the JSON property severity
849 850 851 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 849 def severity @severity end |
#unit ⇒ String
The unit of the context value.
Corresponds to the JSON property unit
854 855 856 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 854 def unit @unit end |
#value ⇒ Float
The value for the context.
Corresponds to the JSON property value
859 860 861 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 859 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
866 867 868 869 870 871 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 866 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 |