{-# 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.AppFlow.Types.SingularSourceProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SingularSourceProperties = SingularSourceProperties'
{
SingularSourceProperties -> Text
object' :: Prelude.Text
}
deriving (SingularSourceProperties -> SingularSourceProperties -> Bool
(SingularSourceProperties -> SingularSourceProperties -> Bool)
-> (SingularSourceProperties -> SingularSourceProperties -> Bool)
-> Eq SingularSourceProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SingularSourceProperties -> SingularSourceProperties -> Bool
$c/= :: SingularSourceProperties -> SingularSourceProperties -> Bool
== :: SingularSourceProperties -> SingularSourceProperties -> Bool
$c== :: SingularSourceProperties -> SingularSourceProperties -> Bool
Prelude.Eq, ReadPrec [SingularSourceProperties]
ReadPrec SingularSourceProperties
Int -> ReadS SingularSourceProperties
ReadS [SingularSourceProperties]
(Int -> ReadS SingularSourceProperties)
-> ReadS [SingularSourceProperties]
-> ReadPrec SingularSourceProperties
-> ReadPrec [SingularSourceProperties]
-> Read SingularSourceProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SingularSourceProperties]
$creadListPrec :: ReadPrec [SingularSourceProperties]
readPrec :: ReadPrec SingularSourceProperties
$creadPrec :: ReadPrec SingularSourceProperties
readList :: ReadS [SingularSourceProperties]
$creadList :: ReadS [SingularSourceProperties]
readsPrec :: Int -> ReadS SingularSourceProperties
$creadsPrec :: Int -> ReadS SingularSourceProperties
Prelude.Read, Int -> SingularSourceProperties -> ShowS
[SingularSourceProperties] -> ShowS
SingularSourceProperties -> String
(Int -> SingularSourceProperties -> ShowS)
-> (SingularSourceProperties -> String)
-> ([SingularSourceProperties] -> ShowS)
-> Show SingularSourceProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SingularSourceProperties] -> ShowS
$cshowList :: [SingularSourceProperties] -> ShowS
show :: SingularSourceProperties -> String
$cshow :: SingularSourceProperties -> String
showsPrec :: Int -> SingularSourceProperties -> ShowS
$cshowsPrec :: Int -> SingularSourceProperties -> ShowS
Prelude.Show, (forall x.
SingularSourceProperties -> Rep SingularSourceProperties x)
-> (forall x.
Rep SingularSourceProperties x -> SingularSourceProperties)
-> Generic SingularSourceProperties
forall x.
Rep SingularSourceProperties x -> SingularSourceProperties
forall x.
SingularSourceProperties -> Rep SingularSourceProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SingularSourceProperties x -> SingularSourceProperties
$cfrom :: forall x.
SingularSourceProperties -> Rep SingularSourceProperties x
Prelude.Generic)
newSingularSourceProperties ::
Prelude.Text ->
SingularSourceProperties
newSingularSourceProperties :: Text -> SingularSourceProperties
newSingularSourceProperties Text
pObject_ =
SingularSourceProperties' :: Text -> SingularSourceProperties
SingularSourceProperties' {$sel:object':SingularSourceProperties' :: Text
object' = Text
pObject_}
singularSourceProperties_object :: Lens.Lens' SingularSourceProperties Prelude.Text
singularSourceProperties_object :: (Text -> f Text)
-> SingularSourceProperties -> f SingularSourceProperties
singularSourceProperties_object = (SingularSourceProperties -> Text)
-> (SingularSourceProperties -> Text -> SingularSourceProperties)
-> Lens SingularSourceProperties SingularSourceProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SingularSourceProperties' {Text
object' :: Text
$sel:object':SingularSourceProperties' :: SingularSourceProperties -> Text
object'} -> Text
object') (\s :: SingularSourceProperties
s@SingularSourceProperties' {} Text
a -> SingularSourceProperties
s {$sel:object':SingularSourceProperties' :: Text
object' = Text
a} :: SingularSourceProperties)
instance Core.FromJSON SingularSourceProperties where
parseJSON :: Value -> Parser SingularSourceProperties
parseJSON =
String
-> (Object -> Parser SingularSourceProperties)
-> Value
-> Parser SingularSourceProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SingularSourceProperties"
( \Object
x ->
Text -> SingularSourceProperties
SingularSourceProperties'
(Text -> SingularSourceProperties)
-> Parser Text -> Parser SingularSourceProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"object")
)
instance Prelude.Hashable SingularSourceProperties
instance Prelude.NFData SingularSourceProperties
instance Core.ToJSON SingularSourceProperties where
toJSON :: SingularSourceProperties -> Value
toJSON SingularSourceProperties' {Text
object' :: Text
$sel:object':SingularSourceProperties' :: SingularSourceProperties -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"object" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
object')]
)