class Google::Apis::FitnessV1::AggregateRequest

Attributes

aggregate_by[RW]

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` @return [Array<Google::Apis::FitnessV1::AggregateBy>]

bucket_by_activity_segment[RW]

Specifies that data be aggregated each activity segment recored 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` @return [Google::Apis::FitnessV1::BucketByActivity]

bucket_by_activity_type[RW]

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` @return [Google::Apis::FitnessV1::BucketByActivity]

bucket_by_session[RW]

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` @return [Google::Apis::FitnessV1::BucketBySession]

bucket_by_time[RW]

Specifies that data be aggregated by a single time interval. Mutually exclusive of other bucketing specifications. Corresponds to the JSON property `bucketByTime` @return [Google::Apis::FitnessV1::BucketByTime]

end_time_millis[RW]

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. Corresponds to the JSON property `endTimeMillis` @return [String]

start_time_millis[RW]

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` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/fitness_v1/classes.rb, line 160
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/fitness_v1/classes.rb, line 165
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)
  @start_time_millis = args[:start_time_millis] if args.key?(:start_time_millis)
end