module Stratosphere.AmplifyUIBuilder.Form.FormCTAProperty (
        module Exports, FormCTAProperty(..), mkFormCTAProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AmplifyUIBuilder.Form.FormButtonProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FormCTAProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-formcta.html>
    FormCTAProperty {FormCTAProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-formcta.html#cfn-amplifyuibuilder-form-formcta-cancel>
                     FormCTAProperty -> Maybe FormButtonProperty
cancel :: (Prelude.Maybe FormButtonProperty),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-formcta.html#cfn-amplifyuibuilder-form-formcta-clear>
                     FormCTAProperty -> Maybe FormButtonProperty
clear :: (Prelude.Maybe FormButtonProperty),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-formcta.html#cfn-amplifyuibuilder-form-formcta-position>
                     FormCTAProperty -> Maybe (Value Text)
position :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-formcta.html#cfn-amplifyuibuilder-form-formcta-submit>
                     FormCTAProperty -> Maybe FormButtonProperty
submit :: (Prelude.Maybe FormButtonProperty)}
  deriving stock (FormCTAProperty -> FormCTAProperty -> Bool
(FormCTAProperty -> FormCTAProperty -> Bool)
-> (FormCTAProperty -> FormCTAProperty -> Bool)
-> Eq FormCTAProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FormCTAProperty -> FormCTAProperty -> Bool
== :: FormCTAProperty -> FormCTAProperty -> Bool
$c/= :: FormCTAProperty -> FormCTAProperty -> Bool
/= :: FormCTAProperty -> FormCTAProperty -> Bool
Prelude.Eq, Int -> FormCTAProperty -> ShowS
[FormCTAProperty] -> ShowS
FormCTAProperty -> String
(Int -> FormCTAProperty -> ShowS)
-> (FormCTAProperty -> String)
-> ([FormCTAProperty] -> ShowS)
-> Show FormCTAProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FormCTAProperty -> ShowS
showsPrec :: Int -> FormCTAProperty -> ShowS
$cshow :: FormCTAProperty -> String
show :: FormCTAProperty -> String
$cshowList :: [FormCTAProperty] -> ShowS
showList :: [FormCTAProperty] -> ShowS
Prelude.Show)
mkFormCTAProperty :: FormCTAProperty
mkFormCTAProperty :: FormCTAProperty
mkFormCTAProperty
  = FormCTAProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cancel :: Maybe FormButtonProperty
cancel = Maybe FormButtonProperty
forall a. Maybe a
Prelude.Nothing,
       clear :: Maybe FormButtonProperty
clear = Maybe FormButtonProperty
forall a. Maybe a
Prelude.Nothing, position :: Maybe (Value Text)
position = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       submit :: Maybe FormButtonProperty
submit = Maybe FormButtonProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FormCTAProperty where
  toResourceProperties :: FormCTAProperty -> ResourceProperties
toResourceProperties FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AmplifyUIBuilder::Form.FormCTA",
         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 -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cancel" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
cancel,
                            Key -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Clear" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
clear,
                            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
"Position" (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)
position,
                            Key -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Submit" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
submit])}
instance JSON.ToJSON FormCTAProperty where
  toJSON :: FormCTAProperty -> Value
toJSON FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = [(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 -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Cancel" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
cancel,
               Key -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Clear" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
clear,
               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
"Position" (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)
position,
               Key -> FormButtonProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Submit" (FormButtonProperty -> (Key, Value))
-> Maybe FormButtonProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FormButtonProperty
submit]))
instance Property "Cancel" FormCTAProperty where
  type PropertyType "Cancel" FormCTAProperty = FormButtonProperty
  set :: PropertyType "Cancel" FormCTAProperty
-> FormCTAProperty -> FormCTAProperty
set PropertyType "Cancel" FormCTAProperty
newValue FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = FormCTAProperty {cancel :: Maybe FormButtonProperty
cancel = FormButtonProperty -> Maybe FormButtonProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cancel" FormCTAProperty
FormButtonProperty
newValue, Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: ()
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
haddock_workaround_ :: ()
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
instance Property "Clear" FormCTAProperty where
  type PropertyType "Clear" FormCTAProperty = FormButtonProperty
  set :: PropertyType "Clear" FormCTAProperty
-> FormCTAProperty -> FormCTAProperty
set PropertyType "Clear" FormCTAProperty
newValue FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = FormCTAProperty {clear :: Maybe FormButtonProperty
clear = FormButtonProperty -> Maybe FormButtonProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Clear" FormCTAProperty
FormButtonProperty
newValue, Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
instance Property "Position" FormCTAProperty where
  type PropertyType "Position" FormCTAProperty = Value Prelude.Text
  set :: PropertyType "Position" FormCTAProperty
-> FormCTAProperty -> FormCTAProperty
set PropertyType "Position" FormCTAProperty
newValue FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = FormCTAProperty {position :: Maybe (Value Text)
position = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Position" FormCTAProperty
Value Text
newValue, Maybe FormButtonProperty
()
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
submit :: Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
submit :: Maybe FormButtonProperty
..}
instance Property "Submit" FormCTAProperty where
  type PropertyType "Submit" FormCTAProperty = FormButtonProperty
  set :: PropertyType "Submit" FormCTAProperty
-> FormCTAProperty -> FormCTAProperty
set PropertyType "Submit" FormCTAProperty
newValue FormCTAProperty {Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: FormCTAProperty -> ()
cancel :: FormCTAProperty -> Maybe FormButtonProperty
clear :: FormCTAProperty -> Maybe FormButtonProperty
position :: FormCTAProperty -> Maybe (Value Text)
submit :: FormCTAProperty -> Maybe FormButtonProperty
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
submit :: Maybe FormButtonProperty
..}
    = FormCTAProperty {submit :: Maybe FormButtonProperty
submit = FormButtonProperty -> Maybe FormButtonProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Submit" FormCTAProperty
FormButtonProperty
newValue, Maybe (Value Text)
Maybe FormButtonProperty
()
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
haddock_workaround_ :: ()
cancel :: Maybe FormButtonProperty
clear :: Maybe FormButtonProperty
position :: Maybe (Value Text)
..}