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

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

Next id: 10

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) ⇒ AggregateRequest

Returns a new instance of AggregateRequest



167
168
169
# File 'generated/google/apis/fitness_v1/classes.rb', line 167

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



116
117
118
# File 'generated/google/apis/fitness_v1/classes.rb', line 116

def aggregate_by
  @aggregate_by
end

#bucket_by_activity_segmentGoogle::Apis::FitnessV1::BucketByActivity

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



124
125
126
# File 'generated/google/apis/fitness_v1/classes.rb', line 124

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



133
134
135
# File 'generated/google/apis/fitness_v1/classes.rb', line 133

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



140
141
142
# File 'generated/google/apis/fitness_v1/classes.rb', line 140

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



146
147
148
# File 'generated/google/apis/fitness_v1/classes.rb', line 146

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. Corresponds to the JSON property endTimeMillis

Returns:

  • (Fixnum)


152
153
154
# File 'generated/google/apis/fitness_v1/classes.rb', line 152

def end_time_millis
  @end_time_millis
end

#filtered_data_quality_standardArray<String>

A list of acceptable data quality standards. Only data points which conform to at least one of the specified data quality standards will be returned. If the list is empty, all data points are returned. Corresponds to the JSON property filteredDataQualityStandard

Returns:

  • (Array<String>)


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

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)


165
166
167
# File 'generated/google/apis/fitness_v1/classes.rb', line 165

def start_time_millis
  @start_time_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



172
173
174
175
176
177
178
179
180
181
# File 'generated/google/apis/fitness_v1/classes.rb', line 172

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