{-# 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.Discovery.Types.AgentInfo
-- 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.Discovery.Types.AgentInfo where

import qualified Amazonka.Core as Core
import Amazonka.Discovery.Types.AgentNetworkInfo
import Amazonka.Discovery.Types.AgentStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about agents or connectors associated with the user’s AWS
-- account. Information includes agent or connector IDs, IP addresses,
-- media access control (MAC) addresses, agent or connector health,
-- hostname where the agent or connector resides, and agent version for
-- each agent.
--
-- /See:/ 'newAgentInfo' smart constructor.
data AgentInfo = AgentInfo'
  { -- | The name of the host where the agent or connector resides. The host can
    -- be a server or virtual machine.
    AgentInfo -> Maybe Text
hostName :: Prelude.Maybe Prelude.Text,
    -- | Time since agent or connector health was reported.
    AgentInfo -> Maybe Text
lastHealthPingTime :: Prelude.Maybe Prelude.Text,
    -- | Network details about the host where the agent or connector resides.
    AgentInfo -> Maybe [AgentNetworkInfo]
agentNetworkInfoList :: Prelude.Maybe [AgentNetworkInfo],
    -- | The ID of the connector.
    AgentInfo -> Maybe Text
connectorId :: Prelude.Maybe Prelude.Text,
    -- | The health of the agent or connector.
    AgentInfo -> Maybe AgentStatus
health :: Prelude.Maybe AgentStatus,
    -- | The agent or connector ID.
    AgentInfo -> Maybe Text
agentId :: Prelude.Maybe Prelude.Text,
    -- | The agent or connector version.
    AgentInfo -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | Status of the collection process for an agent or connector.
    AgentInfo -> Maybe Text
collectionStatus :: Prelude.Maybe Prelude.Text,
    -- | Agent\'s first registration timestamp in UTC.
    AgentInfo -> Maybe Text
registeredTime :: Prelude.Maybe Prelude.Text,
    -- | Type of agent.
    AgentInfo -> Maybe Text
agentType :: Prelude.Maybe Prelude.Text
  }
  deriving (AgentInfo -> AgentInfo -> Bool
(AgentInfo -> AgentInfo -> Bool)
-> (AgentInfo -> AgentInfo -> Bool) -> Eq AgentInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AgentInfo -> AgentInfo -> Bool
$c/= :: AgentInfo -> AgentInfo -> Bool
== :: AgentInfo -> AgentInfo -> Bool
$c== :: AgentInfo -> AgentInfo -> Bool
Prelude.Eq, ReadPrec [AgentInfo]
ReadPrec AgentInfo
Int -> ReadS AgentInfo
ReadS [AgentInfo]
(Int -> ReadS AgentInfo)
-> ReadS [AgentInfo]
-> ReadPrec AgentInfo
-> ReadPrec [AgentInfo]
-> Read AgentInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AgentInfo]
$creadListPrec :: ReadPrec [AgentInfo]
readPrec :: ReadPrec AgentInfo
$creadPrec :: ReadPrec AgentInfo
readList :: ReadS [AgentInfo]
$creadList :: ReadS [AgentInfo]
readsPrec :: Int -> ReadS AgentInfo
$creadsPrec :: Int -> ReadS AgentInfo
Prelude.Read, Int -> AgentInfo -> ShowS
[AgentInfo] -> ShowS
AgentInfo -> String
(Int -> AgentInfo -> ShowS)
-> (AgentInfo -> String)
-> ([AgentInfo] -> ShowS)
-> Show AgentInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AgentInfo] -> ShowS
$cshowList :: [AgentInfo] -> ShowS
show :: AgentInfo -> String
$cshow :: AgentInfo -> String
showsPrec :: Int -> AgentInfo -> ShowS
$cshowsPrec :: Int -> AgentInfo -> ShowS
Prelude.Show, (forall x. AgentInfo -> Rep AgentInfo x)
-> (forall x. Rep AgentInfo x -> AgentInfo) -> Generic AgentInfo
forall x. Rep AgentInfo x -> AgentInfo
forall x. AgentInfo -> Rep AgentInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AgentInfo x -> AgentInfo
$cfrom :: forall x. AgentInfo -> Rep AgentInfo x
Prelude.Generic)

