{-# 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.FraudDetector.Types.EventType
-- 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.FraudDetector.Types.EventType where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.EventIngestion
import Amazonka.FraudDetector.Types.IngestedEventStatistics
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The event type details.
--
-- /See:/ 'newEventType' smart constructor.
data EventType = EventType'
  { -- | Timestamp of when the event type was last updated.
    EventType -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
    -- | The entity type ARN.
    EventType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when the event type was created.
    EventType -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
    -- | The event type entity types.
    EventType -> Maybe (NonEmpty Text)
entityTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The event type event variables.
    EventType -> Maybe [Text]
eventVariables :: Prelude.Maybe [Prelude.Text],
    -- | The event type name.
    EventType -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Data about the stored events.
    EventType -> Maybe IngestedEventStatistics
ingestedEventStatistics :: Prelude.Maybe IngestedEventStatistics,
    -- | The event type labels.
    EventType -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
    -- | If @Enabled@, Amazon Fraud Detector stores event data when you generate
    -- a prediction and uses that data to update calculated variables in near
    -- real-time. Amazon Fraud Detector uses this data, known as
    -- @INGESTED_EVENTS@, to train your model and improve fraud predictions.
    EventType -> Maybe EventIngestion
eventIngestion :: Prelude.Maybe EventIngestion,
    -- | The event type description.
    EventType -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (EventType -> EventType -> Bool
(EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool) -> Eq EventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventType -> EventType -> Bool
$c/= :: EventType -> EventType -> Bool
== :: EventType -> EventType -> Bool
$c== :: EventType -> EventType -> Bool
Prelude.Eq, Int -> EventType -> ShowS
[EventType] -> ShowS
EventType -> String
(Int -> EventType -> ShowS)
-> (EventType -> String)
-> ([EventType] -> ShowS)
-> Show EventType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventType] -> ShowS
$cshowList :: [EventType] -> ShowS
show :: EventType -> String
$cshow :: EventType -> String
showsPrec :: Int -> EventType -> ShowS
$cshowsPrec :: Int -> EventType -> ShowS
Prelude.Show, (forall x. EventType -> Rep EventType x)
-> (forall x. Rep EventType x -> EventType) -> Generic EventType
forall x. Rep EventType x -> EventType
forall x. EventType -> Rep EventType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventType x -> EventType
$cfrom :: forall x. EventType -> Rep EventType x
Prelude.Generic)

-- |
-- Create a value of 'EventType' 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:
--
-- 'lastUpdatedTime', 'eventType_lastUpdatedTime' - Timestamp of when the event type was last updated.
--
-- 'arn', 'eventType_arn' - The entity type ARN.
--
-- 'createdTime', 'eventType_createdTime' - Timestamp of when the event type was created.
--
-- 'entityTypes', 'eventType_entityTypes' - The event type entity types.
--
-- 'eventVariables', 'eventType_eventVariables' - The event type event variables.
--
-- 'name', 'eventType_name' - The event type name.
--
-- 'ingestedEventStatistics', 'eventType_ingestedEventStatistics' - Data about the stored events.
--
-- 'labels', 'eventType_labels' - The event type labels.
--
-- 'eventIngestion', 'eventType_eventIngestion' - If @Enabled@, Amazon Fraud Detector stores event data when you generate
-- a prediction and uses that data to update calculated variables in near
-- real-time. Amazon Fraud Detector uses this data, known as
-- @INGESTED_EVENTS@, to train your model and improve fraud predictions.
--
-- 'description', 'eventType_description' - The event type description.
newEventType ::
  EventType
newEventType :: EventType
newEventType =
  EventType' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe [Text]
-> Maybe Text
-> Maybe IngestedEventStatistics
-> Maybe [Text]
-> Maybe EventIngestion
-> Maybe Text
-> EventType
EventType'
    { $sel:lastUpdatedTime:EventType' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:EventType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:EventType' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityTypes:EventType' :: Maybe (NonEmpty Text)
entityTypes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:eventVariables:EventType' :: Maybe [Text]
eventVariables = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:EventType' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestedEventStatistics:EventType' :: Maybe IngestedEventStatistics
ingestedEventStatistics = Maybe IngestedEventStatistics
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:EventType' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:eventIngestion:EventType' :: Maybe EventIngestion
eventIngestion = Maybe EventIngestion
forall a. Maybe a
Prelude.Nothing,
      $sel:description:EventType' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Timestamp of when the event type was last updated.
eventType_lastUpdatedTime :: Lens.Lens' EventType (Prelude.Maybe Prelude.Text)
eventType_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> EventType -> f EventType
eventType_lastUpdatedTime = (EventType -> Maybe Text)
-> (EventType -> Maybe Text -> EventType)
-> Lens EventType EventType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:EventType' :: EventType -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: EventType
s@EventType' {} Maybe Text
a -> EventType
s {$sel:lastUpdatedTime:EventType' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: EventType)

-- | The entity type ARN.
eventType_arn :: Lens.Lens' EventType (Prelude.Maybe Prelude.Text)
eventType_arn :: (Maybe Text -> f (Maybe Text)) -> EventType -> f EventType
eventType_arn = (EventType -> Maybe Text)
-> (EventType -> Maybe Text -> EventType)
-> Lens EventType EventType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe Text
arn :: Maybe Text
$sel:arn:EventType' :: EventType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: EventType
s@EventType' {} Maybe Text
a -> EventType
s {$sel:arn:EventType' :: Maybe Text
arn = Maybe Text
a} :: EventType)

-- | Timestamp of when the event type was created.
eventType_createdTime :: Lens.Lens' EventType (Prelude.Maybe Prelude.Text)
eventType_createdTime :: (Maybe Text -> f (Maybe Text)) -> EventType -> f EventType
eventType_createdTime = (EventType -> Maybe Text)
-> (EventType -> Maybe Text -> EventType)
-> Lens EventType EventType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:EventType' :: EventType -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: EventType
s@EventType' {} Maybe Text
a -> EventType
s {$sel:createdTime:EventType' :: Maybe Text
createdTime = Maybe Text
a} :: EventType)

-- | The event type entity types.
eventType_entityTypes :: Lens.Lens' EventType (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
eventType_entityTypes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventType -> f EventType
eventType_entityTypes = (EventType -> Maybe (NonEmpty Text))
-> (EventType -> Maybe (NonEmpty Text) -> EventType)
-> Lens
     EventType EventType (Maybe (NonEmpty Text)) (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe (NonEmpty Text)
entityTypes :: Maybe (NonEmpty Text)
$sel:entityTypes:EventType' :: EventType -> Maybe (NonEmpty Text)
entityTypes} -> Maybe (NonEmpty Text)
entityTypes) (\s :: EventType
s@EventType' {} Maybe (NonEmpty Text)
a -> EventType
s {$sel:entityTypes:EventType' :: Maybe (NonEmpty Text)
entityTypes = Maybe (NonEmpty Text)
a} :: EventType) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> EventType -> f EventType)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventType
-> f EventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The event type event variables.
eventType_eventVariables :: Lens.Lens' EventType (Prelude.Maybe [Prelude.Text])
eventType_eventVariables :: (Maybe [Text] -> f (Maybe [Text])) -> EventType -> f EventType
eventType_eventVariables = (EventType -> Maybe [Text])
-> (EventType -> Maybe [Text] -> EventType)
-> Lens EventType EventType (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe [Text]
eventVariables :: Maybe [Text]
$sel:eventVariables:EventType' :: EventType -> Maybe [Text]
eventVariables} -> Maybe [Text]
eventVariables) (\s :: EventType
s@EventType' {} Maybe [Text]
a -> EventType
s {$sel:eventVariables:EventType' :: Maybe [Text]
eventVariables = Maybe [Text]
a} :: EventType) ((Maybe [Text] -> f (Maybe [Text])) -> EventType -> f EventType)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> EventType
-> f EventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Data about the stored events.
eventType_ingestedEventStatistics :: Lens.Lens' EventType (Prelude.Maybe IngestedEventStatistics)
eventType_ingestedEventStatistics :: (Maybe IngestedEventStatistics
 -> f (Maybe IngestedEventStatistics))
