{-# 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.SecurityHub.Types.ThreatIntelIndicator
-- 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.SecurityHub.Types.ThreatIntelIndicator where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.ThreatIntelIndicatorCategory
import Amazonka.SecurityHub.Types.ThreatIntelIndicatorType

-- | Details about the threat intelligence related to a finding.
--
-- /See:/ 'newThreatIntelIndicator' smart constructor.
data ThreatIntelIndicator = ThreatIntelIndicator'
  { -- | The category of a threat intelligence indicator.
    ThreatIntelIndicator -> Maybe ThreatIntelIndicatorCategory
category :: Prelude.Maybe ThreatIntelIndicatorCategory,
    -- | The value of a threat intelligence indicator.
    ThreatIntelIndicator -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
    -- | The source of the threat intelligence indicator.
    ThreatIntelIndicator -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | The type of threat intelligence indicator.
    ThreatIntelIndicator -> Maybe ThreatIntelIndicatorType
type' :: Prelude.Maybe ThreatIntelIndicatorType,
    -- | The URL to the page or site where you can get more information about the
    -- threat intelligence indicator.
    ThreatIntelIndicator -> Maybe Text
sourceUrl :: Prelude.Maybe Prelude.Text,
    -- | Indicates when the most recent instance of a threat intelligence
    -- indicator was observed.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    ThreatIntelIndicator -> Maybe Text
lastObservedAt :: Prelude.Maybe Prelude.Text
  }
  deriving (ThreatIntelIndicator -> ThreatIntelIndicator -> Bool
(ThreatIntelIndicator -> ThreatIntelIndicator -> Bool)
-> (ThreatIntelIndicator -> ThreatIntelIndicator -> Bool)
-> Eq ThreatIntelIndicator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThreatIntelIndicator -> ThreatIntelIndicator -> Bool
$c/= :: ThreatIntelIndicator -> ThreatIntelIndicator -> Bool
== :: ThreatIntelIndicator -> ThreatIntelIndicator -> Bool
$c== :: ThreatIntelIndicator -> ThreatIntelIndicator -> Bool
Prelude.Eq, ReadPrec [ThreatIntelIndicator]
ReadPrec ThreatIntelIndicator
Int -> ReadS ThreatIntelIndicator
ReadS [ThreatIntelIndicator]
(Int -> ReadS ThreatIntelIndicator)
-> ReadS [ThreatIntelIndicator]
-> ReadPrec ThreatIntelIndicator
-> ReadPrec [ThreatIntelIndicator]
-> Read ThreatIntelIndicator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ThreatIntelIndicator]
$creadListPrec :: ReadPrec [ThreatIntelIndicator]
readPrec :: ReadPrec ThreatIntelIndicator
$creadPrec :: ReadPrec ThreatIntelIndicator
readList :: ReadS [ThreatIntelIndicator]
$creadList :: ReadS [ThreatIntelIndicator]
readsPrec :: Int -> ReadS ThreatIntelIndicator
$creadsPrec :: Int -> ReadS ThreatIntelIndicator
Prelude.Read, Int -> ThreatIntelIndicator -> ShowS
[ThreatIntelIndicator] -> ShowS
ThreatIntelIndicator -> String
(Int -> ThreatIntelIndicator -> ShowS)
-> (ThreatIntelIndicator -> String)
-> ([ThreatIntelIndicator] -> ShowS)
-> Show ThreatIntelIndicator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ThreatIntelIndicator] -> ShowS
$cshowList :: [ThreatIntelIndicator] -> ShowS
show :: ThreatIntelIndicator -> String
$cshow :: ThreatIntelIndicator -> String
showsPrec :: Int -> ThreatIntelIndicator -> ShowS
$cshowsPrec :: Int -> ThreatIntelIndicator -> ShowS
Prelude.Show, (forall x. ThreatIntelIndicator -> Rep ThreatIntelIndicator x)
-> (forall x. Rep ThreatIntelIndicator x -> ThreatIntelIndicator)
-> Generic ThreatIntelIndicator
forall x. Rep ThreatIntelIndicator x -> ThreatIntelIndicator
forall x. ThreatIntelIndicator -> Rep ThreatIntelIndicator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ThreatIntelIndicator x -> ThreatIntelIndicator
$cfrom :: forall x. ThreatIntelIndicator -> Rep ThreatIntelIndicator x
Prelude.Generic)

