{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CognitoIdentityProvider.Types.AuthEventType
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CognitoIdentityProvider.Types.AuthEventType where

import Amazonka.CognitoIdentityProvider.Types.ChallengeResponseType
import Amazonka.CognitoIdentityProvider.Types.EventContextDataType
import Amazonka.CognitoIdentityProvider.Types.EventFeedbackType
import Amazonka.CognitoIdentityProvider.Types.EventResponseType
import Amazonka.CognitoIdentityProvider.Types.EventRiskType
import Amazonka.CognitoIdentityProvider.Types.EventType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The authentication event type.
--
-- /See:/ 'newAuthEventType' smart constructor.
data AuthEventType = AuthEventType'
  { -- | The event risk.
    AuthEventType -> Maybe EventRiskType
eventRisk :: Prelude.Maybe EventRiskType,
    -- | The event response.
    AuthEventType -> Maybe EventResponseType
eventResponse :: Prelude.Maybe EventResponseType,
    -- | The user context data captured at the time of an event request. It
    -- provides additional information about the client from which event the
    -- request is received.
    AuthEventType -> Maybe EventContextDataType
eventContextData :: Prelude.Maybe EventContextDataType,
    -- | The challenge responses.
    AuthEventType -> Maybe [ChallengeResponseType]
challengeResponses :: Prelude.Maybe [ChallengeResponseType],
    -- | The event type.
    AuthEventType -> Maybe EventType
eventType :: Prelude.Maybe EventType,
    -- | The creation date
    AuthEventType -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | A flag specifying the user feedback captured at the time of an event
    -- request is good or bad.
    AuthEventType -> Maybe EventFeedbackType
eventFeedback :: Prelude.Maybe EventFeedbackType,
    -- | The event ID.
    AuthEventType -> Maybe Text
eventId :: Prelude.Maybe Prelude.Text
  }
  deriving (AuthEventType -> AuthEventType -> Bool
(AuthEventType -> AuthEventType -> Bool)
-> (AuthEventType -> AuthEventType -> Bool) -> Eq AuthEventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthEventType -> AuthEventType -> Bool
$c/= :: AuthEventType -> AuthEventType -> Bool
== :: AuthEventType -> AuthEventType -> Bool
$c== :: AuthEventType -> AuthEventType -> Bool
Prelude.Eq, ReadPrec [AuthEventType]
ReadPrec AuthEventType
Int -> ReadS AuthEventType
ReadS [AuthEventType]
(Int -> ReadS AuthEventType)
-> ReadS [AuthEventType]
-> ReadPrec AuthEventType
-> ReadPrec [AuthEventType]
-> Read AuthEventType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuthEventType]
$creadListPrec :: ReadPrec [AuthEventType]
readPrec :: ReadPrec AuthEventType
$creadPrec :: ReadPrec AuthEventType
readList :: ReadS [AuthEventType]
$creadList :: ReadS [AuthEventType]
readsPrec :: Int -> ReadS AuthEventType
$creadsPrec :: Int -> ReadS AuthEventType
Prelude.Read, Int -> AuthEventType -> ShowS
[AuthEventType] -> ShowS
AuthEventType -> String
(Int -> AuthEventType -> ShowS)
-> (AuthEventType -> String)
-> ([AuthEventType] -> ShowS)
-> Show AuthEventType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthEventType] -> ShowS
$cshowList :: [AuthEventType] -> ShowS
show :: AuthEventType -> String
$cshow :: AuthEventType -> String
showsPrec :: Int -> AuthEventType -> ShowS
$cshowsPrec :: Int -> AuthEventType -> ShowS
Prelude.Show, (forall x. AuthEventType -> Rep AuthEventType x)
-> (forall x. Rep AuthEventType x -> AuthEventType)
-> Generic AuthEventType
forall x. Rep AuthEventType x -> AuthEventType
forall x. AuthEventType -> Rep AuthEventType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuthEventType x -> AuthEventType
$cfrom :: forall x. AuthEventType -> Rep AuthEventType x
Prelude.Generic)

