{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.Forecast.Types.SupplementaryFeature -- Copyright : (c) 2013-2021 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.Forecast.Types.SupplementaryFeature where import qualified Amazonka.Core as Core import qualified Amazonka.Lens as Lens import qualified Amazonka.Prelude as Prelude -- | Describes a supplementary feature of a dataset group. This object is -- part of the InputDataConfig object. Forecast supports the Weather Index -- and Holidays built-in featurizations. -- -- __Weather Index__ -- -- The Amazon Forecast Weather Index is a built-in featurization that -- incorporates historical and projected weather information into your -- model. The Weather Index supplements your datasets with over two years -- of historical weather data and up to 14 days of projected weather data. -- For more information, see -- <https://docs.aws.amazon.com/forecast/latest/dg/weather.html Amazon Forecast Weather Index>. -- -- __Holidays__ -- -- Holidays is a built-in featurization that incorporates a -- feature-engineered dataset of national holiday information into your -- model. It provides native support for the holiday calendars of 66 -- countries. To view the holiday calendars, refer to the -- <http://jollyday.sourceforge.net/data.html Jollyday> library. For more -- information, see -- <https://docs.aws.amazon.com/forecast/latest/dg/holidays.html Holidays Featurization>. -- -- /See:/ 'newSupplementaryFeature' smart constructor. data SupplementaryFeature = SupplementaryFeature' { -- | The name of the feature. Valid values: @\"holiday\"@ and @\"weather\"@. SupplementaryFeature -> Text name :: Prelude.Text, -- | __Weather Index__ -- -- To enable the Weather Index, set the value to @\"true\"@ -- -- __Holidays__ -- -- To enable Holidays, specify a country with one of the following -- two-letter country codes: -- -- - \"AL\" - ALBANIA -- -- - \"AR\" - ARGENTINA -- -- - \"AT\" - AUSTRIA -- -- - \"AU\" - AUSTRALIA -- -- - \"BA\" - BOSNIA HERZEGOVINA -- -- - \"BE\" - BELGIUM -- -- - \"BG\" - BULGARIA -- -- - \"BO\" - BOLIVIA -- -- - \"BR\" - BRAZIL -- -- - \"BY\" - BELARUS -- -- - \"CA\" - CANADA -- -- - \"CL\" - CHILE -- -- - \"CO\" - COLOMBIA -- -- - \"CR\" - COSTA RICA -- -- - \"HR\" - CROATIA -- -- - \"CZ\" - CZECH REPUBLIC -- -- - \"DK\" - DENMARK -- -- - \"EC\" - ECUADOR -- -- - \"EE\" - ESTONIA -- -- - \"ET\" - ETHIOPIA -- -- - \"FI\" - FINLAND -- -- - \"FR\" - FRANCE -- -- - \"DE\" - GERMANY -- -- - \"GR\" - GREECE -- -- - \"HU\" - HUNGARY -- -- - \"IS\" - ICELAND -- -- - \"IN\" - INDIA -- -- - \"IE\" - IRELAND -- -- - \"IT\" - ITALY -- -- - \"JP\" - JAPAN -- -- - \"KZ\" - KAZAKHSTAN -- -- - \"KR\" - KOREA -- -- - \"LV\" - LATVIA -- -- - \"LI\" - LIECHTENSTEIN -- -- - \"LT\" - LITHUANIA -- -- - \"LU\" - LUXEMBOURG -- -- - \"MK\" - MACEDONIA -- -- - \"MT\" - MALTA -- -- - \"MX\" - MEXICO -- -- - \"MD\" - MOLDOVA -- -- - \"ME\" - MONTENEGRO -- -- - \"NL\" - NETHERLANDS -- -- - \"NZ\" - NEW ZEALAND -- -- - \"NI\" - NICARAGUA -- -- - \"NG\" - NIGERIA -- -- - \"NO\" - NORWAY -- -- - \"PA\" - PANAMA -- -- - \"PY\" - PARAGUAY -- -- - \"PE\" - PERU -- -- - \"PL\" - POLAND -- -- - \"PT\" - PORTUGAL -- -- - \"RO\" - ROMANIA -- -- - \"RU\" - RUSSIA -- -- - \"RS\" - SERBIA -- -- - \"SK\" - SLOVAKIA -- -- - \"SI\" - SLOVENIA -- -- - \"ZA\" - SOUTH AFRICA -- -- - \"ES\" - SPAIN -- -- - \"SE\" - SWEDEN -- -- - \"CH\" - SWITZERLAND -- -- - \"UA\" - UKRAINE -- -- - \"AE\" - UNITED ARAB EMIRATES -- -- - \"US\" - UNITED STATES -- -- - \"UK\" - UNITED KINGDOM -- -- - \"UY\" - URUGUAY -- -- - \"VE\" - VENEZUELA SupplementaryFeature -> Text value :: Prelude.Text } deriving (SupplementaryFeature -> SupplementaryFeature -> Bool (SupplementaryFeature -> SupplementaryFeature -> Bool) -> (SupplementaryFeature -> SupplementaryFeature -> Bool) -> Eq SupplementaryFeature forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: SupplementaryFeature -> SupplementaryFeature -> Bool $c/= :: SupplementaryFeature -> SupplementaryFeature -> Bool == :: SupplementaryFeature -> SupplementaryFeature -> Bool $c== :: SupplementaryFeature -> SupplementaryFeature -> Bool Prelude.Eq, ReadPrec [SupplementaryFeature] ReadPrec SupplementaryFeature Int -> ReadS SupplementaryFeature ReadS [SupplementaryFeature] (Int -> ReadS SupplementaryFeature) -> ReadS [SupplementaryFeature] -> ReadPrec SupplementaryFeature -> ReadPrec [SupplementaryFeature] -> Read SupplementaryFeature forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [SupplementaryFeature] $creadListPrec :: ReadPrec [SupplementaryFeature] readPrec :: ReadPrec SupplementaryFeature $creadPrec :: ReadPrec SupplementaryFeature readList :: ReadS [SupplementaryFeature] $creadList :: ReadS [SupplementaryFeature] readsPrec :: Int -> ReadS SupplementaryFeature $creadsPrec :: Int -> ReadS SupplementaryFeature Prelude.Read, Int -> SupplementaryFeature -> ShowS [SupplementaryFeature] -> ShowS SupplementaryFeature -> String (Int -> SupplementaryFeature -> ShowS) -> (SupplementaryFeature -> String) -> ([SupplementaryFeature] -> ShowS) -> Show SupplementaryFeature forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [SupplementaryFeature] -> ShowS $cshowList :: [SupplementaryFeature] -> ShowS show :: SupplementaryFeature -> String $cshow :: SupplementaryFeature -> String showsPrec :: Int -> SupplementaryFeature -> ShowS $cshowsPrec :: Int -> SupplementaryFeature -> ShowS Prelude.Show, (forall x. SupplementaryFeature -> Rep SupplementaryFeature x) -> (forall x. Rep SupplementaryFeature x -> SupplementaryFeature) -> Generic SupplementaryFeature forall x. Rep SupplementaryFeature x -> SupplementaryFeature forall x. SupplementaryFeature -> Rep SupplementaryFeature x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep SupplementaryFeature x -> SupplementaryFeature $cfrom :: forall x. SupplementaryFeature -> Rep SupplementaryFeature x Prelude.Generic) -- | -- Create a value of 'SupplementaryFeature' with all optional fields omitted. -- -- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'name', 'supplementaryFeature_name' - The name of the feature. Valid values: @\"holiday\"@ and @\"weather\"@. -- -- 'value', 'supplementaryFeature_value' - __Weather Index__ -- -- To enable the Weather Index, set the value to @\"true\"@ -- -- __Holidays__ -- -- To enable Holidays, specify a country with one of the following -- two-letter country codes: -- -- - \"AL\" - ALBANIA -- -- - \"AR\" - ARGENTINA -- -- - \"AT\" - AUSTRIA -- -- - \"AU\" - AUSTRALIA -- -- - \"BA\" - BOSNIA HERZEGOVINA -- -- - \"BE\" - BELGIUM -- -- - \"BG\" - BULGARIA -- -- - \"BO\" - BOLIVIA -- -- - \"BR\" - BRAZIL -- -- - \"BY\" - BELARUS -- -- - \"CA\" - CANADA -- -- - \"CL\" - CHILE -- -- - \"CO\" - COLOMBIA -- -- - \"CR\" - COSTA RICA -- -- - \"HR\" - CROATIA -- -- - \"CZ\" - CZECH REPUBLIC -- -- - \"DK\" - DENMARK -- -- - \"EC\" - ECUADOR -- -- - \"EE\" - ESTONIA -- -- - \"ET\" - ETHIOPIA -- -- - \"FI\" - FINLAND -- -- - \"FR\" - FRANCE -- -- - \"DE\" - GERMANY -- -- - \"GR\" - GREECE -- -- - \"HU\" - HUNGARY -- -- - \"IS\" - ICELAND -- -- - \"IN\" - INDIA -- -- - \"IE\" - IRELAND -- -- - \"IT\" - ITALY -- -- - \"JP\" - JAPAN -- -- - \"KZ\" - KAZAKHSTAN -- -- - \"KR\" - KOREA -- -- - \"LV\" - LATVIA -- -- - \"LI\" - LIECHTENSTEIN -- -- - \"LT\" - LITHUANIA -- -- - \"LU\" - LUXEMBOURG -- -- - \"MK\" - MACEDONIA -- -- - \"MT\" - MALTA -- -- - \"MX\" - MEXICO -- -- - \"MD\" - MOLDOVA -- -- - \"ME\" - MONTENEGRO -- -- - \"NL\" - NETHERLANDS -- -- - \"NZ\" - NEW ZEALAND -- -- - \"NI\" - NICARAGUA -- -- - \"NG\" - NIGERIA -- -- - \"NO\" - NORWAY -- -- - \"PA\" - PANAMA -- -- - \"PY\" - PARAGUAY -- -- - \"PE\" - PERU -- -- - \"PL\" - POLAND -- -- - \"PT\" - PORTUGAL -- -- - \"RO\" - ROMANIA -- -- - \"RU\" - RUSSIA -- -- - \"RS\" - SERBIA -- -- - \"SK\" - SLOVAKIA -- -- - \"SI\" - SLOVENIA -- -- - \"ZA\" - SOUTH AFRICA -- -- - \"ES\" - SPAIN -- -- - \"SE\" - SWEDEN -- -- - \"CH\" - SWITZERLAND -- -- - \"UA\" - UKRAINE -- -- - \"AE\" - UNITED ARAB EMIRATES -- -- - \"US\" - UNITED STATES -- -- - \"UK\" - UNITED KINGDOM -- -- - \"UY\" - URUGUAY -- -- - \"VE\" - VENEZUELA newSupplementaryFeature :: -- | 'name' Prelude.Text -> -- | 'value' Prelude.Text -> SupplementaryFeature newSupplementaryFeature :: Text -> Text -> SupplementaryFeature newSupplementaryFeature Text pName_ Text pValue_ = SupplementaryFeature' :: Text -> Text -> SupplementaryFeature SupplementaryFeature' { $sel:name:SupplementaryFeature' :: Text name = Text pName_, $sel:value:SupplementaryFeature' :: Text value = Text pValue_ } -- | The name of the feature. Valid values: @\"holiday\"@ and @\"weather\"@. supplementaryFeature_name :: Lens.Lens' SupplementaryFeature Prelude.Text supplementaryFeature_name :: (Text -> f Text) -> SupplementaryFeature -> f SupplementaryFeature supplementaryFeature_name = (SupplementaryFeature -> Text) -> (SupplementaryFeature -> Text -> SupplementaryFeature) -> Lens SupplementaryFeature SupplementaryFeature Text Text forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\SupplementaryFeature' {Text name :: Text $sel:name:SupplementaryFeature' :: SupplementaryFeature -> Text name} -> Text name) (\s :: SupplementaryFeature s@SupplementaryFeature' {} Text a -> SupplementaryFeature s {$sel:name:SupplementaryFeature' :: Text name = Text a} :: SupplementaryFeature) -- | __Weather Index__ -- -- To enable the Weather Index, set the value to @\"true\"@ -- -- __Holidays__ -- -- To enable Holidays, specify a country with one of the following -- two-letter country codes: -- -- - \"AL\" - ALBANIA -- -- - \"AR\" - ARGENTINA -- -- - \"AT\" - AUSTRIA -- -- - \"AU\" - AUSTRALIA -- -- - \"BA\" - BOSNIA HERZEGOVINA -- -- - \"BE\" - BELGIUM -- -- - \"BG\" - BULGARIA -- -- - \"BO\" - BOLIVIA -- -- - \"BR\" - BRAZIL -- -- - \"BY\" - BELARUS -- -- - \"CA\" - CANADA -- -- - \"CL\" - CHILE -- -- - \"CO\" - COLOMBIA -- -- - \"CR\" - COSTA RICA -- -- - \"HR\" - CROATIA -- -- - \"CZ\" - CZECH REPUBLIC -- -- - \"DK\" - DENMARK -- -- - \"EC\" - ECUADOR -- -- - \"EE\" - ESTONIA -- -- - \"ET\" - ETHIOPIA -- -- - \"FI\" - FINLAND -- -- - \"FR\" - FRANCE -- -- - \"DE\" - GERMANY -- -- - \"GR\" - GREECE -- -- - \"HU\" - HUNGARY -- -- - \"IS\" - ICELAND -- -- - \"IN\" - INDIA -- -- - \"IE\" - IRELAND -- -- - \"IT\" - ITALY -- -- - \"JP\" - JAPAN -- -- - \"KZ\" - KAZAKHSTAN -- -- - \"KR\" - KOREA -- -- - \"LV\" - LATVIA -- -- - \"LI\" - LIECHTENSTEIN -- -- - \"LT\" - LITHUANIA -- -- - \"LU\" - LUXEMBOURG -- -- - \"MK\" - MACEDONIA -- -- - \"MT\" - MALTA -- -- - \"MX\" - MEXICO -- -- - \"MD\" - MOLDOVA -- -- - \"ME\" - MONTENEGRO -- -- - \"NL\" - NETHERLANDS -- -- - \"NZ\" - NEW ZEALAND -- -- - \"NI\" - NICARAGUA -- -- - \"NG\" - NIGERIA -- -- - \"NO\" - NORWAY -- -- - \"PA\" - PANAMA -- -- - \"PY\" - PARAGUAY -- -- - \"PE\" - PERU -- -- - \"PL\" - POLAND -- -- - \"PT\" - PORTUGAL -- -- - \"RO\" - ROMANIA -- -- - \"RU\" - RUSSIA -- -- - \"RS\" - SERBIA -- -- - \"SK\" - SLOVAKIA -- -- - \"SI\" - SLOVENIA -- -- - \"ZA\" - SOUTH AFRICA -- -- - \"ES\" - SPAIN -- -- - \"SE\" - SWEDEN -- -- - \"CH\" - SWITZERLAND -- -- - \"UA\" - UKRAINE -- -- - \"AE\" - UNITED ARAB EMIRATES -- -- - \"US\" - UNITED STATES -- -- - \"UK\" - UNITED KINGDOM -- -- - \"UY\" - URUGUAY -- -- - \"VE\" - VENEZUELA supplementaryFeature_value :: Lens.Lens' SupplementaryFeature Prelude.Text supplementaryFeature_value :: (Text -> f Text) -> SupplementaryFeature -> f SupplementaryFeature supplementaryFeature_value = (SupplementaryFeature -> Text) -> (SupplementaryFeature -> Text -> SupplementaryFeature) -> Lens SupplementaryFeature SupplementaryFeature Text Text forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\SupplementaryFeature' {Text value :: Text $sel:value:SupplementaryFeature' :: SupplementaryFeature -> Text value} -> Text value) (\s :: SupplementaryFeature s@SupplementaryFeature' {} Text a -> SupplementaryFeature s {$sel:value:SupplementaryFeature' :: Text value = Text a} :: SupplementaryFeature) instance Core.FromJSON SupplementaryFeature where parseJSON :: Value -> Parser SupplementaryFeature parseJSON = String -> (Object -> Parser SupplementaryFeature) -> Value -> Parser SupplementaryFeature forall a. String -> (Object -> Parser a) -> Value -> Parser a Core.withObject String "SupplementaryFeature" ( \Object x -> Text -> Text -> SupplementaryFeature SupplementaryFeature' (Text -> Text -> SupplementaryFeature) -> Parser Text -> Parser (Text -> SupplementaryFeature) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> (Object x Object -> Text -> Parser Text forall a. FromJSON a => Object -> Text -> Parser a Core..: Text "Name") Parser (Text -> SupplementaryFeature) -> Parser Text -> Parser SupplementaryFeature forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x Object -> Text -> Parser Text forall a. FromJSON a => Object -> Text -> Parser a Core..: Text "Value") ) instance Prelude.Hashable SupplementaryFeature instance Prelude.NFData SupplementaryFeature instance Core.ToJSON SupplementaryFeature where toJSON :: SupplementaryFeature -> Value toJSON SupplementaryFeature' {Text value :: Text name :: Text $sel:value:SupplementaryFeature' :: SupplementaryFeature -> Text $sel:name:SupplementaryFeature' :: SupplementaryFeature -> Text ..} = [Pair] -> Value Core.object ( [Maybe Pair] -> [Pair] forall a. [Maybe a] -> [a] Prelude.catMaybes [ Pair -> Maybe Pair forall a. a -> Maybe a Prelude.Just (Text "Name" Text -> Text -> Pair forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv Core..= Text name), Pair -> Maybe Pair forall a. a -> Maybe a Prelude.Just (Text "Value" Text -> Text -> Pair forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv Core..= Text value) ] )