module Stratosphere.EC2.PrefixList (
        module Exports, PrefixList(..), mkPrefixList
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.PrefixList.EntryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data PrefixList
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html>
    PrefixList {PrefixList -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html#cfn-ec2-prefixlist-addressfamily>
                PrefixList -> Value Text
addressFamily :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html#cfn-ec2-prefixlist-entries>
                PrefixList -> Maybe [EntryProperty]
entries :: (Prelude.Maybe [EntryProperty]),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html#cfn-ec2-prefixlist-maxentries>
                PrefixList -> Maybe (Value Integer)
maxEntries :: (Prelude.Maybe (Value Prelude.Integer)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html#cfn-ec2-prefixlist-prefixlistname>
                PrefixList -> Value Text
prefixListName :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-prefixlist.html#cfn-ec2-prefixlist-tags>
                PrefixList -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (PrefixList -> PrefixList -> Bool
(PrefixList -> PrefixList -> Bool)
-> (PrefixList -> PrefixList -> Bool) -> Eq PrefixList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrefixList -> PrefixList -> Bool
== :: PrefixList -> PrefixList -> Bool
$c/= :: PrefixList -> PrefixList -> Bool
/= :: PrefixList -> PrefixList -> Bool
Prelude.Eq, Int -> PrefixList -> ShowS
[PrefixList] -> ShowS
PrefixList -> String
(Int -> PrefixList -> ShowS)
-> (PrefixList -> String)
-> ([PrefixList] -> ShowS)
-> Show PrefixList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrefixList -> ShowS
showsPrec :: Int -> PrefixList -> ShowS
$cshow :: PrefixList -> String
show :: PrefixList -> String
$cshowList :: [PrefixList] -> ShowS
showList :: [PrefixList] -> ShowS
Prelude.Show)
mkPrefixList ::
  Value Prelude.Text -> Value Prelude.Text -> PrefixList
mkPrefixList :: Value Text -> Value Text -> PrefixList
mkPrefixList Value Text
addressFamily Value Text
prefixListName
  = PrefixList
      {haddock_workaround_ :: ()
haddock_workaround_ = (), addressFamily :: Value Text
addressFamily = Value Text
addressFamily,
       prefixListName :: Value Text
prefixListName = Value Text
prefixListName, entries :: Maybe [EntryProperty]
entries = Maybe [EntryProperty]
forall a. Maybe a
Prelude.Nothing,
       maxEntries :: Maybe (Value Integer)
maxEntries = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PrefixList where
  toResourceProperties :: PrefixList -> ResourceProperties
toResourceProperties PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::PrefixList", 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
"AddressFamily" 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
addressFamily,
                            Key
"PrefixListName" 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
prefixListName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [EntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Entries" ([EntryProperty] -> (Key, Value))
-> Maybe [EntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntryProperty]
entries,
                               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
"MaxEntries" (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)
maxEntries,
                               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 PrefixList where
  toJSON :: PrefixList -> Value
toJSON PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: 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
"AddressFamily" 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
addressFamily,
               Key
"PrefixListName" 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
prefixListName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [EntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Entries" ([EntryProperty] -> (Key, Value))
-> Maybe [EntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntryProperty]
entries,
                  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
"MaxEntries" (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)
maxEntries,
                  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 "AddressFamily" PrefixList where
  type PropertyType "AddressFamily" PrefixList = Value Prelude.Text
  set :: PropertyType "AddressFamily" PrefixList -> PrefixList -> PrefixList
set PropertyType "AddressFamily" PrefixList
newValue PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = PrefixList {addressFamily :: Value Text
addressFamily = PropertyType "AddressFamily" PrefixList
Value Text
newValue, Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Entries" PrefixList where
  type PropertyType "Entries" PrefixList = [EntryProperty]
  set :: PropertyType "Entries" PrefixList -> PrefixList -> PrefixList
set PropertyType "Entries" PrefixList
newValue PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = PrefixList {entries :: Maybe [EntryProperty]
entries = [EntryProperty] -> Maybe [EntryProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [EntryProperty]
PropertyType "Entries" PrefixList
newValue, Maybe [Tag]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
addressFamily :: Value Text
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "MaxEntries" PrefixList where
  type PropertyType "MaxEntries" PrefixList = Value Prelude.Integer
  set :: PropertyType "MaxEntries" PrefixList -> PrefixList -> PrefixList
set PropertyType "MaxEntries" PrefixList
newValue PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = PrefixList {maxEntries :: Maybe (Value Integer)
maxEntries = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxEntries" PrefixList
Value Integer
newValue, Maybe [Tag]
Maybe [EntryProperty]
()
Value Text
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
prefixListName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "PrefixListName" PrefixList where
  type PropertyType "PrefixListName" PrefixList = Value Prelude.Text
  set :: PropertyType "PrefixListName" PrefixList
-> PrefixList -> PrefixList
set PropertyType "PrefixListName" PrefixList
newValue PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = PrefixList {prefixListName :: Value Text
prefixListName = PropertyType "PrefixListName" PrefixList
Value Text
newValue, Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
tags :: Maybe [Tag]
..}
instance Property "Tags" PrefixList where
  type PropertyType "Tags" PrefixList = [Tag]
  set :: PropertyType "Tags" PrefixList -> PrefixList -> PrefixList
set PropertyType "Tags" PrefixList
newValue PrefixList {Maybe [Tag]
Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: PrefixList -> ()
addressFamily :: PrefixList -> Value Text
entries :: PrefixList -> Maybe [EntryProperty]
maxEntries :: PrefixList -> Maybe (Value Integer)
prefixListName :: PrefixList -> Value Text
tags :: PrefixList -> Maybe [Tag]
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
tags :: Maybe [Tag]
..}
    = PrefixList {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" PrefixList
newValue, Maybe [EntryProperty]
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
haddock_workaround_ :: ()
addressFamily :: Value Text
entries :: Maybe [EntryProperty]
maxEntries :: Maybe (Value Integer)
prefixListName :: Value Text
..}