{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AmplifyUiBuilder.Types.FormInputValueProperty where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data FormInputValueProperty = FormInputValueProperty'
{
FormInputValueProperty -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (FormInputValueProperty -> FormInputValueProperty -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FormInputValueProperty -> FormInputValueProperty -> Bool
$c/= :: FormInputValueProperty -> FormInputValueProperty -> Bool
== :: FormInputValueProperty -> FormInputValueProperty -> Bool
$c== :: FormInputValueProperty -> FormInputValueProperty -> Bool
Prelude.Eq, ReadPrec [FormInputValueProperty]
ReadPrec FormInputValueProperty
Int -> ReadS FormInputValueProperty
ReadS [FormInputValueProperty]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FormInputValueProperty]
$creadListPrec :: ReadPrec [FormInputValueProperty]
readPrec :: ReadPrec FormInputValueProperty
$creadPrec :: ReadPrec FormInputValueProperty
readList :: ReadS [FormInputValueProperty]
$creadList :: ReadS [FormInputValueProperty]
readsPrec :: Int -> ReadS FormInputValueProperty
$creadsPrec :: Int -> ReadS FormInputValueProperty
Prelude.Read, Int -> FormInputValueProperty -> ShowS
[FormInputValueProperty] -> ShowS
FormInputValueProperty -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FormInputValueProperty] -> ShowS
$cshowList :: [FormInputValueProperty] -> ShowS
show :: FormInputValueProperty -> String
$cshow :: FormInputValueProperty -> String
showsPrec :: Int -> FormInputValueProperty -> ShowS
$cshowsPrec :: Int -> FormInputValueProperty -> ShowS
Prelude.Show, forall x. Rep FormInputValueProperty x -> FormInputValueProperty
forall x. FormInputValueProperty -> Rep FormInputValueProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FormInputValueProperty x -> FormInputValueProperty
$cfrom :: forall x. FormInputValueProperty -> Rep FormInputValueProperty x
Prelude.Generic)
newFormInputValueProperty ::
FormInputValueProperty
newFormInputValueProperty :: FormInputValueProperty
newFormInputValueProperty =
FormInputValueProperty' {$sel:value:FormInputValueProperty' :: Maybe Text
value = forall a. Maybe a
Prelude.Nothing}
formInputValueProperty_value :: Lens.Lens' FormInputValueProperty (Prelude.Maybe Prelude.Text)
formInputValueProperty_value :: Lens' FormInputValueProperty (Maybe Text)
formInputValueProperty_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FormInputValueProperty' {Maybe Text
value :: Maybe Text
$sel:value:FormInputValueProperty' :: FormInputValueProperty -> Maybe Text
value} -> Maybe Text
value) (\s :: FormInputValueProperty
s@FormInputValueProperty' {} Maybe Text
a -> FormInputValueProperty
s {$sel:value:FormInputValueProperty' :: Maybe Text
value = Maybe Text
a} :: FormInputValueProperty)
instance Data.FromJSON FormInputValueProperty where
parseJSON :: Value -> Parser FormInputValueProperty
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FormInputValueProperty"
( \Object
x ->
Maybe Text -> FormInputValueProperty
FormInputValueProperty'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"value")
)
instance Prelude.Hashable FormInputValueProperty where
hashWithSalt :: Int -> FormInputValueProperty -> Int
hashWithSalt Int
_salt FormInputValueProperty' {Maybe Text
value :: Maybe Text
$sel:value:FormInputValueProperty' :: FormInputValueProperty -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
value
instance Prelude.NFData FormInputValueProperty where
rnf :: FormInputValueProperty -> ()
rnf FormInputValueProperty' {Maybe Text
value :: Maybe Text
$sel:value:FormInputValueProperty' :: FormInputValueProperty -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
value
instance Data.ToJSON FormInputValueProperty where
toJSON :: FormInputValueProperty -> Value
toJSON FormInputValueProperty' {Maybe Text
value :: Maybe Text
$sel:value:FormInputValueProperty' :: FormInputValueProperty -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"value" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
value]
)