Class: Google::Apis::AirqualityV1::LookupForecastRequest

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 forecast API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LookupForecastRequest

Returns a new instance of LookupForecastRequest.



757
758
759
# File 'lib/google/apis/airquality_v1/classes.rb', line 757

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



690
691
692
# File 'lib/google/apis/airquality_v1/classes.rb', line 690

def custom_local_aqis
  @custom_local_aqis
end

#date_timeString

A timestamp for which to return the data for a specific point in time. 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 date_time parameter is set to 2023-01-03T11: 05:49Z will be rounded down to 2023-01-03T11:00:00Z. Corresponds to the JSON property dateTime

Returns:

  • (String)


699
700
701
# File 'lib/google/apis/airquality_v1/classes.rb', line 699

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


706
707
708
# File 'lib/google/apis/airquality_v1/classes.rb', line 706

def extra_computations
  @extra_computations
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 = 'en'). Corresponds to the JSON property languageCode

Returns:

  • (String)


713
714
715
# File 'lib/google/apis/airquality_v1/classes.rb', line 713

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



721
722
723
# File 'lib/google/apis/airquality_v1/classes.rb', line 721

def location
  @location
end

#page_sizeFixnum

Optional. The maximum number of hourly info records to return per page ( default = 24). Corresponds to the JSON property pageSize

Returns:

  • (Fixnum)


727
728
729
# File 'lib/google/apis/airquality_v1/classes.rb', line 727

def page_size
  @page_size
end

#page_tokenString

Optional. A page token received from a previous forecast call. It is used to retrieve the subsequent page. Corresponds to the JSON property pageToken

Returns:

  • (String)


733
734
735
# File 'lib/google/apis/airquality_v1/classes.rb', line 733

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



741
742
743
# File 'lib/google/apis/airquality_v1/classes.rb', line 741

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)


748
749
750
# File 'lib/google/apis/airquality_v1/classes.rb', line 748

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 = true). Corresponds to the JSON property universalAqi

Returns:

  • (Boolean)


754
755
756
# File 'lib/google/apis/airquality_v1/classes.rb', line 754

def universal_aqi
  @universal_aqi
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/google/apis/airquality_v1/classes.rb', line 762

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)
  @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