{-# 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.ComponentBindingPropertiesValue where
import Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValueProperties
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 ComponentBindingPropertiesValue = ComponentBindingPropertiesValue'
{
ComponentBindingPropertiesValue
-> Maybe ComponentBindingPropertiesValueProperties
bindingProperties :: Prelude.Maybe ComponentBindingPropertiesValueProperties,
ComponentBindingPropertiesValue -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
ComponentBindingPropertiesValue -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (ComponentBindingPropertiesValue
-> ComponentBindingPropertiesValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentBindingPropertiesValue
-> ComponentBindingPropertiesValue -> Bool
$c/= :: ComponentBindingPropertiesValue
-> ComponentBindingPropertiesValue -> Bool
== :: ComponentBindingPropertiesValue
-> ComponentBindingPropertiesValue -> Bool
$c== :: ComponentBindingPropertiesValue
-> ComponentBindingPropertiesValue -> Bool
Prelude.Eq, ReadPrec [ComponentBindingPropertiesValue]
ReadPrec ComponentBindingPropertiesValue
Int -> ReadS ComponentBindingPropertiesValue
ReadS [ComponentBindingPropertiesValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentBindingPropertiesValue]
$creadListPrec :: ReadPrec [ComponentBindingPropertiesValue]
readPrec :: ReadPrec ComponentBindingPropertiesValue
$creadPrec :: ReadPrec ComponentBindingPropertiesValue
readList :: ReadS [ComponentBindingPropertiesValue]
$creadList :: ReadS [ComponentBindingPropertiesValue]
readsPrec :: Int -> ReadS ComponentBindingPropertiesValue
$creadsPrec :: Int -> ReadS ComponentBindingPropertiesValue
Prelude.Read, Int -> ComponentBindingPropertiesValue -> ShowS
[ComponentBindingPropertiesValue] -> ShowS
ComponentBindingPropertiesValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentBindingPropertiesValue] -> ShowS
$cshowList :: [ComponentBindingPropertiesValue] -> ShowS
show :: ComponentBindingPropertiesValue -> String
$cshow :: ComponentBindingPropertiesValue -> String
showsPrec :: Int -> ComponentBindingPropertiesValue -> ShowS
$cshowsPrec :: Int -> ComponentBindingPropertiesValue -> ShowS
Prelude.Show, forall x.
Rep ComponentBindingPropertiesValue x
-> ComponentBindingPropertiesValue
forall x.
ComponentBindingPropertiesValue
-> Rep ComponentBindingPropertiesValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ComponentBindingPropertiesValue x
-> ComponentBindingPropertiesValue
$cfrom :: forall x.
ComponentBindingPropertiesValue
-> Rep ComponentBindingPropertiesValue x
Prelude.Generic)
newComponentBindingPropertiesValue ::
ComponentBindingPropertiesValue
newComponentBindingPropertiesValue :: ComponentBindingPropertiesValue
newComponentBindingPropertiesValue =
ComponentBindingPropertiesValue'
{ $sel:bindingProperties:ComponentBindingPropertiesValue' :: Maybe ComponentBindingPropertiesValueProperties
bindingProperties =
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:ComponentBindingPropertiesValue' :: Maybe Text
defaultValue = forall a. Maybe a
Prelude.Nothing,
$sel:type':ComponentBindingPropertiesValue' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing
}
componentBindingPropertiesValue_bindingProperties :: Lens.Lens' ComponentBindingPropertiesValue (Prelude.Maybe ComponentBindingPropertiesValueProperties)
componentBindingPropertiesValue_bindingProperties :: Lens'
ComponentBindingPropertiesValue
(Maybe ComponentBindingPropertiesValueProperties)
componentBindingPropertiesValue_bindingProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValue' {Maybe ComponentBindingPropertiesValueProperties
bindingProperties :: Maybe ComponentBindingPropertiesValueProperties
$sel:bindingProperties:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue
-> Maybe ComponentBindingPropertiesValueProperties
bindingProperties} -> Maybe ComponentBindingPropertiesValueProperties
bindingProperties) (\s :: ComponentBindingPropertiesValue
s@ComponentBindingPropertiesValue' {} Maybe ComponentBindingPropertiesValueProperties
a -> ComponentBindingPropertiesValue
s {$sel:bindingProperties:ComponentBindingPropertiesValue' :: Maybe ComponentBindingPropertiesValueProperties
bindingProperties = Maybe ComponentBindingPropertiesValueProperties
a} :: ComponentBindingPropertiesValue)
componentBindingPropertiesValue_defaultValue :: Lens.Lens' ComponentBindingPropertiesValue (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValue_defaultValue :: Lens' ComponentBindingPropertiesValue (Maybe Text)
componentBindingPropertiesValue_defaultValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValue' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: ComponentBindingPropertiesValue
s@ComponentBindingPropertiesValue' {} Maybe Text
a -> ComponentBindingPropertiesValue
s {$sel:defaultValue:ComponentBindingPropertiesValue' :: Maybe Text
defaultValue = Maybe Text
a} :: ComponentBindingPropertiesValue)
componentBindingPropertiesValue_type :: Lens.Lens' ComponentBindingPropertiesValue (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValue_type :: Lens' ComponentBindingPropertiesValue (Maybe Text)
componentBindingPropertiesValue_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValue' {Maybe Text
type' :: Maybe Text
$sel:type':ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
type'} -> Maybe Text
type') (\s :: ComponentBindingPropertiesValue
s@ComponentBindingPropertiesValue' {} Maybe Text
a -> ComponentBindingPropertiesValue
s {$sel:type':ComponentBindingPropertiesValue' :: Maybe Text
type' = Maybe Text
a} :: ComponentBindingPropertiesValue)
instance
Data.FromJSON
ComponentBindingPropertiesValue
where
parseJSON :: Value -> Parser ComponentBindingPropertiesValue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComponentBindingPropertiesValue"
( \Object
x ->
Maybe ComponentBindingPropertiesValueProperties
-> Maybe Text -> Maybe Text -> ComponentBindingPropertiesValue
ComponentBindingPropertiesValue'
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
"bindingProperties")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"defaultValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"type")
)
instance
Prelude.Hashable
ComponentBindingPropertiesValue
where
hashWithSalt :: Int -> ComponentBindingPropertiesValue -> Int
hashWithSalt
Int
_salt
ComponentBindingPropertiesValue' {Maybe Text
Maybe ComponentBindingPropertiesValueProperties
type' :: Maybe Text
defaultValue :: Maybe Text
bindingProperties :: Maybe ComponentBindingPropertiesValueProperties
$sel:type':ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:bindingProperties:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue
-> Maybe ComponentBindingPropertiesValueProperties
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ComponentBindingPropertiesValueProperties
bindingProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
instance
Prelude.NFData
ComponentBindingPropertiesValue
where
rnf :: ComponentBindingPropertiesValue -> ()
rnf ComponentBindingPropertiesValue' {Maybe Text
Maybe ComponentBindingPropertiesValueProperties
type' :: Maybe Text
defaultValue :: Maybe Text
bindingProperties :: Maybe ComponentBindingPropertiesValueProperties
$sel:type':ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:bindingProperties:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue
-> Maybe ComponentBindingPropertiesValueProperties
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ComponentBindingPropertiesValueProperties
bindingProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'
instance Data.ToJSON ComponentBindingPropertiesValue where
toJSON :: ComponentBindingPropertiesValue -> Value
toJSON ComponentBindingPropertiesValue' {Maybe Text
Maybe ComponentBindingPropertiesValueProperties
type' :: Maybe Text
defaultValue :: Maybe Text
bindingProperties :: Maybe ComponentBindingPropertiesValueProperties
$sel:type':ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue -> Maybe Text
$sel:bindingProperties:ComponentBindingPropertiesValue' :: ComponentBindingPropertiesValue
-> Maybe ComponentBindingPropertiesValueProperties
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"bindingProperties" 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 ComponentBindingPropertiesValueProperties
bindingProperties,
(Key
"defaultValue" 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
defaultValue,
(Key
"type" 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
type'
]
)