module Stratosphere.EC2.LaunchTemplate.PrivateIpAddProperty (
PrivateIpAddProperty(..), mkPrivateIpAddProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PrivateIpAddProperty
=
PrivateIpAddProperty {PrivateIpAddProperty -> ()
haddock_workaround_ :: (),
PrivateIpAddProperty -> Maybe (Value Bool)
primary :: (Prelude.Maybe (Value Prelude.Bool)),
PrivateIpAddProperty -> Maybe (Value Text)
privateIpAddress :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (PrivateIpAddProperty -> PrivateIpAddProperty -> Bool
(PrivateIpAddProperty -> PrivateIpAddProperty -> Bool)
-> (PrivateIpAddProperty -> PrivateIpAddProperty -> Bool)
-> Eq PrivateIpAddProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrivateIpAddProperty -> PrivateIpAddProperty -> Bool
== :: PrivateIpAddProperty -> PrivateIpAddProperty -> Bool
$c/= :: PrivateIpAddProperty -> PrivateIpAddProperty -> Bool
/= :: PrivateIpAddProperty -> PrivateIpAddProperty -> Bool
Prelude.Eq, Int -> PrivateIpAddProperty -> ShowS
[PrivateIpAddProperty] -> ShowS
PrivateIpAddProperty -> String
(Int -> PrivateIpAddProperty -> ShowS)
-> (PrivateIpAddProperty -> String)
-> ([PrivateIpAddProperty] -> ShowS)
-> Show PrivateIpAddProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrivateIpAddProperty -> ShowS
showsPrec :: Int -> PrivateIpAddProperty -> ShowS
$cshow :: PrivateIpAddProperty -> String
show :: PrivateIpAddProperty -> String
$cshowList :: [PrivateIpAddProperty] -> ShowS
showList :: [PrivateIpAddProperty] -> ShowS
Prelude.Show)
mkPrivateIpAddProperty :: PrivateIpAddProperty
mkPrivateIpAddProperty :: PrivateIpAddProperty
mkPrivateIpAddProperty
= PrivateIpAddProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), primary :: Maybe (Value Bool)
primary = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
privateIpAddress :: Maybe (Value Text)
privateIpAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PrivateIpAddProperty where
toResourceProperties :: PrivateIpAddProperty -> ResourceProperties
toResourceProperties PrivateIpAddProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PrivateIpAddProperty -> ()
primary :: PrivateIpAddProperty -> Maybe (Value Bool)
privateIpAddress :: PrivateIpAddProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
privateIpAddress :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.PrivateIpAdd",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"Primary" (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)
primary,
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
"PrivateIpAddress" (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)
privateIpAddress])}
instance JSON.ToJSON PrivateIpAddProperty where
toJSON :: PrivateIpAddProperty -> Value
toJSON PrivateIpAddProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PrivateIpAddProperty -> ()
primary :: PrivateIpAddProperty -> Maybe (Value Bool)
privateIpAddress :: PrivateIpAddProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
privateIpAddress :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"Primary" (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)
primary,
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
"PrivateIpAddress" (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)
privateIpAddress]))
instance Property "Primary" PrivateIpAddProperty where
type PropertyType "Primary" PrivateIpAddProperty = Value Prelude.Bool
set :: PropertyType "Primary" PrivateIpAddProperty
-> PrivateIpAddProperty -> PrivateIpAddProperty
set PropertyType "Primary" PrivateIpAddProperty
newValue PrivateIpAddProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PrivateIpAddProperty -> ()
primary :: PrivateIpAddProperty -> Maybe (Value Bool)
privateIpAddress :: PrivateIpAddProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
privateIpAddress :: Maybe (Value Text)
..}
= PrivateIpAddProperty {primary :: Maybe (Value Bool)
primary = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Primary" PrivateIpAddProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
privateIpAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
privateIpAddress :: Maybe (Value Text)
..}
instance Property "PrivateIpAddress" PrivateIpAddProperty where
type PropertyType "PrivateIpAddress" PrivateIpAddProperty = Value Prelude.Text
set :: PropertyType "PrivateIpAddress" PrivateIpAddProperty
-> PrivateIpAddProperty -> PrivateIpAddProperty
set PropertyType "PrivateIpAddress" PrivateIpAddProperty
newValue PrivateIpAddProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: PrivateIpAddProperty -> ()
primary :: PrivateIpAddProperty -> Maybe (Value Bool)
privateIpAddress :: PrivateIpAddProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
privateIpAddress :: Maybe (Value Text)
..}
= PrivateIpAddProperty
{privateIpAddress :: Maybe (Value Text)
privateIpAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrivateIpAddress" PrivateIpAddProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
haddock_workaround_ :: ()
primary :: Maybe (Value Bool)
..}