{-# 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.AnalyticsConfigurationType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AnalyticsConfigurationType = AnalyticsConfigurationType'
{
AnalyticsConfigurationType -> Maybe Text
applicationArn :: Prelude.Maybe Prelude.Text,
AnalyticsConfigurationType -> Maybe Bool
userDataShared :: Prelude.Maybe Prelude.Bool,
AnalyticsConfigurationType -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
AnalyticsConfigurationType -> Maybe Text
externalId :: Prelude.Maybe Prelude.Text,
AnalyticsConfigurationType -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
}
deriving (AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool
(AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool)
-> (AnalyticsConfigurationType
-> AnalyticsConfigurationType -> Bool)
-> Eq AnalyticsConfigurationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool
$c/= :: AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool
== :: AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool
$c== :: AnalyticsConfigurationType -> AnalyticsConfigurationType -> Bool
Prelude.Eq, ReadPrec [AnalyticsConfigurationType]
ReadPrec AnalyticsConfigurationType
Int -> ReadS AnalyticsConfigurationType
ReadS [AnalyticsConfigurationType]
(Int -> ReadS AnalyticsConfigurationType)
-> ReadS [AnalyticsConfigurationType]
-> ReadPrec AnalyticsConfigurationType
-> ReadPrec [AnalyticsConfigurationType]
-> Read AnalyticsConfigurationType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyticsConfigurationType]
$creadListPrec :: ReadPrec [AnalyticsConfigurationType]
readPrec :: ReadPrec AnalyticsConfigurationType
$creadPrec :: ReadPrec AnalyticsConfigurationType
readList :: ReadS [AnalyticsConfigurationType]
$creadList :: ReadS [AnalyticsConfigurationType]
readsPrec :: Int -> ReadS AnalyticsConfigurationType
$creadsPrec :: Int -> ReadS AnalyticsConfigurationType
Prelude.Read, Int -> AnalyticsConfigurationType -> ShowS
[AnalyticsConfigurationType] -> ShowS
AnalyticsConfigurationType -> String
(Int -> AnalyticsConfigurationType -> ShowS)
-> (AnalyticsConfigurationType -> String)
-> ([AnalyticsConfigurationType] -> ShowS)
-> Show AnalyticsConfigurationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyticsConfigurationType] -> ShowS
$cshowList :: [AnalyticsConfigurationType] -> ShowS
show :: AnalyticsConfigurationType -> String
$cshow :: AnalyticsConfigurationType -> String
showsPrec :: Int -> AnalyticsConfigurationType -> ShowS
$cshowsPrec :: Int -> AnalyticsConfigurationType -> ShowS
Prelude.Show, (forall x.
AnalyticsConfigurationType -> Rep AnalyticsConfigurationType x)
-> (forall x.
Rep AnalyticsConfigurationType x -> AnalyticsConfigurationType)
-> Generic AnalyticsConfigurationType
forall x.
Rep AnalyticsConfigurationType x -> AnalyticsConfigurationType
forall x.
AnalyticsConfigurationType -> Rep AnalyticsConfigurationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnalyticsConfigurationType x -> AnalyticsConfigurationType
$cfrom :: forall x.
AnalyticsConfigurationType -> Rep AnalyticsConfigurationType x
Prelude.Generic)
newAnalyticsConfigurationType ::
AnalyticsConfigurationType
newAnalyticsConfigurationType :: AnalyticsConfigurationType
newAnalyticsConfigurationType =
AnalyticsConfigurationType' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AnalyticsConfigurationType
AnalyticsConfigurationType'
{ $sel:applicationArn:AnalyticsConfigurationType' :: Maybe Text
applicationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userDataShared:AnalyticsConfigurationType' :: Maybe Bool
userDataShared = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:AnalyticsConfigurationType' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalId:AnalyticsConfigurationType' :: Maybe Text
externalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:AnalyticsConfigurationType' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
analyticsConfigurationType_applicationArn :: Lens.Lens' AnalyticsConfigurationType (Prelude.Maybe Prelude.Text)
analyticsConfigurationType_applicationArn :: (Maybe Text -> f (Maybe Text))
-> AnalyticsConfigurationType -> f AnalyticsConfigurationType
analyticsConfigurationType_applicationArn = (AnalyticsConfigurationType -> Maybe Text)
-> (AnalyticsConfigurationType
-> Maybe Text -> AnalyticsConfigurationType)
-> Lens
AnalyticsConfigurationType
AnalyticsConfigurationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyticsConfigurationType' {Maybe Text
applicationArn :: Maybe Text
$sel:applicationArn:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
applicationArn} -> Maybe Text
applicationArn) (\s :: AnalyticsConfigurationType
s@AnalyticsConfigurationType' {} Maybe Text
a -> AnalyticsConfigurationType
s {$sel:applicationArn:AnalyticsConfigurationType' :: Maybe Text
applicationArn = Maybe Text
a} :: AnalyticsConfigurationType)
analyticsConfigurationType_userDataShared :: Lens.Lens' AnalyticsConfigurationType (Prelude.Maybe Prelude.Bool)
analyticsConfigurationType_userDataShared :: (Maybe Bool -> f (Maybe Bool))
-> AnalyticsConfigurationType -> f AnalyticsConfigurationType
analyticsConfigurationType_userDataShared = (AnalyticsConfigurationType -> Maybe Bool)
-> (AnalyticsConfigurationType
-> Maybe Bool -> AnalyticsConfigurationType)
-> Lens
AnalyticsConfigurationType
AnalyticsConfigurationType
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyticsConfigurationType' {Maybe Bool
userDataShared :: Maybe Bool
$sel:userDataShared:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Bool
userDataShared} -> Maybe Bool
userDataShared) (\s :: AnalyticsConfigurationType
s@AnalyticsConfigurationType' {} Maybe Bool
a -> AnalyticsConfigurationType
s {$sel:userDataShared:AnalyticsConfigurationType' :: Maybe Bool
userDataShared = Maybe Bool
a} :: AnalyticsConfigurationType)
analyticsConfigurationType_applicationId :: Lens.Lens' AnalyticsConfigurationType (Prelude.Maybe Prelude.Text)
analyticsConfigurationType_applicationId :: (Maybe Text -> f (Maybe Text))
-> AnalyticsConfigurationType -> f AnalyticsConfigurationType
analyticsConfigurationType_applicationId = (AnalyticsConfigurationType -> Maybe Text)
-> (AnalyticsConfigurationType
-> Maybe Text -> AnalyticsConfigurationType)
-> Lens
AnalyticsConfigurationType
AnalyticsConfigurationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyticsConfigurationType' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: AnalyticsConfigurationType
s@AnalyticsConfigurationType' {} Maybe Text
a -> AnalyticsConfigurationType
s {$sel:applicationId:AnalyticsConfigurationType' :: Maybe Text
applicationId = Maybe Text
a} :: AnalyticsConfigurationType)
analyticsConfigurationType_externalId :: Lens.Lens' AnalyticsConfigurationType (Prelude.Maybe Prelude.Text)
analyticsConfigurationType_externalId :: (Maybe Text -> f (Maybe Text))
-> AnalyticsConfigurationType -> f AnalyticsConfigurationType
analyticsConfigurationType_externalId = (AnalyticsConfigurationType -> Maybe Text)
-> (AnalyticsConfigurationType
-> Maybe Text -> AnalyticsConfigurationType)
-> Lens
AnalyticsConfigurationType
AnalyticsConfigurationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyticsConfigurationType' {Maybe Text
externalId :: Maybe Text
$sel:externalId:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
externalId} -> Maybe Text
externalId) (\s :: AnalyticsConfigurationType
s@AnalyticsConfigurationType' {} Maybe Text
a -> AnalyticsConfigurationType
s {$sel:externalId:AnalyticsConfigurationType' :: Maybe Text
externalId = Maybe Text
a} :: AnalyticsConfigurationType)
analyticsConfigurationType_roleArn :: Lens.Lens' AnalyticsConfigurationType (Prelude.Maybe Prelude.Text)
analyticsConfigurationType_roleArn :: (Maybe Text -> f (Maybe Text))
-> AnalyticsConfigurationType -> f AnalyticsConfigurationType
analyticsConfigurationType_roleArn = (AnalyticsConfigurationType -> Maybe Text)
-> (AnalyticsConfigurationType
-> Maybe Text -> AnalyticsConfigurationType)
-> Lens
AnalyticsConfigurationType
AnalyticsConfigurationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyticsConfigurationType' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: AnalyticsConfigurationType
s@AnalyticsConfigurationType' {} Maybe Text
a -> AnalyticsConfigurationType
s {$sel:roleArn:AnalyticsConfigurationType' :: Maybe Text
roleArn = Maybe Text
a} :: AnalyticsConfigurationType)
instance Core.FromJSON AnalyticsConfigurationType where
parseJSON :: Value -> Parser AnalyticsConfigurationType
parseJSON =
String
-> (Object -> Parser AnalyticsConfigurationType)
-> Value
-> Parser AnalyticsConfigurationType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AnalyticsConfigurationType"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AnalyticsConfigurationType
AnalyticsConfigurationType'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AnalyticsConfigurationType)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AnalyticsConfigurationType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationArn")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AnalyticsConfigurationType)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AnalyticsConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserDataShared")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AnalyticsConfigurationType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AnalyticsConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationId")
Parser (Maybe Text -> Maybe Text -> AnalyticsConfigurationType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AnalyticsConfigurationType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExternalId")
Parser (Maybe Text -> AnalyticsConfigurationType)
-> Parser (Maybe Text) -> Parser AnalyticsConfigurationType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleArn")
)
instance Prelude.Hashable AnalyticsConfigurationType
instance Prelude.NFData AnalyticsConfigurationType
instance Core.ToJSON AnalyticsConfigurationType where
toJSON :: AnalyticsConfigurationType -> Value
toJSON AnalyticsConfigurationType' {Maybe Bool
Maybe Text
roleArn :: Maybe Text
externalId :: Maybe Text
applicationId :: Maybe Text
userDataShared :: Maybe Bool
applicationArn :: Maybe Text
$sel:roleArn:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
$sel:externalId:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
$sel:applicationId:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
$sel:userDataShared:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Bool
$sel:applicationArn:AnalyticsConfigurationType' :: AnalyticsConfigurationType -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ApplicationArn" 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
applicationArn,
(Text
"UserDataShared" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
userDataShared,
(Text
"ApplicationId" 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
applicationId,
(Text
"ExternalId" 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
externalId,
(Text
"RoleArn" 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
roleArn
]
)