-- |
-- Create a value of 'AgentInfo' 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:
--
-- 'hostName', 'agentInfo_hostName' - The name of the host where the agent or connector resides. The host can
-- be a server or virtual machine.
--
-- 'lastHealthPingTime', 'agentInfo_lastHealthPingTime' - Time since agent or connector health was reported.
--
-- 'agentNetworkInfoList', 'agentInfo_agentNetworkInfoList' - Network details about the host where the agent or connector resides.
--
-- 'connectorId', 'agentInfo_connectorId' - The ID of the connector.
--
-- 'health', 'agentInfo_health' - The health of the agent or connector.
--
-- 'agentId', 'agentInfo_agentId' - The agent or connector ID.
--
-- 'version', 'agentInfo_version' - The agent or connector version.
--
-- 'collectionStatus', 'agentInfo_collectionStatus' - Status of the collection process for an agent or connector.
--
-- 'registeredTime', 'agentInfo_registeredTime' - Agent\'s first registration timestamp in UTC.
--
-- 'agentType', 'agentInfo_agentType' - Type of agent.
newAgentInfo ::
  AgentInfo
newAgentInfo :: AgentInfo
newAgentInfo =
  AgentInfo' :: Maybe Text
-> Maybe Text
-> Maybe [AgentNetworkInfo]
-> Maybe Text
-> Maybe AgentStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AgentInfo
AgentInfo'
    { $sel:hostName:AgentInfo' :: Maybe Text
hostName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastHealthPingTime:AgentInfo' :: Maybe Text
lastHealthPingTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:agentNetworkInfoList:AgentInfo' :: Maybe [AgentNetworkInfo]
agentNetworkInfoList = Maybe [AgentNetworkInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorId:AgentInfo' :: Maybe Text
connectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:health:AgentInfo' :: Maybe AgentStatus
health = Maybe AgentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:agentId:AgentInfo' :: Maybe Text
agentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:AgentInfo' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:collectionStatus:AgentInfo' :: Maybe Text
collectionStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:registeredTime:AgentInfo' :: Maybe Text
registeredTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:agentType:AgentInfo' :: Maybe Text
agentType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the host where the agent or connector resides. The host can
-- be a server or virtual machine.
agentInfo_hostName :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_hostName :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_hostName = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
hostName :: Maybe Text
$sel:hostName:AgentInfo' :: AgentInfo -> Maybe Text
hostName} -> Maybe Text
hostName) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:hostName:AgentInfo' :: Maybe Text
hostName = Maybe Text
a} :: AgentInfo)

-- | Time since agent or connector health was reported.
agentInfo_lastHealthPingTime :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_lastHealthPingTime :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_lastHealthPingTime = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
lastHealthPingTime :: Maybe Text
$sel:lastHealthPingTime:AgentInfo' :: AgentInfo -> Maybe Text
lastHealthPingTime} -> Maybe Text
lastHealthPingTime) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:lastHealthPingTime:AgentInfo' :: Maybe Text
lastHealthPingTime = Maybe Text
a} :: AgentInfo)

