Class: Google::Apis::FitnessV1::AggregateRequest

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

Overview

Next id: 10

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AggregateRequest

Returns a new instance of AggregateRequest.



172
173
174
# File 'lib/google/apis/fitness_v1/classes.rb', line 172

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

Instance Attribute Details

#aggregate_byArray<Google::Apis::FitnessV1::AggregateBy>

The specification of data to be aggregated. At least one aggregateBy spec must be provided. All data that is specified will be aggregated using the same bucketing criteria. There will be one dataset in the response for every aggregateBy spec. Corresponds to the JSON property aggregateBy



121
122
123
# File 'lib/google/apis/fitness_v1/classes.rb', line 121

def aggregate_by
  @aggregate_by
end

#bucket_by_activity_segmentGoogle::Apis::FitnessV1::BucketByActivity

Specifies that data be aggregated each activity segment recorded for a user. Similar to bucketByActivitySegment, but bucketing is done for each activity segment rather than all segments of the same type. Mutually exclusive of other bucketing specifications. Corresponds to the JSON property bucketByActivitySegment



129
130
131
# File 'lib/google/apis/fitness_v1/classes.rb', line 129

def bucket_by_activity_segment
  @bucket_by_activity_segment
end

#bucket_by_activity_typeGoogle::Apis::FitnessV1::BucketByActivity

Specifies that data be aggregated by the type of activity being performed when the data was recorded. All data that was recorded during a certain activity type (.for the given time range) will be aggregated into the same bucket. Data that was recorded while the user was not active will not be included in the response. Mutually exclusive of other bucketing specifications. Corresponds to the JSON property bucketByActivityType



138
139
140
# File 'lib/google/apis/fitness_v1/classes.rb', line 138

def bucket_by_activity_type
  @bucket_by_activity_type
end

#bucket_by_sessionGoogle::Apis::FitnessV1::BucketBySession

Specifies that data be aggregated by user sessions. Data that does not fall within the time range of a session will not be included in the response. Mutually exclusive of other bucketing specifications. Corresponds to the JSON property bucketBySession



145
146
147
# File 'lib/google/apis/fitness_v1/classes.rb', line 145

def bucket_by_session
  @bucket_by_session
end

#bucket_by_timeGoogle::Apis::FitnessV1::BucketByTime

Specifies that data be aggregated by a single time interval. Mutually exclusive of other bucketing specifications. Corresponds to the JSON property bucketByTime



151
152
153
# File 'lib/google/apis/fitness_v1/classes.rb', line 151

def bucket_by_time
  @bucket_by_time
end

#end_time_millisFixnum

The end of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. The maximum allowed difference between start_time_millis // and end_time_millis is 7776000000 (roughly 90 days). Corresponds to the JSON property endTimeMillis

Returns:

  • (Fixnum)


159
160
161
# File 'lib/google/apis/fitness_v1/classes.rb', line 159

def end_time_millis
  @end_time_millis
end

#filtered_data_quality_standardArray<String>

DO NOT POPULATE THIS FIELD. It is ignored. Corresponds to the JSON property filteredDataQualityStandard

Returns:

  • (Array<String>)


164
165
166
# File 'lib/google/apis/fitness_v1/classes.rb', line 164

def filtered_data_quality_standard
  @filtered_data_quality_standard
end

#start_time_millisFixnum

The start of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. Corresponds to the JSON property startTimeMillis

Returns:

  • (Fixnum)


170
171
172
# File 'lib/google/apis/fitness_v1/classes.rb', line 170

def start_time_millis
  @start_time_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



177
178
179
180
181
182
183
184
185
186
# File 'lib/google/apis/fitness_v1/classes.rb', line 177

def update!(**args)
  @aggregate_by = args[:aggregate_by] if args.key?(:aggregate_by)
  @bucket_by_activity_segment = args[:bucket_by_activity_segment] if args.key?(:bucket_by_activity_segment)
  @bucket_by_activity_type = args[:bucket_by_activity_type] if args.key?(:bucket_by_activity_type)
  @bucket_by_session = args[:bucket_by_session] if args.key?(:bucket_by_session)
  @bucket_by_time = args[:bucket_by_time] if args.key?(:bucket_by_time)
  @end_time_millis = args[:end_time_millis] if args.key?(:end_time_millis)
  @filtered_data_quality_standard = args[:filtered_data_quality_standard] if args.key?(:filtered_data_quality_standard)
  @start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
end