{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValueProperties
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValueProperties where

import Amazonka.AmplifyUiBuilder.Types.Predicate
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

-- | Represents the data binding configuration for a specific property using
-- data stored in Amazon Web Services. For Amazon Web Services connected
-- properties, you can bind a property to data stored in an Amazon S3
-- bucket, an Amplify DataStore model or an authenticated user attribute.
--
-- /See:/ 'newComponentBindingPropertiesValueProperties' smart constructor.
data ComponentBindingPropertiesValueProperties = ComponentBindingPropertiesValueProperties'
  { -- | An Amazon S3 bucket.
    ComponentBindingPropertiesValueProperties -> Maybe Text
bucket :: Prelude.Maybe Prelude.Text,
    -- | The default value to assign to the property.
    ComponentBindingPropertiesValueProperties -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
    -- | The field to bind the data to.
    ComponentBindingPropertiesValueProperties -> Maybe Text
field :: Prelude.Maybe Prelude.Text,
    -- | The storage key for an Amazon S3 bucket.
    ComponentBindingPropertiesValueProperties -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
    -- | An Amplify DataStore model.
    ComponentBindingPropertiesValueProperties -> Maybe Text
model :: Prelude.Maybe Prelude.Text,
    -- | A list of predicates for binding a component\'s properties to data.
    ComponentBindingPropertiesValueProperties -> Maybe [Predicate]
predicates :: Prelude.Maybe [Predicate],
    -- | The name of a component slot.
    ComponentBindingPropertiesValueProperties -> Maybe Text
slotName :: Prelude.Maybe Prelude.Text,
    -- | An authenticated user attribute.
    ComponentBindingPropertiesValueProperties -> Maybe Text
userAttribute :: Prelude.Maybe Prelude.Text
  }
  deriving (ComponentBindingPropertiesValueProperties
-> ComponentBindingPropertiesValueProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentBindingPropertiesValueProperties
-> ComponentBindingPropertiesValueProperties -> Bool
$c/= :: ComponentBindingPropertiesValueProperties
-> ComponentBindingPropertiesValueProperties -> Bool
== :: ComponentBindingPropertiesValueProperties
-> ComponentBindingPropertiesValueProperties -> Bool
$c== :: ComponentBindingPropertiesValueProperties
-> ComponentBindingPropertiesValueProperties -> Bool
Prelude.Eq, ReadPrec [ComponentBindingPropertiesValueProperties]
ReadPrec ComponentBindingPropertiesValueProperties
Int -> ReadS ComponentBindingPropertiesValueProperties
ReadS [ComponentBindingPropertiesValueProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentBindingPropertiesValueProperties]
$creadListPrec :: ReadPrec [ComponentBindingPropertiesValueProperties]
readPrec :: ReadPrec ComponentBindingPropertiesValueProperties
$creadPrec :: ReadPrec ComponentBindingPropertiesValueProperties
readList :: ReadS [ComponentBindingPropertiesValueProperties]
$creadList :: ReadS [ComponentBindingPropertiesValueProperties]
readsPrec :: Int -> ReadS ComponentBindingPropertiesValueProperties
$creadsPrec :: Int -> ReadS ComponentBindingPropertiesValueProperties
Prelude.Read, Int -> ComponentBindingPropertiesValueProperties -> ShowS
[ComponentBindingPropertiesValueProperties] -> ShowS
ComponentBindingPropertiesValueProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentBindingPropertiesValueProperties] -> ShowS
$cshowList :: [ComponentBindingPropertiesValueProperties] -> ShowS
show :: ComponentBindingPropertiesValueProperties -> String
$cshow :: ComponentBindingPropertiesValueProperties -> String
showsPrec :: Int -> ComponentBindingPropertiesValueProperties -> ShowS
$cshowsPrec :: Int -> ComponentBindingPropertiesValueProperties -> ShowS
Prelude.Show, forall x.
Rep ComponentBindingPropertiesValueProperties x
-> ComponentBindingPropertiesValueProperties
forall x.
ComponentBindingPropertiesValueProperties
-> Rep ComponentBindingPropertiesValueProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ComponentBindingPropertiesValueProperties x
-> ComponentBindingPropertiesValueProperties
$cfrom :: forall x.
ComponentBindingPropertiesValueProperties
-> Rep ComponentBindingPropertiesValueProperties x
Prelude.Generic)

