{-# 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.GuardDuty.Types.ServiceInfo
-- 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.GuardDuty.Types.ServiceInfo where

import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types.Action
import Amazonka.GuardDuty.Types.Evidence
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains additional information about the generated finding.
--
-- /See:/ 'newServiceInfo' smart constructor.
data ServiceInfo = ServiceInfo'
  { -- | The total count of the occurrences of this finding type.
    ServiceInfo -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | The first-seen timestamp of the activity that prompted GuardDuty to
    -- generate this finding.
    ServiceInfo -> Maybe Text
eventFirstSeen :: Prelude.Maybe Prelude.Text,
    -- | Information about the activity that is described in a finding.
    ServiceInfo -> Maybe Action
action :: Prelude.Maybe Action,
    -- | The detector ID for the GuardDuty service.
    ServiceInfo -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
    -- | The name of the AWS service (GuardDuty) that generated a finding.
    ServiceInfo -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
    -- | Feedback that was submitted about the finding.
    ServiceInfo -> Maybe Text
userFeedback :: Prelude.Maybe Prelude.Text,
    -- | An evidence object associated with the service.
    ServiceInfo -> Maybe Evidence
evidence :: Prelude.Maybe Evidence,
    -- | The last-seen timestamp of the activity that prompted GuardDuty to
    -- generate this finding.
    ServiceInfo -> Maybe Text
eventLastSeen :: Prelude.Maybe Prelude.Text,
    -- | The resource role information for this finding.
    ServiceInfo -> Maybe Text
resourceRole :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether this finding is archived.
    ServiceInfo -> Maybe Bool
archived :: Prelude.Maybe Prelude.Bool
  }
  deriving (ServiceInfo -> ServiceInfo -> Bool
(ServiceInfo -> ServiceInfo -> Bool)
-> (ServiceInfo -> ServiceInfo -> Bool) -> Eq ServiceInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceInfo -> ServiceInfo -> Bool
$c/= :: ServiceInfo -> ServiceInfo -> Bool
== :: ServiceInfo -> ServiceInfo -> Bool
$c== :: ServiceInfo -> ServiceInfo -> Bool
Prelude.Eq, ReadPrec [ServiceInfo]
ReadPrec ServiceInfo
Int -> ReadS ServiceInfo
ReadS [ServiceInfo]
(Int -> ReadS ServiceInfo)
-> ReadS [ServiceInfo]
-> ReadPrec ServiceInfo
-> ReadPrec [ServiceInfo]
-> Read ServiceInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceInfo]
$creadListPrec :: ReadPrec [ServiceInfo]
readPrec :: ReadPrec ServiceInfo
$creadPrec :: ReadPrec ServiceInfo
readList :: ReadS [ServiceInfo]
$creadList :: ReadS [ServiceInfo]
readsPrec :: Int -> ReadS ServiceInfo
$creadsPrec :: Int -> ReadS ServiceInfo
Prelude.Read, Int -> ServiceInfo -> ShowS
[ServiceInfo] -> ShowS
ServiceInfo -> String
(Int -> ServiceInfo -> ShowS)
-> (ServiceInfo -> String)
-> ([ServiceInfo] -> ShowS)
-> Show ServiceInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceInfo] -> ShowS
$cshowList :: [ServiceInfo] -> ShowS
show :: ServiceInfo -> String
$cshow :: ServiceInfo -> String
showsPrec :: Int -> ServiceInfo -> ShowS
$cshowsPrec :: Int -> ServiceInfo -> ShowS
Prelude.Show, (forall x. ServiceInfo -> Rep ServiceInfo x)
-> (forall x. Rep ServiceInfo x -> ServiceInfo)
-> Generic ServiceInfo
forall x. Rep ServiceInfo x -> ServiceInfo
forall x. ServiceInfo -> Rep ServiceInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceInfo x -> ServiceInfo
$cfrom :: forall x. ServiceInfo -> Rep ServiceInfo x
Prelude.Generic)

-- |
-- Create a value of 'ServiceInfo' 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:
--
-- 'count', 'serviceInfo_count' - The total count of the occurrences of this finding type.
--
-- 'eventFirstSeen', 'serviceInfo_eventFirstSeen' - The first-seen timestamp of the activity that prompted GuardDuty to
-- generate this finding.
--
-- 'action', 'serviceInfo_action' - Information about the activity that is described in a finding.
--
-- 'detectorId', 'serviceInfo_detectorId' - The detector ID for the GuardDuty service.
--
-- 'serviceName', 'serviceInfo_serviceName' - The name of the AWS service (GuardDuty) that generated a finding.
--
-- 'userFeedback', 'serviceInfo_userFeedback' - Feedback that was submitted about the finding.
--
-- 'evidence', 'serviceInfo_evidence' - An evidence object associated with the service.
--
-- 'eventLastSeen', 'serviceInfo_eventLastSeen' - The last-seen timestamp of the activity that prompted GuardDuty to
-- generate this finding.
--
-- 'resourceRole', 'serviceInfo_resourceRole' - The resource role information for this finding.
--
-- 'archived', 'serviceInfo_archived' - Indicates whether this finding is archived.
newServiceInfo ::
  ServiceInfo