-- |
-- Create a value of 'AuthEventType' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'eventRisk', 'authEventType_eventRisk' - The event risk.
--
-- 'eventResponse', 'authEventType_eventResponse' - The event response.
--
-- 'eventContextData', 'authEventType_eventContextData' - The user context data captured at the time of an event request. It
-- provides additional information about the client from which event the
-- request is received.
--
-- 'challengeResponses', 'authEventType_challengeResponses' - The challenge responses.
--
-- 'eventType', 'authEventType_eventType' - The event type.
--
-- 'creationDate', 'authEventType_creationDate' - The creation date
--
-- 'eventFeedback', 'authEventType_eventFeedback' - A flag specifying the user feedback captured at the time of an event
-- request is good or bad.
--
-- 'eventId', 'authEventType_eventId' - The event ID.
newAuthEventType ::
  AuthEventType
newAuthEventType :: AuthEventType
newAuthEventType =
  AuthEventType' :: Maybe EventRiskType
-> Maybe EventResponseType
-> Maybe EventContextDataType
-> Maybe [ChallengeResponseType]
-> Maybe EventType
-> Maybe POSIX
-> Maybe EventFeedbackType
-> Maybe Text
-> AuthEventType
AuthEventType'
    { $sel:eventRisk:AuthEventType' :: Maybe EventRiskType
eventRisk = Maybe EventRiskType
forall a. Maybe a
Prelude.Nothing,
      $sel:eventResponse:AuthEventType' :: Maybe EventResponseType
eventResponse = Maybe EventResponseType
forall a. Maybe a
Prelude.Nothing,
      $sel:eventContextData:AuthEventType' :: Maybe EventContextDataType
eventContextData = Maybe EventContextDataType
forall a. Maybe a
Prelude.Nothing,
      $sel:challengeResponses:AuthEventType' :: Maybe [ChallengeResponseType]
challengeResponses = Maybe [ChallengeResponseType]
forall a. Maybe a
Prelude.Nothing,
      $sel:eventType:AuthEventType' :: Maybe EventType
eventType = Maybe EventType
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:AuthEventType' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:eventFeedback:AuthEventType' :: Maybe EventFeedbackType
eventFeedback = Maybe EventFeedbackType
forall a. Maybe a
Prelude.Nothing,
      $sel:eventId:AuthEventType' :: Maybe Text
eventId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The event risk.
authEventType_eventRisk :: Lens.Lens' AuthEventType (Prelude.Maybe EventRiskType)
authEventType_eventRisk :: (Maybe EventRiskType -> f (Maybe EventRiskType))
-> AuthEventType -> f AuthEventType
authEventType_eventRisk = (AuthEventType -> Maybe EventRiskType)
-> (AuthEventType -> Maybe EventRiskType -> AuthEventType)
-> Lens
     AuthEventType
     AuthEventType
     (Maybe EventRiskType)
     (Maybe EventRiskType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe EventRiskType
eventRisk :: Maybe EventRiskType
$sel:eventRisk:AuthEventType' :: AuthEventType -> Maybe EventRiskType
eventRisk} -> Maybe EventRiskType
eventRisk) (\s :: AuthEventType
s@AuthEventType' {} Maybe EventRiskType
a -> AuthEventType
s {$sel:eventRisk:AuthEventType' :: Maybe EventRiskType
eventRisk = Maybe EventRiskType
a} :: AuthEventType)

