module Stratosphere.EC2.PrefixList.EntryProperty (
EntryProperty(..), mkEntryProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EntryProperty
=
EntryProperty {EntryProperty -> ()
haddock_workaround_ :: (),
EntryProperty -> Value Text
cidr :: (Value Prelude.Text),
EntryProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EntryProperty -> EntryProperty -> Bool
(EntryProperty -> EntryProperty -> Bool)
-> (EntryProperty -> EntryProperty -> Bool) -> Eq EntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EntryProperty -> EntryProperty -> Bool
== :: EntryProperty -> EntryProperty -> Bool
$c/= :: EntryProperty -> EntryProperty -> Bool
/= :: EntryProperty -> EntryProperty -> Bool
Prelude.Eq, Int -> EntryProperty -> ShowS
[EntryProperty] -> ShowS
EntryProperty -> String
(Int -> EntryProperty -> ShowS)
-> (EntryProperty -> String)
-> ([EntryProperty] -> ShowS)
-> Show EntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EntryProperty -> ShowS
showsPrec :: Int -> EntryProperty -> ShowS
$cshow :: EntryProperty -> String
show :: EntryProperty -> String
$cshowList :: [EntryProperty] -> ShowS
showList :: [EntryProperty] -> ShowS
Prelude.Show)
mkEntryProperty :: Value Prelude.Text -> EntryProperty
mkEntryProperty :: Value Text -> EntryProperty
mkEntryProperty Value Text
cidr
= EntryProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), cidr :: Value Text
cidr = Value Text
cidr,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EntryProperty where
toResourceProperties :: EntryProperty -> ResourceProperties
toResourceProperties EntryProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntryProperty -> ()
cidr :: EntryProperty -> Value Text
description :: EntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Value Text
description :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::PrefixList.Entry",
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
"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..= Value Text
cidr]
([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
"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]))}
instance JSON.ToJSON EntryProperty where
toJSON :: EntryProperty -> Value
toJSON EntryProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntryProperty -> ()
cidr :: EntryProperty -> Value Text
description :: EntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Value Text
description :: Maybe (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
"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..= Value Text
cidr]
([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
"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])))
instance Property "Cidr" EntryProperty where
type PropertyType "Cidr" EntryProperty = Value Prelude.Text
set :: PropertyType "Cidr" EntryProperty -> EntryProperty -> EntryProperty
set PropertyType "Cidr" EntryProperty
newValue EntryProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntryProperty -> ()
cidr :: EntryProperty -> Value Text
description :: EntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Value Text
description :: Maybe (Value Text)
..}
= EntryProperty {cidr :: Value Text
cidr = PropertyType "Cidr" EntryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
..}
instance Property "Description" EntryProperty where
type PropertyType "Description" EntryProperty = Value Prelude.Text
set :: PropertyType "Description" EntryProperty
-> EntryProperty -> EntryProperty
set PropertyType "Description" EntryProperty
newValue EntryProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntryProperty -> ()
cidr :: EntryProperty -> Value Text
description :: EntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Value Text
description :: Maybe (Value Text)
..}
= EntryProperty {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" EntryProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
cidr :: Value Text
haddock_workaround_ :: ()
cidr :: Value Text
..}