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