-- | The event response.
authEventType_eventResponse :: Lens.Lens' AuthEventType (Prelude.Maybe EventResponseType)
authEventType_eventResponse :: (Maybe EventResponseType -> f (Maybe EventResponseType))
-> AuthEventType -> f AuthEventType
authEventType_eventResponse = (AuthEventType -> Maybe EventResponseType)
-> (AuthEventType -> Maybe EventResponseType -> AuthEventType)
-> Lens
     AuthEventType
     AuthEventType
     (Maybe EventResponseType)
     (Maybe EventResponseType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe EventResponseType
eventResponse :: Maybe EventResponseType
$sel:eventResponse:AuthEventType' :: AuthEventType -> Maybe EventResponseType
eventResponse} -> Maybe EventResponseType
eventResponse) (\s :: AuthEventType
s@AuthEventType' {} Maybe EventResponseType
a -> AuthEventType
s {$sel:eventResponse:AuthEventType' :: Maybe EventResponseType
eventResponse = Maybe EventResponseType
a} :: AuthEventType)

-- | The user context data captured at the time of an event request. It
-- provides additional information about the client from which event the
-- request is received.
authEventType_eventContextData :: Lens.Lens' AuthEventType (Prelude.Maybe EventContextDataType)
authEventType_eventContextData :: (Maybe EventContextDataType -> f (Maybe EventContextDataType))
-> AuthEventType -> f AuthEventType
authEventType_eventContextData = (AuthEventType -> Maybe EventContextDataType)
-> (AuthEventType -> Maybe EventContextDataType -> AuthEventType)
-> Lens
     AuthEventType
     AuthEventType
     (Maybe EventContextDataType)
     (Maybe EventContextDataType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe EventContextDataType
eventContextData :: Maybe EventContextDataType
$sel:eventContextData:AuthEventType' :: AuthEventType -> Maybe EventContextDataType
eventContextData} -> Maybe EventContextDataType
eventContextData) (\s :: AuthEventType
s@AuthEventType' {} Maybe EventContextDataType
a -> AuthEventType
s {$sel:eventContextData:AuthEventType' :: Maybe EventContextDataType
eventContextData = Maybe EventContextDataType
a} :: AuthEventType)

-- | The challenge responses.
authEventType_challengeResponses :: Lens.Lens' AuthEventType (Prelude.Maybe [ChallengeResponseType])
authEventType_challengeResponses :: (Maybe [ChallengeResponseType]
 -> f (Maybe [ChallengeResponseType]))
-> AuthEventType -> f AuthEventType
authEventType_challengeResponses = (AuthEventType -> Maybe [ChallengeResponseType])
-> (AuthEventType
    -> Maybe [ChallengeResponseType] -> AuthEventType)
-> Lens
     AuthEventType
     AuthEventType
     (Maybe [ChallengeResponseType])
     (Maybe [ChallengeResponseType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe [ChallengeResponseType]
challengeResponses :: Maybe [ChallengeResponseType]
$sel:challengeResponses:AuthEventType' :: AuthEventType -> Maybe [ChallengeResponseType]
challengeResponses} -> Maybe [ChallengeResponseType]
challengeResponses) (\s :: AuthEventType
s@AuthEventType' {} Maybe [ChallengeResponseType]
a -> AuthEventType
s {$sel:challengeResponses:AuthEventType' :: Maybe [ChallengeResponseType]
challengeResponses = Maybe [ChallengeResponseType]
a} :: AuthEventType) ((Maybe [ChallengeResponseType]
  -> f (Maybe [ChallengeResponseType]))
 -> AuthEventType -> f AuthEventType)
-> ((Maybe [ChallengeResponseType]
     -> f (Maybe [ChallengeResponseType]))
    -> Maybe [ChallengeResponseType]
    -> f (Maybe [ChallengeResponseType]))
-> (Maybe [ChallengeResponseType]
    -> f (Maybe [ChallengeResponseType]))
-> AuthEventType
-> f AuthEventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ChallengeResponseType]
  [ChallengeResponseType]
  [ChallengeResponseType]
  [ChallengeResponseType]
