module Stratosphere.ApiGateway.Account (
Account(..), mkAccount
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Account
=
Account {Account -> ()
haddock_workaround_ :: (),
Account -> Maybe (Value Text)
cloudWatchRoleArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (Account -> Account -> Bool
(Account -> Account -> Bool)
-> (Account -> Account -> Bool) -> Eq Account
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Account -> Account -> Bool
== :: Account -> Account -> Bool
$c/= :: Account -> Account -> Bool
/= :: Account -> Account -> Bool
Prelude.Eq, Int -> Account -> ShowS
[Account] -> ShowS
Account -> String
(Int -> Account -> ShowS)
-> (Account -> String) -> ([Account] -> ShowS) -> Show Account
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Account -> ShowS
showsPrec :: Int -> Account -> ShowS
$cshow :: Account -> String
show :: Account -> String
$cshowList :: [Account] -> ShowS
showList :: [Account] -> ShowS
Prelude.Show)
mkAccount :: Account
mkAccount :: Account
mkAccount
= Account
{haddock_workaround_ :: ()
haddock_workaround_ = (), cloudWatchRoleArn :: Maybe (Value Text)
cloudWatchRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Account where
toResourceProperties :: Account -> ResourceProperties
toResourceProperties Account {Maybe (Value Text)
()
haddock_workaround_ :: Account -> ()
cloudWatchRoleArn :: Account -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchRoleArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGateway::Account",
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
"CloudWatchRoleArn" (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)
cloudWatchRoleArn])}
instance JSON.ToJSON Account where
toJSON :: Account -> Value
toJSON Account {Maybe (Value Text)
()
haddock_workaround_ :: Account -> ()
cloudWatchRoleArn :: Account -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchRoleArn :: 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
"CloudWatchRoleArn" (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)
cloudWatchRoleArn]))
instance Property "CloudWatchRoleArn" Account where
type PropertyType "CloudWatchRoleArn" Account = Value Prelude.Text
set :: PropertyType "CloudWatchRoleArn" Account -> Account -> Account
set PropertyType "CloudWatchRoleArn" Account
newValue Account {Maybe (Value Text)
()
haddock_workaround_ :: Account -> ()
cloudWatchRoleArn :: Account -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchRoleArn :: Maybe (Value Text)
..}
= Account {cloudWatchRoleArn :: Maybe (Value Text)
cloudWatchRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudWatchRoleArn" Account
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}