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