-- | Network details about the host where the agent or connector resides.
agentInfo_agentNetworkInfoList :: Lens.Lens' AgentInfo (Prelude.Maybe [AgentNetworkInfo])
agentInfo_agentNetworkInfoList :: (Maybe [AgentNetworkInfo] -> f (Maybe [AgentNetworkInfo]))
-> AgentInfo -> f AgentInfo
agentInfo_agentNetworkInfoList = (AgentInfo -> Maybe [AgentNetworkInfo])
-> (AgentInfo -> Maybe [AgentNetworkInfo] -> AgentInfo)
-> Lens
     AgentInfo
     AgentInfo
     (Maybe [AgentNetworkInfo])
     (Maybe [AgentNetworkInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe [AgentNetworkInfo]
agentNetworkInfoList :: Maybe [AgentNetworkInfo]
$sel:agentNetworkInfoList:AgentInfo' :: AgentInfo -> Maybe [AgentNetworkInfo]
agentNetworkInfoList} -> Maybe [AgentNetworkInfo]
agentNetworkInfoList) (\s :: AgentInfo
s@AgentInfo' {} Maybe [AgentNetworkInfo]
a -> AgentInfo
s {$sel:agentNetworkInfoList:AgentInfo' :: Maybe [AgentNetworkInfo]
agentNetworkInfoList = Maybe [AgentNetworkInfo]
a} :: AgentInfo) ((Maybe [AgentNetworkInfo] -> f (Maybe [AgentNetworkInfo]))
 -> AgentInfo -> f AgentInfo)
-> ((Maybe [AgentNetworkInfo] -> f (Maybe [AgentNetworkInfo]))
    -> Maybe [AgentNetworkInfo] -> f (Maybe [AgentNetworkInfo]))
-> (Maybe [AgentNetworkInfo] -> f (Maybe [AgentNetworkInfo]))
-> AgentInfo
-> f AgentInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AgentNetworkInfo]
  [AgentNetworkInfo]
  [AgentNetworkInfo]
  [AgentNetworkInfo]
-> Iso
     (Maybe [AgentNetworkInfo])
     (Maybe [AgentNetworkInfo])
     (Maybe [AgentNetworkInfo])
     (Maybe [AgentNetworkInfo])
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
  [AgentNetworkInfo]
  [AgentNetworkInfo]
  [AgentNetworkInfo]
  [AgentNetworkInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the connector.
agentInfo_connectorId :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_connectorId :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_connectorId = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
connectorId :: Maybe Text
$sel:connectorId:AgentInfo' :: AgentInfo -> Maybe Text
connectorId} -> Maybe Text
connectorId) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:connectorId:AgentInfo' :: Maybe Text
connectorId = Maybe Text
a} :: AgentInfo)

-- | The health of the agent or connector.
agentInfo_health :: Lens.Lens' AgentInfo (Prelude.Maybe AgentStatus)
agentInfo_health :: (Maybe AgentStatus -> f (Maybe AgentStatus))
-> AgentInfo -> f AgentInfo
agentInfo_health = (AgentInfo -> Maybe AgentStatus)
-> (AgentInfo -> Maybe AgentStatus -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe AgentStatus) (Maybe AgentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe AgentStatus
health :: Maybe AgentStatus
$sel:health:AgentInfo' :: AgentInfo -> Maybe AgentStatus
health} -> Maybe AgentStatus
health) (\s :: AgentInfo
s@AgentInfo' {} Maybe AgentStatus
a -> AgentInfo
s {$sel:health:AgentInfo' :: Maybe AgentStatus
health = Maybe AgentStatus
a} :: AgentInfo)

-- | The agent or connector ID.
agentInfo_agentId :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_agentId :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_agentId = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
agentId :: Maybe Text
$sel:agentId:AgentInfo' :: AgentInfo -> Maybe Text
agentId} -> Maybe Text
agentId) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:agentId:AgentInfo' :: Maybe Text
agentId = Maybe Text
a} :: AgentInfo)

-- | The agent or connector version.
agentInfo_version :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_version :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_version = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
version :: Maybe Text
$sel:version:AgentInfo' :: AgentInfo -> Maybe Text
version} -> Maybe Text
version) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:version:AgentInfo' :: Maybe Text
version = Maybe Text
a} :: AgentInfo)

