module Stratosphere.EC2.IPAMPoolCidr (
        IPAMPoolCidr(..), mkIPAMPoolCidr
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IPAMPoolCidr
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampoolcidr.html>
    IPAMPoolCidr {IPAMPoolCidr -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampoolcidr.html#cfn-ec2-ipampoolcidr-cidr>
                  IPAMPoolCidr -> Maybe (Value Text)
cidr :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampoolcidr.html#cfn-ec2-ipampoolcidr-ipampoolid>
                  IPAMPoolCidr -> Value Text
ipamPoolId :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampoolcidr.html#cfn-ec2-ipampoolcidr-netmasklength>
                  IPAMPoolCidr -> Maybe (Value Integer)
netmaskLength :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (IPAMPoolCidr -> IPAMPoolCidr -> Bool
(IPAMPoolCidr -> IPAMPoolCidr -> Bool)
-> (IPAMPoolCidr -> IPAMPoolCidr -> Bool) -> Eq IPAMPoolCidr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IPAMPoolCidr -> IPAMPoolCidr -> Bool
== :: IPAMPoolCidr -> IPAMPoolCidr -> Bool
$c/= :: IPAMPoolCidr -> IPAMPoolCidr -> Bool
/= :: IPAMPoolCidr -> IPAMPoolCidr -> Bool
Prelude.Eq, Int -> IPAMPoolCidr -> ShowS
[IPAMPoolCidr] -> ShowS
IPAMPoolCidr -> String
(Int -> IPAMPoolCidr -> ShowS)
-> (IPAMPoolCidr -> String)
-> ([IPAMPoolCidr] -> ShowS)
-> Show IPAMPoolCidr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IPAMPoolCidr -> ShowS
showsPrec :: Int -> IPAMPoolCidr -> ShowS
$cshow :: IPAMPoolCidr -> String
show :: IPAMPoolCidr -> String
$cshowList :: [IPAMPoolCidr] -> ShowS
showList :: [IPAMPoolCidr] -> ShowS
Prelude.Show)
mkIPAMPoolCidr :: Value Prelude.Text -> IPAMPoolCidr
mkIPAMPoolCidr :: Value Text -> IPAMPoolCidr
mkIPAMPoolCidr Value Text
ipamPoolId
  = IPAMPoolCidr
      {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, netmaskLength :: Maybe (Value Integer)
netmaskLength = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IPAMPoolCidr where
  toResourceProperties :: IPAMPoolCidr -> ResourceProperties
toResourceProperties IPAMPoolCidr {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMPoolCidr -> ()
cidr :: IPAMPoolCidr -> Maybe (Value Text)
ipamPoolId :: IPAMPoolCidr -> Value Text
netmaskLength :: IPAMPoolCidr -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::IPAMPoolCidr", 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 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 IPAMPoolCidr where
  toJSON :: IPAMPoolCidr -> Value
toJSON IPAMPoolCidr {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMPoolCidr -> ()
cidr :: IPAMPoolCidr -> Maybe (Value Text)
ipamPoolId :: IPAMPoolCidr -> Value Text
netmaskLength :: IPAMPoolCidr -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: 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 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" IPAMPoolCidr where
  type PropertyType "Cidr" IPAMPoolCidr = Value Prelude.Text
  set :: PropertyType "Cidr" IPAMPoolCidr -> IPAMPoolCidr -> IPAMPoolCidr
set PropertyType "Cidr" IPAMPoolCidr
newValue IPAMPoolCidr {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMPoolCidr -> ()
cidr :: IPAMPoolCidr -> Maybe (Value Text)
ipamPoolId :: IPAMPoolCidr -> Value Text
netmaskLength :: IPAMPoolCidr -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
    = IPAMPoolCidr {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" IPAMPoolCidr
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
haddock_workaround_ :: ()
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
instance Property "IpamPoolId" IPAMPoolCidr where
  type PropertyType "IpamPoolId" IPAMPoolCidr = Value Prelude.Text
  set :: PropertyType "IpamPoolId" IPAMPoolCidr
-> IPAMPoolCidr -> IPAMPoolCidr
set PropertyType "IpamPoolId" IPAMPoolCidr
newValue IPAMPoolCidr {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMPoolCidr -> ()
cidr :: IPAMPoolCidr -> Maybe (Value Text)
ipamPoolId :: IPAMPoolCidr -> Value Text
netmaskLength :: IPAMPoolCidr -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
    = IPAMPoolCidr {ipamPoolId :: Value Text
ipamPoolId = PropertyType "IpamPoolId" IPAMPoolCidr
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
netmaskLength :: Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
netmaskLength :: Maybe (Value Integer)
..}
instance Property "NetmaskLength" IPAMPoolCidr where
  type PropertyType "NetmaskLength" IPAMPoolCidr = Value Prelude.Integer
  set :: PropertyType "NetmaskLength" IPAMPoolCidr
-> IPAMPoolCidr -> IPAMPoolCidr
set PropertyType "NetmaskLength" IPAMPoolCidr
newValue IPAMPoolCidr {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IPAMPoolCidr -> ()
cidr :: IPAMPoolCidr -> Maybe (Value Text)
ipamPoolId :: IPAMPoolCidr -> Value Text
netmaskLength :: IPAMPoolCidr -> Maybe (Value Integer)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
netmaskLength :: Maybe (Value Integer)
..}
    = IPAMPoolCidr {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" IPAMPoolCidr
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
ipamPoolId :: Value Text
..}