-- |
-- Create a value of 'ThreatIntelIndicator' 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:
--
-- 'category', 'threatIntelIndicator_category' - The category of a threat intelligence indicator.
--
-- 'value', 'threatIntelIndicator_value' - The value of a threat intelligence indicator.
--
-- 'source', 'threatIntelIndicator_source' - The source of the threat intelligence indicator.
--
-- 'type'', 'threatIntelIndicator_type' - The type of threat intelligence indicator.
--
-- 'sourceUrl', 'threatIntelIndicator_sourceUrl' - The URL to the page or site where you can get more information about the
-- threat intelligence indicator.
--
-- 'lastObservedAt', 'threatIntelIndicator_lastObservedAt' - Indicates when the most recent instance of a threat intelligence
-- indicator was observed.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
newThreatIntelIndicator ::
  ThreatIntelIndicator
newThreatIntelIndicator :: ThreatIntelIndicator
newThreatIntelIndicator =
  ThreatIntelIndicator' :: Maybe ThreatIntelIndicatorCategory
-> Maybe Text
-> Maybe Text
-> Maybe ThreatIntelIndicatorType
-> Maybe Text
-> Maybe Text
-> ThreatIntelIndicator
ThreatIntelIndicator'
    { $sel:category:ThreatIntelIndicator' :: Maybe ThreatIntelIndicatorCategory
category = Maybe ThreatIntelIndicatorCategory
forall a. Maybe a
Prelude.Nothing,
      $sel:value:ThreatIntelIndicator' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:ThreatIntelIndicator' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ThreatIntelIndicator' :: Maybe ThreatIntelIndicatorType
type' = Maybe ThreatIntelIndicatorType
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceUrl:ThreatIntelIndicator' :: Maybe Text
sourceUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastObservedAt:ThreatIntelIndicator' :: Maybe Text
lastObservedAt = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The category of a threat intelligence indicator.
threatIntelIndicator_category :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe ThreatIntelIndicatorCategory)
threatIntelIndicator_category :: (Maybe ThreatIntelIndicatorCategory
 -> f (Maybe ThreatIntelIndicatorCategory))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_category = (ThreatIntelIndicator -> Maybe ThreatIntelIndicatorCategory)
-> (ThreatIntelIndicator
    -> Maybe ThreatIntelIndicatorCategory -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator
     ThreatIntelIndicator
     (Maybe ThreatIntelIndicatorCategory)
     (Maybe ThreatIntelIndicatorCategory)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe ThreatIntelIndicatorCategory
category :: Maybe ThreatIntelIndicatorCategory
$sel:category:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe ThreatIntelIndicatorCategory
category} -> Maybe ThreatIntelIndicatorCategory
category) (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe ThreatIntelIndicatorCategory
a -> ThreatIntelIndicator
s {$sel:category:ThreatIntelIndicator' :: Maybe ThreatIntelIndicatorCategory
category = Maybe ThreatIntelIndicatorCategory
a} :: ThreatIntelIndicator)

-- | The value of a threat intelligence indicator.
threatIntelIndicator_value :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe Prelude.Text)
threatIntelIndicator_value :: (Maybe Text -> f (Maybe Text))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_value = (ThreatIntelIndicator -> Maybe Text)
-> (ThreatIntelIndicator -> Maybe Text -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator ThreatIntelIndicator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe Text
value :: Maybe Text
$sel:value:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
value} -> Maybe Text
value) (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe Text
a -> ThreatIntelIndicator
s {$sel:value:ThreatIntelIndicator' :: Maybe Text
value = Maybe Text
a} :: ThreatIntelIndicator)