-> EventType -> f EventType
eventType_ingestedEventStatistics = (EventType -> Maybe IngestedEventStatistics)
-> (EventType -> Maybe IngestedEventStatistics -> EventType)
-> Lens
     EventType
     EventType
     (Maybe IngestedEventStatistics)
     (Maybe IngestedEventStatistics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe IngestedEventStatistics
ingestedEventStatistics :: Maybe IngestedEventStatistics
$sel:ingestedEventStatistics:EventType' :: EventType -> Maybe IngestedEventStatistics
ingestedEventStatistics} -> Maybe IngestedEventStatistics
ingestedEventStatistics) (\s :: EventType
s@EventType' {} Maybe IngestedEventStatistics
a -> EventType
s {$sel:ingestedEventStatistics:EventType' :: Maybe IngestedEventStatistics
ingestedEventStatistics = Maybe IngestedEventStatistics
a} :: EventType)

-- | The event type labels.
eventType_labels :: Lens.Lens' EventType (Prelude.Maybe [Prelude.Text])
eventType_labels :: (Maybe [Text] -> f (Maybe [Text])) -> EventType -> f EventType
eventType_labels = (EventType -> Maybe [Text])
-> (EventType -> Maybe [Text] -> EventType)
-> Lens EventType EventType (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:EventType' :: EventType -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: EventType
s@EventType' {} Maybe [Text]
a -> EventType
s {$sel:labels:EventType' :: Maybe [Text]
labels = Maybe [Text]
a} :: EventType) ((Maybe [Text] -> f (Maybe [Text])) -> EventType -> f EventType)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> EventType
-> f EventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If @Enabled@, Amazon Fraud Detector stores event data when you generate
-- a prediction and uses that data to update calculated variables in near
-- real-time. Amazon Fraud Detector uses this data, known as
-- @INGESTED_EVENTS@, to train your model and improve fraud predictions.
eventType_eventIngestion :: Lens.Lens' EventType (Prelude.Maybe EventIngestion)
eventType_eventIngestion :: (Maybe EventIngestion -> f (Maybe EventIngestion))
-> EventType -> f EventType
eventType_eventIngestion = (EventType -> Maybe EventIngestion)
-> (EventType -> Maybe EventIngestion -> EventType)
-> Lens
     EventType EventType (Maybe EventIngestion) (Maybe EventIngestion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventType' {Maybe EventIngestion
eventIngestion :: Maybe EventIngestion
$sel:eventIngestion:EventType' :: EventType -> Maybe EventIngestion
eventIngestion} -> Maybe EventIngestion
eventIngestion) (\s :: EventType
s@EventType' {} Maybe EventIngestion
a -> EventType
s {$sel:eventIngestion:EventType' :: Maybe EventIngestion
eventIngestion = Maybe EventIngestion
a} :: EventType)

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

