{-# 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.HoneyCode.Types.CellInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CellInput = CellInput'
{
CellInput -> Maybe (Sensitive Text)
fact :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (CellInput -> CellInput -> Bool
(CellInput -> CellInput -> Bool)
-> (CellInput -> CellInput -> Bool) -> Eq CellInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CellInput -> CellInput -> Bool
$c/= :: CellInput -> CellInput -> Bool
== :: CellInput -> CellInput -> Bool
$c== :: CellInput -> CellInput -> Bool
Prelude.Eq, Int -> CellInput -> ShowS
[CellInput] -> ShowS
CellInput -> String
(Int -> CellInput -> ShowS)
-> (CellInput -> String)
-> ([CellInput] -> ShowS)
-> Show CellInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CellInput] -> ShowS
$cshowList :: [CellInput] -> ShowS
show :: CellInput -> String
$cshow :: CellInput -> String
showsPrec :: Int -> CellInput -> ShowS
$cshowsPrec :: Int -> CellInput -> ShowS
Prelude.Show, (forall x. CellInput -> Rep CellInput x)
-> (forall x. Rep CellInput x -> CellInput) -> Generic CellInput
forall x. Rep CellInput x -> CellInput
forall x. CellInput -> Rep CellInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CellInput x -> CellInput
$cfrom :: forall x. CellInput -> Rep CellInput x
Prelude.Generic)
newCellInput ::
CellInput
newCellInput :: CellInput
newCellInput = CellInput' :: Maybe (Sensitive Text) -> CellInput
CellInput' {$sel:fact:CellInput' :: Maybe (Sensitive Text)
fact = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing}
cellInput_fact :: Lens.Lens' CellInput (Prelude.Maybe Prelude.Text)
cellInput_fact :: (Maybe Text -> f (Maybe Text)) -> CellInput -> f CellInput
cellInput_fact = (CellInput -> Maybe (Sensitive Text))
-> (CellInput -> Maybe (Sensitive Text) -> CellInput)
-> Lens
CellInput
CellInput
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CellInput' {Maybe (Sensitive Text)
fact :: Maybe (Sensitive Text)
$sel:fact:CellInput' :: CellInput -> Maybe (Sensitive Text)
fact} -> Maybe (Sensitive Text)
fact) (\s :: CellInput
s@CellInput' {} Maybe (Sensitive Text)
a -> CellInput
s {$sel:fact:CellInput' :: Maybe (Sensitive Text)
fact = Maybe (Sensitive Text)
a} :: CellInput) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CellInput -> f CellInput)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CellInput
-> f CellInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Prelude.Hashable CellInput
instance Prelude.NFData CellInput
instance Core.ToJSON CellInput where
toJSON :: CellInput -> Value
toJSON CellInput' {Maybe (Sensitive Text)
fact :: Maybe (Sensitive Text)
$sel:fact:CellInput' :: CellInput -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"fact" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
fact]
)