module Stratosphere.Route53.CidrCollection (
module Exports, CidrCollection(..), mkCidrCollection
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Route53.CidrCollection.LocationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CidrCollection
=
CidrCollection {CidrCollection -> ()
haddock_workaround_ :: (),
CidrCollection -> Maybe [LocationProperty]
locations :: (Prelude.Maybe [LocationProperty]),
CidrCollection -> Value Text
name :: (Value Prelude.Text)}
deriving stock (CidrCollection -> CidrCollection -> Bool
(CidrCollection -> CidrCollection -> Bool)
-> (CidrCollection -> CidrCollection -> Bool) -> Eq CidrCollection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CidrCollection -> CidrCollection -> Bool
== :: CidrCollection -> CidrCollection -> Bool
$c/= :: CidrCollection -> CidrCollection -> Bool
/= :: CidrCollection -> CidrCollection -> Bool
Prelude.Eq, Int -> CidrCollection -> ShowS
[CidrCollection] -> ShowS
CidrCollection -> String
(Int -> CidrCollection -> ShowS)
-> (CidrCollection -> String)
-> ([CidrCollection] -> ShowS)
-> Show CidrCollection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CidrCollection -> ShowS
showsPrec :: Int -> CidrCollection -> ShowS
$cshow :: CidrCollection -> String
show :: CidrCollection -> String
$cshowList :: [CidrCollection] -> ShowS
showList :: [CidrCollection] -> ShowS
Prelude.Show)
mkCidrCollection :: Value Prelude.Text -> CidrCollection
mkCidrCollection :: Value Text -> CidrCollection
mkCidrCollection Value Text
name
= CidrCollection
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
locations :: Maybe [LocationProperty]
locations = Maybe [LocationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CidrCollection where
toResourceProperties :: CidrCollection -> ResourceProperties
toResourceProperties CidrCollection {Maybe [LocationProperty]
()
Value Text
haddock_workaround_ :: CidrCollection -> ()
locations :: CidrCollection -> Maybe [LocationProperty]
name :: CidrCollection -> Value Text
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
name :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Route53::CidrCollection",
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
"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 -> [LocationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Locations" ([LocationProperty] -> (Key, Value))
-> Maybe [LocationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LocationProperty]
locations]))}
instance JSON.ToJSON CidrCollection where
toJSON :: CidrCollection -> Value
toJSON CidrCollection {Maybe [LocationProperty]
()
Value Text
haddock_workaround_ :: CidrCollection -> ()
locations :: CidrCollection -> Maybe [LocationProperty]
name :: CidrCollection -> Value Text
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
name :: Value Text
..}
= [(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 -> [LocationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Locations" ([LocationProperty] -> (Key, Value))
-> Maybe [LocationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LocationProperty]
locations])))
instance Property "Locations" CidrCollection where
type PropertyType "Locations" CidrCollection = [LocationProperty]
set :: PropertyType "Locations" CidrCollection
-> CidrCollection -> CidrCollection
set PropertyType "Locations" CidrCollection
newValue CidrCollection {Maybe [LocationProperty]
()
Value Text
haddock_workaround_ :: CidrCollection -> ()
locations :: CidrCollection -> Maybe [LocationProperty]
name :: CidrCollection -> Value Text
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
name :: Value Text
..}
= CidrCollection {locations :: Maybe [LocationProperty]
locations = [LocationProperty] -> Maybe [LocationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [LocationProperty]
PropertyType "Locations" CidrCollection
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}
instance Property "Name" CidrCollection where
type PropertyType "Name" CidrCollection = Value Prelude.Text
set :: PropertyType "Name" CidrCollection
-> CidrCollection -> CidrCollection
set PropertyType "Name" CidrCollection
newValue CidrCollection {Maybe [LocationProperty]
()
Value Text
haddock_workaround_ :: CidrCollection -> ()
locations :: CidrCollection -> Maybe [LocationProperty]
name :: CidrCollection -> Value Text
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
name :: Value Text
..}
= CidrCollection {name :: Value Text
name = PropertyType "Name" CidrCollection
Value Text
newValue, Maybe [LocationProperty]
()
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
haddock_workaround_ :: ()
locations :: Maybe [LocationProperty]
..}