# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AirQuality.V1.Model.LookupCurrentConditionsRequest do
  @moduledoc """
  The request definition of the air quality current conditions.

  ## Attributes

  *   `customLocalAqis` (*type:* `list(GoogleApi.AirQuality.V1.Model.CustomLocalAqi.t)`, *default:* `nil`) - 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.
  *   `extraComputations` (*type:* `list(String.t)`, *default:* `nil`) - 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.
  *   `languageCode` (*type:* `String.t`, *default:* `nil`) - 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.
  *   `location` (*type:* `GoogleApi.AirQuality.V1.Model.LatLng.t`, *default:* `nil`) - Required. The longitude and latitude from which the API looks for air quality current conditions data.
  *   `uaqiColorPalette` (*type:* `String.t`, *default:* `nil`) - 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.
  *   `universalAqi` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :customLocalAqis => list(GoogleApi.AirQuality.V1.Model.CustomLocalAqi.t()) | nil,
          :extraComputations => list(String.t()) | nil,
          :languageCode => String.t() | nil,
          :location => GoogleApi.AirQuality.V1.Model.LatLng.t() | nil,
          :uaqiColorPalette => String.t() | nil,
          :universalAqi => boolean() | nil
        }

  field(:customLocalAqis, as: GoogleApi.AirQuality.V1.Model.CustomLocalAqi, type: :list)
  field(:extraComputations, type: :list)
  field(:languageCode)
  field(:location, as: GoogleApi.AirQuality.V1.Model.LatLng)
  field(:uaqiColorPalette)
  field(:universalAqi)
end

defimpl Poison.Decoder, for: GoogleApi.AirQuality.V1.Model.LookupCurrentConditionsRequest do
  def decode(value, options) do
    GoogleApi.AirQuality.V1.Model.LookupCurrentConditionsRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AirQuality.V1.Model.LookupCurrentConditionsRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
