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