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