instance Core.FromJSON EventType where
  parseJSON :: Value -> Parser EventType
parseJSON =
    String -> (Object -> Parser EventType) -> Value -> Parser EventType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EventType"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe [Text]
-> Maybe Text
-> Maybe IngestedEventStatistics
-> Maybe [Text]
-> Maybe EventIngestion
-> Maybe Text
-> EventType
EventType'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe IngestedEventStatistics
 -> Maybe [Text]
 -> Maybe EventIngestion
 -> Maybe Text
 -> EventType)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe IngestedEventStatistics
      -> Maybe [Text]
      -> Maybe EventIngestion
      -> Maybe Text
      -> EventType)
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
"lastUpdatedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe IngestedEventStatistics
   -> Maybe [Text]
   -> Maybe EventIngestion
   -> Maybe Text
   -> EventType)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe IngestedEventStatistics
      -> Maybe [Text]
      -> Maybe EventIngestion
      -> Maybe Text
      -> EventType)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe IngestedEventStatistics
   -> Maybe [Text]
   -> Maybe EventIngestion
   -> Maybe Text
   -> EventType)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe IngestedEventStatistics
      -> Maybe [Text]
      -> Maybe EventIngestion
      -> Maybe Text
      -> EventType)
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
"createdTime")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe IngestedEventStatistics
   -> Maybe [Text]
   -> Maybe EventIngestion
   -> Maybe Text
   -> EventType)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe IngestedEventStatistics
      -> Maybe [Text]
      -> Maybe EventIngestion
      -> Maybe Text
      -> EventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entityTypes")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe IngestedEventStatistics
   -> Maybe [Text]
   -> Maybe EventIngestion
   -> Maybe Text
   -> EventType)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe IngestedEventStatistics
      -> Maybe [Text]
      -> Maybe EventIngestion
      -> Maybe Text
      -> EventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eventVariables" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe IngestedEventStatistics
   -> Maybe [Text]
   -> Maybe EventIngestion
   -> Maybe Text
   -> EventType)
-> Parser (Maybe Text)
-> Parser
     (Maybe IngestedEventStatistics
      -> Maybe [Text] -> Maybe EventIngestion -> Maybe Text -> EventType)
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
"name")
            Parser
  (Maybe IngestedEventStatistics
   -> Maybe [Text] -> Maybe EventIngestion -> Maybe Text -> EventType)
-> Parser (Maybe IngestedEventStatistics)
-> Parser
     (Maybe [Text] -> Maybe EventIngestion -> Maybe Text -> EventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IngestedEventStatistics)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ingestedEventStatistics")
            Parser
  (Maybe [Text] -> Maybe EventIngestion -> Maybe Text -> EventType)
-> Parser (Maybe [Text])
-> Parser (Maybe EventIngestion -> Maybe Text -> EventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"labels" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe EventIngestion -> Maybe Text -> EventType)
-> Parser (Maybe EventIngestion)
-> Parser (Maybe Text -> EventType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventIngestion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eventIngestion")
            Parser (Maybe Text -> EventType)
-> Parser (Maybe Text) -> Parser EventType
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
"description")
      )

instance Prelude.Hashable EventType

instance Prelude.NFData EventType