-- | Status of the collection process for an agent or connector.
agentInfo_collectionStatus :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_collectionStatus :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_collectionStatus = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
collectionStatus :: Maybe Text
$sel:collectionStatus:AgentInfo' :: AgentInfo -> Maybe Text
collectionStatus} -> Maybe Text
collectionStatus) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:collectionStatus:AgentInfo' :: Maybe Text
collectionStatus = Maybe Text
a} :: AgentInfo)

-- | Agent\'s first registration timestamp in UTC.
agentInfo_registeredTime :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_registeredTime :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_registeredTime = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
registeredTime :: Maybe Text
$sel:registeredTime:AgentInfo' :: AgentInfo -> Maybe Text
registeredTime} -> Maybe Text
registeredTime) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:registeredTime:AgentInfo' :: Maybe Text
registeredTime = Maybe Text
a} :: AgentInfo)

-- | Type of agent.
agentInfo_agentType :: Lens.Lens' AgentInfo (Prelude.Maybe Prelude.Text)
agentInfo_agentType :: (Maybe Text -> f (Maybe Text)) -> AgentInfo -> f AgentInfo
agentInfo_agentType = (AgentInfo -> Maybe Text)
-> (AgentInfo -> Maybe Text -> AgentInfo)
-> Lens AgentInfo AgentInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentInfo' {Maybe Text
agentType :: Maybe Text
$sel:agentType:AgentInfo' :: AgentInfo -> Maybe Text
agentType} -> Maybe Text
agentType) (\s :: AgentInfo
s@AgentInfo' {} Maybe Text
a -> AgentInfo
s {$sel:agentType:AgentInfo' :: Maybe Text
agentType = Maybe Text
a} :: AgentInfo)

instance Core.FromJSON AgentInfo where
  parseJSON :: Value -> Parser AgentInfo
parseJSON =
    String -> (Object -> Parser AgentInfo) -> Value -> Parser AgentInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AgentInfo"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [AgentNetworkInfo]
-> Maybe Text
-> Maybe AgentStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AgentInfo
AgentInfo'
            (Maybe Text
 -> Maybe Text
 -> Maybe [AgentNetworkInfo]
 -> Maybe Text
 -> Maybe AgentStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> AgentInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [AgentNetworkInfo]
      -> Maybe Text
      -> Maybe AgentStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AgentInfo)
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
"hostName")
            Parser
  (Maybe Text
   -> Maybe [AgentNetworkInfo]
   -> Maybe Text
   -> Maybe AgentStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AgentInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AgentNetworkInfo]
      -> Maybe Text
      -> Maybe AgentStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AgentInfo)
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
"lastHealthPingTime")
            Parser
  (Maybe [AgentNetworkInfo]
   -> Maybe Text
   -> Maybe AgentStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AgentInfo)
-> Parser (Maybe [AgentNetworkInfo])
-> Parser
     (Maybe Text
      -> Maybe AgentStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AgentInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AgentNetworkInfo]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"agentNetworkInfoList"
                            Parser (Maybe (Maybe [AgentNetworkInfo]))
-> Maybe [AgentNetworkInfo] -> Parser (Maybe [AgentNetworkInfo])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AgentNetworkInfo]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe AgentStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AgentInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe AgentStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AgentInfo)
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
"connectorId")
            Parser
  (Maybe AgentStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AgentInfo)
-> Parser (Maybe AgentStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> AgentInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AgentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"health")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> AgentInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> AgentInfo)
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
"agentId")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> AgentInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> AgentInfo)
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
"version")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> AgentInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AgentInfo)
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
"collectionStatus")
            Parser (Maybe Text -> Maybe Text -> AgentInfo)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AgentInfo)
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
"registeredTime")
            Parser (Maybe Text -> AgentInfo)
-> Parser (Maybe Text) -> Parser AgentInfo
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
"agentType")
      )

instance Prelude.Hashable AgentInfo

instance Prelude.NFData AgentInfo