newServiceInfo :: ServiceInfo
newServiceInfo =
  ServiceInfo' :: Maybe Int
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Evidence
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ServiceInfo
ServiceInfo'
    { $sel:count:ServiceInfo' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:eventFirstSeen:ServiceInfo' :: Maybe Text
eventFirstSeen = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:action:ServiceInfo' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:ServiceInfo' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceName:ServiceInfo' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userFeedback:ServiceInfo' :: Maybe Text
userFeedback = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evidence:ServiceInfo' :: Maybe Evidence
evidence = Maybe Evidence
forall a. Maybe a
Prelude.Nothing,
      $sel:eventLastSeen:ServiceInfo' :: Maybe Text
eventLastSeen = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceRole:ServiceInfo' :: Maybe Text
resourceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:archived:ServiceInfo' :: Maybe Bool
archived = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The total count of the occurrences of this finding type.
serviceInfo_count :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Int)
serviceInfo_count :: (Maybe Int -> f (Maybe Int)) -> ServiceInfo -> f ServiceInfo
serviceInfo_count = (ServiceInfo -> Maybe Int)
-> (ServiceInfo -> Maybe Int -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Int
count :: Maybe Int
$sel:count:ServiceInfo' :: ServiceInfo -> Maybe Int
count} -> Maybe Int
count) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Int
a -> ServiceInfo
s {$sel:count:ServiceInfo' :: Maybe Int
count = Maybe Int
a} :: ServiceInfo)

-- | The first-seen timestamp of the activity that prompted GuardDuty to
-- generate this finding.
serviceInfo_eventFirstSeen :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_eventFirstSeen :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_eventFirstSeen = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
eventFirstSeen :: Maybe Text
$sel:eventFirstSeen:ServiceInfo' :: ServiceInfo -> Maybe Text
eventFirstSeen} -> Maybe Text
eventFirstSeen) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:eventFirstSeen:ServiceInfo' :: Maybe Text
eventFirstSeen = Maybe Text
a} :: ServiceInfo)

-- | Information about the activity that is described in a finding.
serviceInfo_action :: Lens.Lens' ServiceInfo (Prelude.Maybe Action)
serviceInfo_action :: (Maybe Action -> f (Maybe Action)) -> ServiceInfo -> f ServiceInfo
serviceInfo_action = (ServiceInfo -> Maybe Action)
-> (ServiceInfo -> Maybe Action -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Action
action :: Maybe Action
$sel:action:ServiceInfo' :: ServiceInfo -> Maybe Action
action} -> Maybe Action
action) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Action
a -> ServiceInfo
s {$sel:action:ServiceInfo' :: Maybe Action
action = Maybe Action
a} :: ServiceInfo)

-- | The detector ID for the GuardDuty service.
serviceInfo_detectorId :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_detectorId :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_detectorId = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
detectorId :: Maybe Text
$sel:detectorId:ServiceInfo' :: ServiceInfo -> Maybe Text
detectorId} -> Maybe Text
detectorId) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:detectorId:ServiceInfo' :: Maybe Text
detectorId = Maybe Text
a} :: ServiceInfo)

-- | The name of the AWS service (GuardDuty) that generated a finding.
serviceInfo_serviceName :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_serviceName :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_serviceName = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:ServiceInfo' :: ServiceInfo -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:serviceName:ServiceInfo' :: Maybe Text
serviceName = Maybe Text
a} :: ServiceInfo)

-- | Feedback that was submitted about the finding.
serviceInfo_userFeedback :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_userFeedback :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_userFeedback = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
userFeedback :: Maybe Text
$sel:userFeedback:ServiceInfo' :: ServiceInfo -> Maybe Text
userFeedback} -> Maybe Text
userFeedback) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:userFeedback:ServiceInfo' :: Maybe Text
userFeedback = Maybe Text
a} :: ServiceInfo)

