module Stratosphere.EC2.IPAMAllocation (
IPAMAllocation(..), mkIPAMAllocation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IPAMAllocation
=
IPAMAllocation {IPAMAllocation -> ()
haddock_workaround_ :: (),
IPAMAllocation -> Maybe (Value Text)
cidr :: (Prelude.Maybe (Value Prelude.Text)),
IPAMAllocation -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
IPAMAllocation -> Value Text
ipamPoolId :: (Value Prelude.Text),
IPAMAllocation -> Maybe (Value Integer)
netmaskLength :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (IPAMAllocation -> IPAMAllocation -> Bool
(IPAMAllocation -> IPAMAllocation -> Bool)
-> (IPAMAllocation -> IPAMAllocation -> Bool) -> Eq IPAMAllocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IPAMAllocation -> IPAMAllocation -> Bool
== :: IPAMAllocation -> IPAMAllocation -> Bool
$c/= :: IPAMAllocation -> IPAMAllocation -> Bool
/= :: IPAMAllocation -> IPAMAllocation -> Bool
Prelude.Eq, Int -> IPAMAllocation -> ShowS
[IPAMAllocation] -> ShowS
IPAMAllocation -> String
(Int -> IPAMAllocation -> ShowS)
-> (IPAMAllocation -> String)
-> ([IPAMAllocation] -> ShowS)
-> Show IPAMAllocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IPAMAllocation -> ShowS
showsPrec :: Int -> IPAMAllocation -> ShowS
$cshow :: IPAMAllocation -> String
show :: IPAMAllocation -> String
$cshowList :: [IPAMAllocation] -> ShowS
showList :: [IPAMAllocation] -> ShowS
Prelude.Show)
mkIPAMAllocation :: Value Prelude.Text -> IPAMAllocation
mkIPAMAllocation :: Value Text -> IPAMAllocation
mkIPAMAllocation Value Text
ipamPoolId
= IPAMAllocation
{haddock_workaround_ :: ()
haddock_workaround_ = (), ipamPoolId :: Value Text
ipamPoolId = Value Text
ipamPoolId,
cidr :: Maybe (Value Text)
cidr = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
netmaskLength :: Maybe (Value Integer)
netmaskLength = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IPAMAllocation where
toResourceProperties :: IPAMAllocation -> ResourceProperties
toResourceProperties IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::IPAMAllocation",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"IpamPoolId" 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
ipamPoolId]
([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
"Cidr" (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)
cidr,
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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetmaskLength" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
netmaskLength]))}
instance JSON.ToJSON IPAMAllocation where
toJSON :: IPAMAllocation -> Value
toJSON IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= [(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
"IpamPoolId" 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
ipamPoolId]
([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
"Cidr" (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)
cidr,
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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetmaskLength" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
netmaskLength])))
instance Property "Cidr" IPAMAllocation where
type PropertyType "Cidr" IPAMAllocation = Value Prelude.Text
set :: PropertyType "Cidr" IPAMAllocation
-> IPAMAllocation -> IPAMAllocation
set PropertyType "Cidr" IPAMAllocation
newValue IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= IPAMAllocation {cidr :: Maybe (Value Text)
cidr = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cidr" IPAMAllocation
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
instance Property "Description" IPAMAllocation where
type PropertyType "Description" IPAMAllocation = Value Prelude.Text
set :: PropertyType "Description" IPAMAllocation
-> IPAMAllocation -> IPAMAllocation
set PropertyType "Description" IPAMAllocation
newValue IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= IPAMAllocation {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" IPAMAllocation
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
instance Property "IpamPoolId" IPAMAllocation where
type PropertyType "IpamPoolId" IPAMAllocation = Value Prelude.Text
set :: PropertyType "IpamPoolId" IPAMAllocation
-> IPAMAllocation -> IPAMAllocation
set PropertyType "IpamPoolId" IPAMAllocation
newValue IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= IPAMAllocation {ipamPoolId :: Value Text
ipamPoolId = PropertyType "IpamPoolId" IPAMAllocation
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
netmaskLength :: Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
netmaskLength :: Maybe (Value Integer)
..}
instance Property "NetmaskLength" IPAMAllocation where
type PropertyType "NetmaskLength" IPAMAllocation = Value Prelude.Integer
set :: PropertyType "NetmaskLength" IPAMAllocation
-> IPAMAllocation -> IPAMAllocation
set PropertyType "NetmaskLength" IPAMAllocation
newValue IPAMAllocation {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMAllocation -> ()
cidr :: IPAMAllocation -> Maybe (Value Text)
description :: IPAMAllocation -> Maybe (Value Text)
ipamPoolId :: IPAMAllocation -> Value Text
netmaskLength :: IPAMAllocation -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
= IPAMAllocation {netmaskLength :: Maybe (Value Integer)
netmaskLength = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NetmaskLength" IPAMAllocation
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
description :: Maybe (Value Text)
ipamPoolId :: Value Text
..}