-> Iso
     (Maybe [ChallengeResponseType])
     (Maybe [ChallengeResponseType])
     (Maybe [ChallengeResponseType])
     (Maybe [ChallengeResponseType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [ChallengeResponseType]
  [ChallengeResponseType]
  [ChallengeResponseType]
  [ChallengeResponseType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The event type.
authEventType_eventType :: Lens.Lens' AuthEventType (Prelude.Maybe EventType)
authEventType_eventType :: (Maybe EventType -> f (Maybe EventType))
-> AuthEventType -> f AuthEventType
authEventType_eventType = (AuthEventType -> Maybe EventType)
-> (AuthEventType -> Maybe EventType -> AuthEventType)
-> Lens
     AuthEventType AuthEventType (Maybe EventType) (Maybe EventType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe EventType
eventType :: Maybe EventType
$sel:eventType:AuthEventType' :: AuthEventType -> Maybe EventType
eventType} -> Maybe EventType
eventType) (\s :: AuthEventType
s@AuthEventType' {} Maybe EventType
a -> AuthEventType
s {$sel:eventType:AuthEventType' :: Maybe EventType
eventType = Maybe EventType
a} :: AuthEventType)

-- | The creation date
authEventType_creationDate :: Lens.Lens' AuthEventType (Prelude.Maybe Prelude.UTCTime)
authEventType_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AuthEventType -> f AuthEventType
authEventType_creationDate = (AuthEventType -> Maybe POSIX)
-> (AuthEventType -> Maybe POSIX -> AuthEventType)
-> Lens AuthEventType AuthEventType (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:AuthEventType' :: AuthEventType -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: AuthEventType
s@AuthEventType' {} Maybe POSIX
a -> AuthEventType
s {$sel:creationDate:AuthEventType' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: AuthEventType) ((Maybe POSIX -> f (Maybe POSIX))
 -> AuthEventType -> f AuthEventType)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AuthEventType
-> f AuthEventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A flag specifying the user feedback captured at the time of an event
-- request is good or bad.
authEventType_eventFeedback :: Lens.Lens' AuthEventType (Prelude.Maybe EventFeedbackType)
authEventType_eventFeedback :: (Maybe EventFeedbackType -> f (Maybe EventFeedbackType))
-> AuthEventType -> f AuthEventType
authEventType_eventFeedback = (AuthEventType -> Maybe EventFeedbackType)
-> (AuthEventType -> Maybe EventFeedbackType -> AuthEventType)
-> Lens
     AuthEventType
     AuthEventType
     (Maybe EventFeedbackType)
     (Maybe EventFeedbackType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe EventFeedbackType
eventFeedback :: Maybe EventFeedbackType
$sel:eventFeedback:AuthEventType' :: AuthEventType -> Maybe EventFeedbackType
eventFeedback} -> Maybe EventFeedbackType
eventFeedback) (\s :: AuthEventType
s@AuthEventType' {} Maybe EventFeedbackType
a -> AuthEventType
s {$sel:eventFeedback:AuthEventType' :: Maybe EventFeedbackType
eventFeedback = Maybe EventFeedbackType
a} :: AuthEventType)

-- | The event ID.
authEventType_eventId :: Lens.Lens' AuthEventType (Prelude.Maybe Prelude.Text)
authEventType_eventId :: (Maybe Text -> f (Maybe Text)) -> AuthEventType -> f AuthEventType
authEventType_eventId = (AuthEventType -> Maybe Text)
-> (AuthEventType -> Maybe Text -> AuthEventType)
-> Lens AuthEventType AuthEventType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthEventType' {Maybe Text
eventId :: Maybe Text
$sel:eventId:AuthEventType' :: AuthEventType -> Maybe Text
eventId} -> Maybe Text
eventId) (\s :: AuthEventType
s@AuthEventType' {} Maybe Text
a -> AuthEventType
s {$sel:eventId:AuthEventType' :: Maybe Text
eventId = Maybe Text
a} :: AuthEventType)

instance Core.FromJSON AuthEventType where
  parseJSON :: Value -> Parser AuthEventType
