Class: Google::Apis::AirqualityV1::LookupHistoryRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/airquality_v1/classes.rb,
lib/google/apis/airquality_v1/representations.rb,
lib/google/apis/airquality_v1/representations.rb

Overview

The request object of the air quality history API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LookupHistoryRequest

Returns a new instance of LookupHistoryRequest.



900
901
902
# File 'lib/google/apis/airquality_v1/classes.rb', line 900

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

Instance Attribute Details

#custom_local_aqisArray<Google::Apis::AirqualityV1::CustomLocalAqi>

Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/ region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada. Corresponds to the JSON property customLocalAqis



823
824
825
# File 'lib/google/apis/airquality_v1/classes.rb', line 823

def custom_local_aqis
  @custom_local_aqis
end

#date_timeString

A timestamp for which to return historical data. The timestamp is rounded to the previous exact hour. Note: this will return hourly data for the requested timestamp only (i.e. a single hourly info element). For example, a request sent where the dateTime parameter is set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014- 10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Corresponds to the JSON property dateTime

Returns:

  • (String)


834
835
836
# File 'lib/google/apis/airquality_v1/classes.rb', line 834

def date_time
  @date_time
end

#extra_computationsArray<String>

Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response. Corresponds to the JSON property extraComputations

Returns:

  • (Array<String>)


841
842
843
# File 'lib/google/apis/airquality_v1/classes.rb', line 841

def extra_computations
  @extra_computations
end

#hoursFixnum

Number from 1 to 720 that indicates the hours range for the request. For example: A value of 48 will yield data from the last 48 hours. Corresponds to the JSON property hours

Returns:

  • (Fixnum)


847
848
849
# File 'lib/google/apis/airquality_v1/classes.rb', line 847

def hours
  @hours
end

#language_codeString

Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en. Corresponds to the JSON property languageCode

Returns:

  • (String)


854
855
856
# File 'lib/google/apis/airquality_v1/classes.rb', line 854

def language_code
  @language_code
end

#locationGoogle::Apis::AirqualityV1::LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property location



862
863
864
# File 'lib/google/apis/airquality_v1/classes.rb', line 862

def location
  @location
end

#page_sizeFixnum

Optional. The maximum number of hourly info records to return per page. The default is 72 and the max value is 168 (7 days of data). Corresponds to the JSON property pageSize

Returns:

  • (Fixnum)


868
869
870
# File 'lib/google/apis/airquality_v1/classes.rb', line 868

def page_size
  @page_size
end

#page_tokenString

Optional. A page token received from a previous history call. It is used to retrieve the subsequent page. Note that when providing a value for this parameter all other parameters provided must match the call that provided the page token (the previous call). Corresponds to the JSON property pageToken

Returns:

  • (String)


876
877
878
# File 'lib/google/apis/airquality_v1/classes.rb', line 876

def page_token
  @page_token
end

#periodGoogle::Apis::AirqualityV1::Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. Corresponds to the JSON property period



884
885
886
# File 'lib/google/apis/airquality_v1/classes.rb', line 884

def period
  @period
end

#uaqi_color_paletteString

Optional. Determines the color palette used for data provided by the ' Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled. Corresponds to the JSON property uaqiColorPalette

Returns:

  • (String)


891
892
893
# File 'lib/google/apis/airquality_v1/classes.rb', line 891

def uaqi_color_palette
  @uaqi_color_palette
end

#universal_aqiBoolean Also known as: universal_aqi?

Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true. Corresponds to the JSON property universalAqi

Returns:

  • (Boolean)


897
898
899
# File 'lib/google/apis/airquality_v1/classes.rb', line 897

def universal_aqi
  @universal_aqi
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



905
906
907
908
909
910
911
912
913
914
915
916
917
# File 'lib/google/apis/airquality_v1/classes.rb', line 905

def update!(**args)
  @custom_local_aqis = args[:custom_local_aqis] if args.key?(:custom_local_aqis)
  @date_time = args[:date_time] if args.key?(:date_time)
  @extra_computations = args[:extra_computations] if args.key?(:extra_computations)
  @hours = args[:hours] if args.key?(:hours)
  @language_code = args[:language_code] if args.key?(:language_code)
  @location = args[:location] if args.key?(:location)
  @page_size = args[:page_size] if args.key?(:page_size)
  @page_token = args[:page_token] if args.key?(:page_token)
  @period = args[:period] if args.key?(:period)
  @uaqi_color_palette = args[:uaqi_color_palette] if args.key?(:uaqi_color_palette)
  @universal_aqi = args[:universal_aqi] if args.key?(:universal_aqi)
end