-- | An evidence object associated with the service.
serviceInfo_evidence :: Lens.Lens' ServiceInfo (Prelude.Maybe Evidence)
serviceInfo_evidence :: (Maybe Evidence -> f (Maybe Evidence))
-> ServiceInfo -> f ServiceInfo
serviceInfo_evidence = (ServiceInfo -> Maybe Evidence)
-> (ServiceInfo -> Maybe Evidence -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Evidence) (Maybe Evidence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Evidence
evidence :: Maybe Evidence
$sel:evidence:ServiceInfo' :: ServiceInfo -> Maybe Evidence
evidence} -> Maybe Evidence
evidence) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Evidence
a -> ServiceInfo
s {$sel:evidence:ServiceInfo' :: Maybe Evidence
evidence = Maybe Evidence
a} :: ServiceInfo)

-- | The last-seen timestamp of the activity that prompted GuardDuty to
-- generate this finding.
serviceInfo_eventLastSeen :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_eventLastSeen :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_eventLastSeen = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
eventLastSeen :: Maybe Text
$sel:eventLastSeen:ServiceInfo' :: ServiceInfo -> Maybe Text
eventLastSeen} -> Maybe Text
eventLastSeen) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:eventLastSeen:ServiceInfo' :: Maybe Text
eventLastSeen = Maybe Text
a} :: ServiceInfo)

-- | The resource role information for this finding.
serviceInfo_resourceRole :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_resourceRole :: (Maybe Text -> f (Maybe Text)) -> ServiceInfo -> f ServiceInfo
serviceInfo_resourceRole = (ServiceInfo -> Maybe Text)
-> (ServiceInfo -> Maybe Text -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
resourceRole :: Maybe Text
$sel:resourceRole:ServiceInfo' :: ServiceInfo -> Maybe Text
resourceRole} -> Maybe Text
resourceRole) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:resourceRole:ServiceInfo' :: Maybe Text
resourceRole = Maybe Text
a} :: ServiceInfo)

-- | Indicates whether this finding is archived.
serviceInfo_archived :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Bool)
serviceInfo_archived :: (Maybe Bool -> f (Maybe Bool)) -> ServiceInfo -> f ServiceInfo
serviceInfo_archived = (ServiceInfo -> Maybe Bool)
-> (ServiceInfo -> Maybe Bool -> ServiceInfo)
-> Lens ServiceInfo ServiceInfo (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Bool
archived :: Maybe Bool
$sel:archived:ServiceInfo' :: ServiceInfo -> Maybe Bool
archived} -> Maybe Bool
archived) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Bool
a -> ServiceInfo
s {$sel:archived:ServiceInfo' :: Maybe Bool
archived = Maybe Bool
a} :: ServiceInfo)

instance Core.FromJSON ServiceInfo where
  parseJSON :: Value -> Parser ServiceInfo
parseJSON =
    String
-> (Object -> Parser ServiceInfo) -> Value -> Parser ServiceInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ServiceInfo"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Evidence
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ServiceInfo
ServiceInfo'
            (Maybe Int
 -> Maybe Text
 -> Maybe Action
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Evidence
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> ServiceInfo)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Action
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Evidence
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> ServiceInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"count")
            Parser
  (Maybe Text
   -> Maybe Action
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Evidence
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> ServiceInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Action
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Evidence
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> ServiceInfo)
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
"eventFirstSeen")
            Parser
  (Maybe Action
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Evidence
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> ServiceInfo)
-> Parser (Maybe Action)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Evidence
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> ServiceInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Action)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"action")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Evidence
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> ServiceInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Evidence
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> ServiceInfo)
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
"detectorId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Evidence
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> ServiceInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Evidence
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> ServiceInfo)
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
"serviceName")
            Parser
  (Maybe Text
   -> Maybe Evidence
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> ServiceInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Evidence
      -> Maybe Text -> Maybe Text -> Maybe Bool -> ServiceInfo)
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
"userFeedback")
            Parser
  (Maybe Evidence
   -> Maybe Text -> Maybe Text -> Maybe Bool -> ServiceInfo)
-> Parser (Maybe Evidence)
-> Parser (Maybe Text -> Maybe Text -> Maybe Bool -> ServiceInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Evidence)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"evidence")
            Parser (Maybe Text -> Maybe Text -> Maybe Bool -> ServiceInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> ServiceInfo)
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
"eventLastSeen")
            Parser (Maybe Text -> Maybe Bool -> ServiceInfo)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> ServiceInfo)
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
"resourceRole")
            Parser (Maybe Bool -> ServiceInfo)
-> Parser (Maybe Bool) -> Parser ServiceInfo
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
"archived")
      )

instance Prelude.Hashable ServiceInfo

instance Prelude.NFData ServiceInfo