parseJSON =
    String
-> (Object -> Parser AuthEventType)
-> Value
-> Parser AuthEventType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AuthEventType"
      ( \Object
x ->
          Maybe EventRiskType
-> Maybe EventResponseType
-> Maybe EventContextDataType
-> Maybe [ChallengeResponseType]
-> Maybe EventType
-> Maybe POSIX
-> Maybe EventFeedbackType
-> Maybe Text
-> AuthEventType
AuthEventType'
            (Maybe EventRiskType
 -> Maybe EventResponseType
 -> Maybe EventContextDataType
 -> Maybe [ChallengeResponseType]
 -> Maybe EventType
 -> Maybe POSIX
 -> Maybe EventFeedbackType
 -> Maybe Text
 -> AuthEventType)
-> Parser (Maybe EventRiskType)
-> Parser
     (Maybe EventResponseType
      -> Maybe EventContextDataType
      -> Maybe [ChallengeResponseType]
      -> Maybe EventType
      -> Maybe POSIX
      -> Maybe EventFeedbackType
      -> Maybe Text
      -> AuthEventType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EventRiskType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventRisk")
            Parser
  (Maybe EventResponseType
   -> Maybe EventContextDataType
   -> Maybe [ChallengeResponseType]
   -> Maybe EventType
   -> Maybe POSIX
   -> Maybe EventFeedbackType
   -> Maybe Text
   -> AuthEventType)
-> Parser (Maybe EventResponseType)
-> Parser
     (Maybe EventContextDataType
      -> Maybe [ChallengeResponseType]
      -> Maybe EventType
      -> Maybe POSIX
      -> Maybe EventFeedbackType
      -> Maybe Text
      -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventResponseType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventResponse")
            Parser
  (Maybe EventContextDataType
   -> Maybe [ChallengeResponseType]
   -> Maybe EventType
   -> Maybe POSIX
   -> Maybe EventFeedbackType
   -> Maybe Text
   -> AuthEventType)
-> Parser (Maybe EventContextDataType)
-> Parser
     (Maybe [ChallengeResponseType]
      -> Maybe EventType
      -> Maybe POSIX
      -> Maybe EventFeedbackType
      -> Maybe Text
      -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventContextDataType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventContextData")
            Parser
  (Maybe [ChallengeResponseType]
   -> Maybe EventType
   -> Maybe POSIX
   -> Maybe EventFeedbackType
   -> Maybe Text
   -> AuthEventType)
-> Parser (Maybe [ChallengeResponseType])
-> Parser
     (Maybe EventType
      -> Maybe POSIX
      -> Maybe EventFeedbackType
      -> Maybe Text
      -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ChallengeResponseType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChallengeResponses"
                            Parser (Maybe (Maybe [ChallengeResponseType]))
-> Maybe [ChallengeResponseType]
-> Parser (Maybe [ChallengeResponseType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ChallengeResponseType]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe EventType
   -> Maybe POSIX
   -> Maybe EventFeedbackType
   -> Maybe Text
   -> AuthEventType)
-> Parser (Maybe EventType)
-> Parser
     (Maybe POSIX
      -> Maybe EventFeedbackType -> Maybe Text -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventType")
            Parser
  (Maybe POSIX
   -> Maybe EventFeedbackType -> Maybe Text -> AuthEventType)
-> Parser (Maybe POSIX)
-> Parser (Maybe EventFeedbackType -> Maybe Text -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
            Parser (Maybe EventFeedbackType -> Maybe Text -> AuthEventType)
-> Parser (Maybe EventFeedbackType)
-> Parser (Maybe Text -> AuthEventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventFeedbackType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventFeedback")
            Parser (Maybe Text -> AuthEventType)
-> Parser (Maybe Text) -> Parser AuthEventType
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
"EventId")
      )

instance Prelude.Hashable AuthEventType

instance Prelude.NFData AuthEventType