Class: Google::Apis::FitnessV1::AggregateBucket

Inherits:
Object
  • Object
show all
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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AggregateBucket

Returns a new instance of AggregateBucket.



61
62
63
# File 'lib/google/apis/fitness_v1/classes.rb', line 61

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

Instance Attribute Details

#activityFixnum

Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT Corresponds to the JSON property activity

Returns:

  • (Fixnum)


32
33
34
# File 'lib/google/apis/fitness_v1/classes.rb', line 32

def activity
  @activity
end

#datasetArray<Google::Apis::FitnessV1::Dataset>

There will be one dataset per AggregateBy in the request. Corresponds to the JSON property dataset



37
38
39
# File 'lib/google/apis/fitness_v1/classes.rb', line 37

def dataset
  @dataset
end

#end_time_millisFixnum

The end time for the aggregated data, in milliseconds since epoch, inclusive. Corresponds to the JSON property endTimeMillis

Returns:

  • (Fixnum)


42
43
44
# File 'lib/google/apis/fitness_v1/classes.rb', line 42

def end_time_millis
  @end_time_millis
end

#sessionGoogle::Apis::FitnessV1::Session

Sessions contain metadata, such as a user-friendly name and time interval information. Corresponds to the JSON property session



48
49
50
# File 'lib/google/apis/fitness_v1/classes.rb', line 48

def session
  @session
end

#start_time_millisFixnum

The start time for the aggregated data, in milliseconds since epoch, inclusive. Corresponds to the JSON property startTimeMillis

Returns:

  • (Fixnum)


53
54
55
# File 'lib/google/apis/fitness_v1/classes.rb', line 53

def start_time_millis
  @start_time_millis
end

#typeString

The type of a bucket signifies how the data aggregation is performed in the bucket. Corresponds to the JSON property type

Returns:

  • (String)


59
60
61
# File 'lib/google/apis/fitness_v1/classes.rb', line 59

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



66
67
68
69
70
71
72
73
# File 'lib/google/apis/fitness_v1/classes.rb', line 66

def update!(**args)
  @activity = args[:activity] if args.key?(:activity)
  @dataset = args[:dataset] if args.key?(:dataset)
  @end_time_millis = args[:end_time_millis] if args.key?(:end_time_millis)
  @session = args[:session] if args.key?(:session)
  @start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
  @type = args[:type] if args.key?(:type)
end