-- | The source of the threat intelligence indicator.
threatIntelIndicator_source :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe Prelude.Text)
threatIntelIndicator_source :: (Maybe Text -> f (Maybe Text))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_source = (ThreatIntelIndicator -> Maybe Text)
-> (ThreatIntelIndicator -> Maybe Text -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator ThreatIntelIndicator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe Text
source :: Maybe Text
$sel:source:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
source} -> Maybe Text
source) (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe Text
a -> ThreatIntelIndicator
s {$sel:source:ThreatIntelIndicator' :: Maybe Text
source = Maybe Text
a} :: ThreatIntelIndicator)

-- | The type of threat intelligence indicator.
threatIntelIndicator_type :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe ThreatIntelIndicatorType)
threatIntelIndicator_type :: (Maybe ThreatIntelIndicatorType
 -> f (Maybe ThreatIntelIndicatorType))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_type = (ThreatIntelIndicator -> Maybe ThreatIntelIndicatorType)
-> (ThreatIntelIndicator
    -> Maybe ThreatIntelIndicatorType -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator
     ThreatIntelIndicator
     (Maybe ThreatIntelIndicatorType)
     (Maybe ThreatIntelIndicatorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe ThreatIntelIndicatorType
type' :: Maybe ThreatIntelIndicatorType
$sel:type':ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe ThreatIntelIndicatorType
type'} -> Maybe ThreatIntelIndicatorType
type') (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe ThreatIntelIndicatorType
a -> ThreatIntelIndicator
s {$sel:type':ThreatIntelIndicator' :: Maybe ThreatIntelIndicatorType
type' = Maybe ThreatIntelIndicatorType
a} :: ThreatIntelIndicator)

-- | The URL to the page or site where you can get more information about the
-- threat intelligence indicator.
threatIntelIndicator_sourceUrl :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe Prelude.Text)
threatIntelIndicator_sourceUrl :: (Maybe Text -> f (Maybe Text))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_sourceUrl = (ThreatIntelIndicator -> Maybe Text)
-> (ThreatIntelIndicator -> Maybe Text -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator ThreatIntelIndicator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe Text
sourceUrl :: Maybe Text
$sel:sourceUrl:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
sourceUrl} -> Maybe Text
sourceUrl) (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe Text
a -> ThreatIntelIndicator
s {$sel:sourceUrl:ThreatIntelIndicator' :: Maybe Text
sourceUrl = Maybe Text
a} :: ThreatIntelIndicator)

-- | Indicates when the most recent instance of a threat intelligence
-- indicator was observed.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
threatIntelIndicator_lastObservedAt :: Lens.Lens' ThreatIntelIndicator (Prelude.Maybe Prelude.Text)
threatIntelIndicator_lastObservedAt :: (Maybe Text -> f (Maybe Text))
-> ThreatIntelIndicator -> f ThreatIntelIndicator
threatIntelIndicator_lastObservedAt = (ThreatIntelIndicator -> Maybe Text)
-> (ThreatIntelIndicator -> Maybe Text -> ThreatIntelIndicator)
-> Lens
     ThreatIntelIndicator ThreatIntelIndicator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThreatIntelIndicator' {Maybe Text
lastObservedAt :: Maybe Text
$sel:lastObservedAt:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
lastObservedAt} -> Maybe Text
lastObservedAt) (\s :: ThreatIntelIndicator
s@ThreatIntelIndicator' {} Maybe Text
a -> ThreatIntelIndicator
s {$sel:lastObservedAt:ThreatIntelIndicator' :: Maybe Text
lastObservedAt = Maybe Text
a} :: ThreatIntelIndicator)

instance Core.FromJSON ThreatIntelIndicator where
  parseJSON :: Value -> Parser ThreatIntelIndicator
