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