module Stratosphere.Location.RouteCalculator (
RouteCalculator(..), mkRouteCalculator
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data RouteCalculator
=
RouteCalculator {RouteCalculator -> ()
haddock_workaround_ :: (),
RouteCalculator -> Value Text
calculatorName :: (Value Prelude.Text),
RouteCalculator -> Value Text
dataSource :: (Value Prelude.Text),
RouteCalculator -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
RouteCalculator -> Maybe (Value Text)
pricingPlan :: (Prelude.Maybe (Value Prelude.Text)),
RouteCalculator -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (RouteCalculator -> RouteCalculator -> Bool
(RouteCalculator -> RouteCalculator -> Bool)
-> (RouteCalculator -> RouteCalculator -> Bool)
-> Eq RouteCalculator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RouteCalculator -> RouteCalculator -> Bool
== :: RouteCalculator -> RouteCalculator -> Bool
$c/= :: RouteCalculator -> RouteCalculator -> Bool
/= :: RouteCalculator -> RouteCalculator -> Bool
Prelude.Eq, Int -> RouteCalculator -> ShowS
[RouteCalculator] -> ShowS
RouteCalculator -> String
(Int -> RouteCalculator -> ShowS)
-> (RouteCalculator -> String)
-> ([RouteCalculator] -> ShowS)
-> Show RouteCalculator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RouteCalculator -> ShowS
showsPrec :: Int -> RouteCalculator -> ShowS
$cshow :: RouteCalculator -> String
show :: RouteCalculator -> String
$cshowList :: [RouteCalculator] -> ShowS
showList :: [RouteCalculator] -> ShowS
Prelude.Show)
mkRouteCalculator ::
Value Prelude.Text -> Value Prelude.Text -> RouteCalculator
mkRouteCalculator :: Value Text -> Value Text -> RouteCalculator
mkRouteCalculator Value Text
calculatorName Value Text
dataSource
= RouteCalculator
{haddock_workaround_ :: ()
haddock_workaround_ = (), calculatorName :: Value Text
calculatorName = Value Text
calculatorName,
dataSource :: Value Text
dataSource = Value Text
dataSource, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
pricingPlan :: Maybe (Value Text)
pricingPlan = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RouteCalculator where
toResourceProperties :: RouteCalculator -> ResourceProperties
toResourceProperties RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Location::RouteCalculator",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"CalculatorName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
calculatorName,
Key
"DataSource" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
dataSource]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PricingPlan" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
pricingPlan,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON RouteCalculator where
toJSON :: RouteCalculator -> Value
toJSON RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"CalculatorName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
calculatorName,
Key
"DataSource" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
dataSource]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PricingPlan" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
pricingPlan,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "CalculatorName" RouteCalculator where
type PropertyType "CalculatorName" RouteCalculator = Value Prelude.Text
set :: PropertyType "CalculatorName" RouteCalculator
-> RouteCalculator -> RouteCalculator
set PropertyType "CalculatorName" RouteCalculator
newValue RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= RouteCalculator {calculatorName :: Value Text
calculatorName = PropertyType "CalculatorName" RouteCalculator
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "DataSource" RouteCalculator where
type PropertyType "DataSource" RouteCalculator = Value Prelude.Text
set :: PropertyType "DataSource" RouteCalculator
-> RouteCalculator -> RouteCalculator
set PropertyType "DataSource" RouteCalculator
newValue RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= RouteCalculator {dataSource :: Value Text
dataSource = PropertyType "DataSource" RouteCalculator
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
calculatorName :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Description" RouteCalculator where
type PropertyType "Description" RouteCalculator = Value Prelude.Text
set :: PropertyType "Description" RouteCalculator
-> RouteCalculator -> RouteCalculator
set PropertyType "Description" RouteCalculator
newValue RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= RouteCalculator {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" RouteCalculator
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "PricingPlan" RouteCalculator where
type PropertyType "PricingPlan" RouteCalculator = Value Prelude.Text
set :: PropertyType "PricingPlan" RouteCalculator
-> RouteCalculator -> RouteCalculator
set PropertyType "PricingPlan" RouteCalculator
newValue RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= RouteCalculator {pricingPlan :: Maybe (Value Text)
pricingPlan = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PricingPlan" RouteCalculator
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" RouteCalculator where
type PropertyType "Tags" RouteCalculator = [Tag]
set :: PropertyType "Tags" RouteCalculator
-> RouteCalculator -> RouteCalculator
set PropertyType "Tags" RouteCalculator
newValue RouteCalculator {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RouteCalculator -> ()
calculatorName :: RouteCalculator -> Value Text
dataSource :: RouteCalculator -> Value Text
description :: RouteCalculator -> Maybe (Value Text)
pricingPlan :: RouteCalculator -> Maybe (Value Text)
tags :: RouteCalculator -> Maybe [Tag]
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= RouteCalculator {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" RouteCalculator
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
haddock_workaround_ :: ()
calculatorName :: Value Text
dataSource :: Value Text
description :: Maybe (Value Text)
pricingPlan :: Maybe (Value Text)
..}