parseJSON =
    String
-> (Object -> Parser ThreatIntelIndicator)
-> Value
-> Parser ThreatIntelIndicator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ThreatIntelIndicator"
      ( \Object
x ->
          Maybe ThreatIntelIndicatorCategory
-> Maybe Text
-> Maybe Text
-> Maybe ThreatIntelIndicatorType
-> Maybe Text
-> Maybe Text
-> ThreatIntelIndicator
ThreatIntelIndicator'
            (Maybe ThreatIntelIndicatorCategory
 -> Maybe Text
 -> Maybe Text
 -> Maybe ThreatIntelIndicatorType
 -> Maybe Text
 -> Maybe Text
 -> ThreatIntelIndicator)
-> Parser (Maybe ThreatIntelIndicatorCategory)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ThreatIntelIndicatorType
      -> Maybe Text
      -> Maybe Text
      -> ThreatIntelIndicator)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ThreatIntelIndicatorCategory)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Category")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ThreatIntelIndicatorType
   -> Maybe Text
   -> Maybe Text
   -> ThreatIntelIndicator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ThreatIntelIndicatorType
      -> Maybe Text
      -> Maybe Text
      -> ThreatIntelIndicator)
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
"Value")
            Parser
  (Maybe Text
   -> Maybe ThreatIntelIndicatorType
   -> Maybe Text
   -> Maybe Text
   -> ThreatIntelIndicator)
-> Parser (Maybe Text)
-> Parser
     (Maybe ThreatIntelIndicatorType
      -> Maybe Text -> Maybe Text -> ThreatIntelIndicator)
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
"Source")
            Parser
  (Maybe ThreatIntelIndicatorType
   -> Maybe Text -> Maybe Text -> ThreatIntelIndicator)
-> Parser (Maybe ThreatIntelIndicatorType)
-> Parser (Maybe Text -> Maybe Text -> ThreatIntelIndicator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ThreatIntelIndicatorType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser (Maybe Text -> Maybe Text -> ThreatIntelIndicator)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ThreatIntelIndicator)
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
"SourceUrl")
            Parser (Maybe Text -> ThreatIntelIndicator)
-> Parser (Maybe Text) -> Parser ThreatIntelIndicator
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
"LastObservedAt")
      )

instance Prelude.Hashable ThreatIntelIndicator

instance Prelude.NFData ThreatIntelIndicator

instance Core.ToJSON ThreatIntelIndicator where
  toJSON :: ThreatIntelIndicator -> Value
toJSON ThreatIntelIndicator' {Maybe Text
Maybe ThreatIntelIndicatorCategory
Maybe ThreatIntelIndicatorType
lastObservedAt :: Maybe Text
sourceUrl :: Maybe Text
type' :: Maybe ThreatIntelIndicatorType
source :: Maybe Text
value :: Maybe Text
category :: Maybe ThreatIntelIndicatorCategory
$sel:lastObservedAt:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
$sel:sourceUrl:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
$sel:type':ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe ThreatIntelIndicatorType
$sel:source:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
$sel:value:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe Text
$sel:category:ThreatIntelIndicator' :: ThreatIntelIndicator -> Maybe ThreatIntelIndicatorCategory
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Category" Text -> ThreatIntelIndicatorCategory -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ThreatIntelIndicatorCategory -> Pair)
-> Maybe ThreatIntelIndicatorCategory -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThreatIntelIndicatorCategory
category,
            (Text
"Value" 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
value,
            (Text
"Source" 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
source,
            (Text
"Type" Text -> ThreatIntelIndicatorType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ThreatIntelIndicatorType -> Pair)
-> Maybe ThreatIntelIndicatorType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThreatIntelIndicatorType
type',
            (Text
"SourceUrl" 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
sourceUrl,
            (Text
"LastObservedAt" 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
lastObservedAt
          ]
      )