-- |
-- Create a value of 'ComponentBindingPropertiesValueProperties' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'bucket', 'componentBindingPropertiesValueProperties_bucket' - An Amazon S3 bucket.
--
-- 'defaultValue', 'componentBindingPropertiesValueProperties_defaultValue' - The default value to assign to the property.
--
-- 'field', 'componentBindingPropertiesValueProperties_field' - The field to bind the data to.
--
-- 'key', 'componentBindingPropertiesValueProperties_key' - The storage key for an Amazon S3 bucket.
--
-- 'model', 'componentBindingPropertiesValueProperties_model' - An Amplify DataStore model.
--
-- 'predicates', 'componentBindingPropertiesValueProperties_predicates' - A list of predicates for binding a component\'s properties to data.
--
-- 'slotName', 'componentBindingPropertiesValueProperties_slotName' - The name of a component slot.
--
-- 'userAttribute', 'componentBindingPropertiesValueProperties_userAttribute' - An authenticated user attribute.
newComponentBindingPropertiesValueProperties ::
  ComponentBindingPropertiesValueProperties
newComponentBindingPropertiesValueProperties :: ComponentBindingPropertiesValueProperties
newComponentBindingPropertiesValueProperties =
  ComponentBindingPropertiesValueProperties'
    { $sel:bucket:ComponentBindingPropertiesValueProperties' :: Maybe Text
bucket =
        forall a. Maybe a
Prelude.Nothing,
      $sel:defaultValue:ComponentBindingPropertiesValueProperties' :: Maybe Text
defaultValue = forall a. Maybe a
Prelude.Nothing,
      $sel:field:ComponentBindingPropertiesValueProperties' :: Maybe Text
field = forall a. Maybe a
Prelude.Nothing,
      $sel:key:ComponentBindingPropertiesValueProperties' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
      $sel:model:ComponentBindingPropertiesValueProperties' :: Maybe Text
model = forall a. Maybe a
Prelude.Nothing,
      $sel:predicates:ComponentBindingPropertiesValueProperties' :: Maybe [Predicate]
predicates = forall a. Maybe a
Prelude.Nothing,
      $sel:slotName:ComponentBindingPropertiesValueProperties' :: Maybe Text
slotName = forall a. Maybe a
Prelude.Nothing,
      $sel:userAttribute:ComponentBindingPropertiesValueProperties' :: Maybe Text
userAttribute = forall a. Maybe a
Prelude.Nothing
    }

-- | An Amazon S3 bucket.
componentBindingPropertiesValueProperties_bucket :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_bucket :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
bucket :: Maybe Text
$sel:bucket:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
bucket} -> Maybe Text
bucket) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:bucket:ComponentBindingPropertiesValueProperties' :: Maybe Text
bucket = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | The default value to assign to the property.
componentBindingPropertiesValueProperties_defaultValue :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_defaultValue :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_defaultValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:defaultValue:ComponentBindingPropertiesValueProperties' :: Maybe Text
defaultValue = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | The field to bind the data to.
componentBindingPropertiesValueProperties_field :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_field :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_field = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
field :: Maybe Text
$sel:field:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
field} -> Maybe Text
field) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:field:ComponentBindingPropertiesValueProperties' :: Maybe Text
field = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | The storage key for an Amazon S3 bucket.
componentBindingPropertiesValueProperties_key :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_key :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
key :: Maybe Text
$sel:key:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
key} -> Maybe Text
key) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:key:ComponentBindingPropertiesValueProperties' :: Maybe Text
key = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | An Amplify DataStore model.
componentBindingPropertiesValueProperties_model :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_model :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_model = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
model :: Maybe Text
$sel:model:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
model} -> Maybe Text
model) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:model:ComponentBindingPropertiesValueProperties' :: Maybe Text
model = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | A list of predicates for binding a component\'s properties to data.
componentBindingPropertiesValueProperties_predicates :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe [Predicate])
componentBindingPropertiesValueProperties_predicates :: Lens' ComponentBindingPropertiesValueProperties (Maybe [Predicate])
componentBindingPropertiesValueProperties_predicates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe [Predicate]
predicates :: Maybe [Predicate]
$sel:predicates:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe [Predicate]
predicates} -> Maybe [Predicate]
predicates) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe [Predicate]
a -> ComponentBindingPropertiesValueProperties
s {$sel:predicates:ComponentBindingPropertiesValueProperties' :: Maybe [Predicate]
predicates = Maybe [Predicate]
a} :: ComponentBindingPropertiesValueProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a component slot.
componentBindingPropertiesValueProperties_slotName :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_slotName :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_slotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
slotName :: Maybe Text
$sel:slotName:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
slotName} -> Maybe Text
slotName) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:slotName:ComponentBindingPropertiesValueProperties' :: Maybe Text
slotName = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

