Class: Google::Apis::FitnessV1::Value

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fitness_v1/classes.rb,
generated/google/apis/fitness_v1/representations.rb,
generated/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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Value

Returns a new instance of Value.



903
904
905
# File 'generated/google/apis/fitness_v1/classes.rb', line 903

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

Instance Attribute Details

#fp_valFloat

Floating point value. When this is set, other values must not be set. Corresponds to the JSON property fpVal

Returns:

  • (Float)


881
882
883
# File 'generated/google/apis/fitness_v1/classes.rb', line 881

def fp_val
  @fp_val
end

#int_valFixnum

Integer value. When this is set, other values must not be set. Corresponds to the JSON property intVal

Returns:

  • (Fixnum)


886
887
888
# File 'generated/google/apis/fitness_v1/classes.rb', line 886

def int_val
  @int_val
end

#map_valArray<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



894
895
896
# File 'generated/google/apis/fitness_v1/classes.rb', line 894

def map_val
  @map_val
end

#string_valString

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

Returns:

  • (String)


901
902
903
# File 'generated/google/apis/fitness_v1/classes.rb', line 901

def string_val
  @string_val
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



908
909
910
911
912
913
# File 'generated/google/apis/fitness_v1/classes.rb', line 908

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