module Stratosphere.GlobalAccelerator.Accelerator (
Accelerator(..), mkAccelerator
) 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 Accelerator
=
Accelerator {Accelerator -> ()
haddock_workaround_ :: (),
Accelerator -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
Accelerator -> Maybe (Value Text)
ipAddressType :: (Prelude.Maybe (Value Prelude.Text)),
Accelerator -> Maybe (ValueList Text)
ipAddresses :: (Prelude.Maybe (ValueList Prelude.Text)),
Accelerator -> Value Text
name :: (Value Prelude.Text),
Accelerator -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Accelerator -> Accelerator -> Bool
(Accelerator -> Accelerator -> Bool)
-> (Accelerator -> Accelerator -> Bool) -> Eq Accelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Accelerator -> Accelerator -> Bool
== :: Accelerator -> Accelerator -> Bool
$c/= :: Accelerator -> Accelerator -> Bool
/= :: Accelerator -> Accelerator -> Bool
Prelude.Eq, Int -> Accelerator -> ShowS
[Accelerator] -> ShowS
Accelerator -> String
(Int -> Accelerator -> ShowS)
-> (Accelerator -> String)
-> ([Accelerator] -> ShowS)
-> Show Accelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Accelerator -> ShowS
showsPrec :: Int -> Accelerator -> ShowS
$cshow :: Accelerator -> String
show :: Accelerator -> String
$cshowList :: [Accelerator] -> ShowS
showList :: [Accelerator] -> ShowS
Prelude.Show)
mkAccelerator :: Value Prelude.Text -> Accelerator
mkAccelerator :: Value Text -> Accelerator
mkAccelerator Value Text
name
= Accelerator
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
ipAddressType :: Maybe (Value Text)
ipAddressType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, ipAddresses :: Maybe (ValueList Text)
ipAddresses = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Accelerator where
toResourceProperties :: Accelerator -> ResourceProperties
toResourceProperties Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GlobalAccelerator::Accelerator",
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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"IpAddressType" (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)
ipAddressType,
Key -> ValueList 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
"IpAddresses" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
ipAddresses,
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 Accelerator where
toJSON :: Accelerator -> Value
toJSON Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: 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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"IpAddressType" (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)
ipAddressType,
Key -> ValueList 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
"IpAddresses" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
ipAddresses,
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 "Enabled" Accelerator where
type PropertyType "Enabled" Accelerator = Value Prelude.Bool
set :: PropertyType "Enabled" Accelerator -> Accelerator -> Accelerator
set PropertyType "Enabled" Accelerator
newValue Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= Accelerator {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" Accelerator
Value Bool
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "IpAddressType" Accelerator where
type PropertyType "IpAddressType" Accelerator = Value Prelude.Text
set :: PropertyType "IpAddressType" Accelerator
-> Accelerator -> Accelerator
set PropertyType "IpAddressType" Accelerator
newValue Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= Accelerator {ipAddressType :: Maybe (Value Text)
ipAddressType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IpAddressType" Accelerator
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "IpAddresses" Accelerator where
type PropertyType "IpAddresses" Accelerator = ValueList Prelude.Text
set :: PropertyType "IpAddresses" Accelerator
-> Accelerator -> Accelerator
set PropertyType "IpAddresses" Accelerator
newValue Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= Accelerator {ipAddresses :: Maybe (ValueList Text)
ipAddresses = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IpAddresses" Accelerator
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" Accelerator where
type PropertyType "Name" Accelerator = Value Prelude.Text
set :: PropertyType "Name" Accelerator -> Accelerator -> Accelerator
set PropertyType "Name" Accelerator
newValue Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..} = Accelerator {name :: Value Text
name = PropertyType "Name" Accelerator
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Accelerator where
type PropertyType "Tags" Accelerator = [Tag]
set :: PropertyType "Tags" Accelerator -> Accelerator -> Accelerator
set PropertyType "Tags" Accelerator
newValue Accelerator {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Accelerator -> ()
enabled :: Accelerator -> Maybe (Value Bool)
ipAddressType :: Accelerator -> Maybe (Value Text)
ipAddresses :: Accelerator -> Maybe (ValueList Text)
name :: Accelerator -> Value Text
tags :: Accelerator -> Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= Accelerator {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" Accelerator
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipAddressType :: Maybe (Value Text)
ipAddresses :: Maybe (ValueList Text)
name :: Value Text
..}