module Stratosphere.Amplify.App.CacheConfigProperty (
CacheConfigProperty(..), mkCacheConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CacheConfigProperty
=
CacheConfigProperty {CacheConfigProperty -> ()
haddock_workaround_ :: (),
CacheConfigProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CacheConfigProperty -> CacheConfigProperty -> Bool
(CacheConfigProperty -> CacheConfigProperty -> Bool)
-> (CacheConfigProperty -> CacheConfigProperty -> Bool)
-> Eq CacheConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CacheConfigProperty -> CacheConfigProperty -> Bool
== :: CacheConfigProperty -> CacheConfigProperty -> Bool
$c/= :: CacheConfigProperty -> CacheConfigProperty -> Bool
/= :: CacheConfigProperty -> CacheConfigProperty -> Bool
Prelude.Eq, Int -> CacheConfigProperty -> ShowS
[CacheConfigProperty] -> ShowS
CacheConfigProperty -> String
(Int -> CacheConfigProperty -> ShowS)
-> (CacheConfigProperty -> String)
-> ([CacheConfigProperty] -> ShowS)
-> Show CacheConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CacheConfigProperty -> ShowS
showsPrec :: Int -> CacheConfigProperty -> ShowS
$cshow :: CacheConfigProperty -> String
show :: CacheConfigProperty -> String
$cshowList :: [CacheConfigProperty] -> ShowS
showList :: [CacheConfigProperty] -> ShowS
Prelude.Show)
mkCacheConfigProperty :: CacheConfigProperty
mkCacheConfigProperty :: CacheConfigProperty
mkCacheConfigProperty
= CacheConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CacheConfigProperty where
toResourceProperties :: CacheConfigProperty -> ResourceProperties
toResourceProperties CacheConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheConfigProperty -> ()
type' :: CacheConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Amplify::App.CacheConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"Type" (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)
type'])}
instance JSON.ToJSON CacheConfigProperty where
toJSON :: CacheConfigProperty -> Value
toJSON CacheConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheConfigProperty -> ()
type' :: CacheConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"Type" (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)
type']))
instance Property "Type" CacheConfigProperty where
type PropertyType "Type" CacheConfigProperty = Value Prelude.Text
set :: PropertyType "Type" CacheConfigProperty
-> CacheConfigProperty -> CacheConfigProperty
set PropertyType "Type" CacheConfigProperty
newValue CacheConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheConfigProperty -> ()
type' :: CacheConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
= CacheConfigProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" CacheConfigProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}