Class: Google::Apis::FitnessV1::Value
- Inherits:
-
Object
- Object
- Google::Apis::FitnessV1::Value
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/fitness_v1/classes.rb,
lib/google/apis/fitness_v1/representations.rb,
lib/google/apis/fitness_v1/representations.rb
Overview
Holder object for the value of a single field in a data point. A field value has a particular format and is only ever set to one of an integer or a floating point value.
Instance Attribute Summary collapse
-
#fp_val ⇒ Float
Floating point value.
-
#int_val ⇒ Fixnum
Integer value.
-
#map_val ⇒ Array<Google::Apis::FitnessV1::ValueMapValEntry>
Map value.
-
#string_val ⇒ String
String value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Value
constructor
A new instance of Value.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Value
Returns a new instance of Value.
944 945 946 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 944 def initialize(**args) update!(**args) end |
Instance Attribute Details
#fp_val ⇒ Float
Floating point value. When this is set, other values must not be set.
Corresponds to the JSON property fpVal
922 923 924 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 922 def fp_val @fp_val end |
#int_val ⇒ Fixnum
Integer value. When this is set, other values must not be set.
Corresponds to the JSON property intVal
927 928 929 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 927 def int_val @int_val end |
#map_val ⇒ Array<Google::Apis::FitnessV1::ValueMapValEntry>
Map value. The valid key space and units for the corresponding value of each
entry should be documented as part of the data type definition. Keys should be
kept small whenever possible. Data streams with large keys and high data
frequency may be down sampled.
Corresponds to the JSON property mapVal
935 936 937 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 935 def map_val @map_val end |
#string_val ⇒ String
String value. When this is set, other values must not be set. Strings should
be kept small whenever possible. Data streams with large string values and
high data frequency may be down sampled.
Corresponds to the JSON property stringVal
942 943 944 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 942 def string_val @string_val end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
949 950 951 952 953 954 |
# File 'lib/google/apis/fitness_v1/classes.rb', line 949 def update!(**args) @fp_val = args[:fp_val] if args.key?(:fp_val) @int_val = args[:int_val] if args.key?(:int_val) @map_val = args[:map_val] if args.key?(:map_val) @string_val = args[:string_val] if args.key?(:string_val) end |