-- | An authenticated user attribute.
componentBindingPropertiesValueProperties_userAttribute :: Lens.Lens' ComponentBindingPropertiesValueProperties (Prelude.Maybe Prelude.Text)
componentBindingPropertiesValueProperties_userAttribute :: Lens' ComponentBindingPropertiesValueProperties (Maybe Text)
componentBindingPropertiesValueProperties_userAttribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentBindingPropertiesValueProperties' {Maybe Text
userAttribute :: Maybe Text
$sel:userAttribute:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
userAttribute} -> Maybe Text
userAttribute) (\s :: ComponentBindingPropertiesValueProperties
s@ComponentBindingPropertiesValueProperties' {} Maybe Text
a -> ComponentBindingPropertiesValueProperties
s {$sel:userAttribute:ComponentBindingPropertiesValueProperties' :: Maybe Text
userAttribute = Maybe Text
a} :: ComponentBindingPropertiesValueProperties)

instance
  Data.FromJSON
    ComponentBindingPropertiesValueProperties
  where
  parseJSON :: Value -> Parser ComponentBindingPropertiesValueProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ComponentBindingPropertiesValueProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Predicate]
-> Maybe Text
-> Maybe Text
-> ComponentBindingPropertiesValueProperties
ComponentBindingPropertiesValueProperties'
            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
"bucket")
            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
"field")
            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
"key")
            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
"model")
            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
"predicates" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"slotName")
            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
"userAttribute")
      )

instance
  Prelude.Hashable
    ComponentBindingPropertiesValueProperties
  where
  hashWithSalt :: Int -> ComponentBindingPropertiesValueProperties -> Int
hashWithSalt
    Int
_salt
    ComponentBindingPropertiesValueProperties' {Maybe [Predicate]
Maybe Text
userAttribute :: Maybe Text
slotName :: Maybe Text
predicates :: Maybe [Predicate]
model :: Maybe Text
key :: Maybe Text
field :: Maybe Text
defaultValue :: Maybe Text
bucket :: Maybe Text
$sel:userAttribute:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:slotName:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:predicates:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe [Predicate]
$sel:model:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:key:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:field:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:bucket:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bucket
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultValue
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
field
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
model
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Predicate]
predicates
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userAttribute

instance
  Prelude.NFData
    ComponentBindingPropertiesValueProperties
  where
  rnf :: ComponentBindingPropertiesValueProperties -> ()
rnf ComponentBindingPropertiesValueProperties' {Maybe [Predicate]
Maybe Text
userAttribute :: Maybe Text
slotName :: Maybe Text
predicates :: Maybe [Predicate]
model :: Maybe Text
key :: Maybe Text
field :: Maybe Text
defaultValue :: Maybe Text
bucket :: Maybe Text
$sel:userAttribute:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:slotName:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:predicates:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe [Predicate]
$sel:model:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:key:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:field:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:bucket:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bucket
      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
field
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
model
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Predicate]
predicates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userAttribute

instance
  Data.ToJSON
    ComponentBindingPropertiesValueProperties
  where
  toJSON :: ComponentBindingPropertiesValueProperties -> Value
toJSON ComponentBindingPropertiesValueProperties' {Maybe [Predicate]
Maybe Text
userAttribute :: Maybe Text
slotName :: Maybe Text
predicates :: Maybe [Predicate]
model :: Maybe Text
key :: Maybe Text
field :: Maybe Text
defaultValue :: Maybe Text
bucket :: Maybe Text
$sel:userAttribute:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:slotName:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:predicates:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe [Predicate]
$sel:model:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:key:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:field:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:defaultValue:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
$sel:bucket:ComponentBindingPropertiesValueProperties' :: ComponentBindingPropertiesValueProperties -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"bucket" 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
bucket,
            (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
"field" 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
field,
            (Key
"key" 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
key,
            (Key
"model" 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
model,
            (Key
"predicates" 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 [Predicate]
predicates,
            (Key
"slotName" 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
slotName,
            (Key
"userAttribute" 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
userAttribute
          ]
      )