module Stratosphere.Amplify.Branch.BackendProperty (
        BackendProperty(..), mkBackendProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BackendProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html>
    BackendProperty {BackendProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html#cfn-amplify-branch-backend-stackarn>
                     BackendProperty -> Maybe (Value Text)
stackArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (BackendProperty -> BackendProperty -> Bool
(BackendProperty -> BackendProperty -> Bool)
-> (BackendProperty -> BackendProperty -> Bool)
-> Eq BackendProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BackendProperty -> BackendProperty -> Bool
== :: BackendProperty -> BackendProperty -> Bool
$c/= :: BackendProperty -> BackendProperty -> Bool
/= :: BackendProperty -> BackendProperty -> Bool
Prelude.Eq, Int -> BackendProperty -> ShowS
[BackendProperty] -> ShowS
BackendProperty -> String
(Int -> BackendProperty -> ShowS)
-> (BackendProperty -> String)
-> ([BackendProperty] -> ShowS)
-> Show BackendProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BackendProperty -> ShowS
showsPrec :: Int -> BackendProperty -> ShowS
$cshow :: BackendProperty -> String
show :: BackendProperty -> String
$cshowList :: [BackendProperty] -> ShowS
showList :: [BackendProperty] -> ShowS
Prelude.Show)
mkBackendProperty :: BackendProperty
mkBackendProperty :: BackendProperty
mkBackendProperty
  = BackendProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), stackArn :: Maybe (Value Text)
stackArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BackendProperty where
  toResourceProperties :: BackendProperty -> ResourceProperties
toResourceProperties BackendProperty {Maybe (Value Text)
()
haddock_workaround_ :: BackendProperty -> ()
stackArn :: BackendProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
stackArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Amplify::Branch.Backend",
         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
"StackArn" (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)
stackArn])}
instance JSON.ToJSON BackendProperty where
  toJSON :: BackendProperty -> Value
toJSON BackendProperty {Maybe (Value Text)
()
haddock_workaround_ :: BackendProperty -> ()
stackArn :: BackendProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
stackArn :: 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
"StackArn" (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)
stackArn]))
instance Property "StackArn" BackendProperty where
  type PropertyType "StackArn" BackendProperty = Value Prelude.Text
  set :: PropertyType "StackArn" BackendProperty
-> BackendProperty -> BackendProperty
set PropertyType "StackArn" BackendProperty
newValue BackendProperty {Maybe (Value Text)
()
haddock_workaround_ :: BackendProperty -> ()
stackArn :: BackendProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
stackArn :: Maybe (Value Text)
..}
    = BackendProperty {stackArn :: Maybe (Value Text)
stackArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StackArn" BackendProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}