{-# 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 #-}
module Amazonka.Discovery.Types.AgentConfigurationStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AgentConfigurationStatus = AgentConfigurationStatus'
{
AgentConfigurationStatus -> Maybe Text
agentId :: Prelude.Maybe Prelude.Text,
AgentConfigurationStatus -> Maybe Bool
operationSucceeded :: Prelude.Maybe Prelude.Bool,
AgentConfigurationStatus -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (AgentConfigurationStatus -> AgentConfigurationStatus -> Bool
(AgentConfigurationStatus -> AgentConfigurationStatus -> Bool)
-> (AgentConfigurationStatus -> AgentConfigurationStatus -> Bool)
-> Eq AgentConfigurationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AgentConfigurationStatus -> AgentConfigurationStatus -> Bool
$c/= :: AgentConfigurationStatus -> AgentConfigurationStatus -> Bool
== :: AgentConfigurationStatus -> AgentConfigurationStatus -> Bool
$c== :: AgentConfigurationStatus -> AgentConfigurationStatus -> Bool
Prelude.Eq, ReadPrec [AgentConfigurationStatus]
ReadPrec AgentConfigurationStatus
Int -> ReadS AgentConfigurationStatus
ReadS [AgentConfigurationStatus]
(Int -> ReadS AgentConfigurationStatus)
-> ReadS [AgentConfigurationStatus]
-> ReadPrec AgentConfigurationStatus
-> ReadPrec [AgentConfigurationStatus]
-> Read AgentConfigurationStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AgentConfigurationStatus]
$creadListPrec :: ReadPrec [AgentConfigurationStatus]
readPrec :: ReadPrec AgentConfigurationStatus
$creadPrec :: ReadPrec AgentConfigurationStatus
readList :: ReadS [AgentConfigurationStatus]
$creadList :: ReadS [AgentConfigurationStatus]
readsPrec :: Int -> ReadS AgentConfigurationStatus
$creadsPrec :: Int -> ReadS AgentConfigurationStatus
Prelude.Read, Int -> AgentConfigurationStatus -> ShowS
[AgentConfigurationStatus] -> ShowS
AgentConfigurationStatus -> String
(Int -> AgentConfigurationStatus -> ShowS)
-> (AgentConfigurationStatus -> String)
-> ([AgentConfigurationStatus] -> ShowS)
-> Show AgentConfigurationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AgentConfigurationStatus] -> ShowS
$cshowList :: [AgentConfigurationStatus] -> ShowS
show :: AgentConfigurationStatus -> String
$cshow :: AgentConfigurationStatus -> String
showsPrec :: Int -> AgentConfigurationStatus -> ShowS
$cshowsPrec :: Int -> AgentConfigurationStatus -> ShowS
Prelude.Show, (forall x.
AgentConfigurationStatus -> Rep AgentConfigurationStatus x)
-> (forall x.
Rep AgentConfigurationStatus x -> AgentConfigurationStatus)
-> Generic AgentConfigurationStatus
forall x.
Rep AgentConfigurationStatus x -> AgentConfigurationStatus
forall x.
AgentConfigurationStatus -> Rep AgentConfigurationStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AgentConfigurationStatus x -> AgentConfigurationStatus
$cfrom :: forall x.
AgentConfigurationStatus -> Rep AgentConfigurationStatus x
Prelude.Generic)
newAgentConfigurationStatus ::
AgentConfigurationStatus
newAgentConfigurationStatus :: AgentConfigurationStatus
newAgentConfigurationStatus =
AgentConfigurationStatus' :: Maybe Text -> Maybe Bool -> Maybe Text -> AgentConfigurationStatus
AgentConfigurationStatus'
{ $sel:agentId:AgentConfigurationStatus' :: Maybe Text
agentId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:operationSucceeded:AgentConfigurationStatus' :: Maybe Bool
operationSucceeded = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:AgentConfigurationStatus' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
agentConfigurationStatus_agentId :: Lens.Lens' AgentConfigurationStatus (Prelude.Maybe Prelude.Text)
agentConfigurationStatus_agentId :: (Maybe Text -> f (Maybe Text))
-> AgentConfigurationStatus -> f AgentConfigurationStatus
agentConfigurationStatus_agentId = (AgentConfigurationStatus -> Maybe Text)
-> (AgentConfigurationStatus
-> Maybe Text -> AgentConfigurationStatus)
-> Lens
AgentConfigurationStatus
AgentConfigurationStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentConfigurationStatus' {Maybe Text
agentId :: Maybe Text
$sel:agentId:AgentConfigurationStatus' :: AgentConfigurationStatus -> Maybe Text
agentId} -> Maybe Text
agentId) (\s :: AgentConfigurationStatus
s@AgentConfigurationStatus' {} Maybe Text
a -> AgentConfigurationStatus
s {$sel:agentId:AgentConfigurationStatus' :: Maybe Text
agentId = Maybe Text
a} :: AgentConfigurationStatus)
agentConfigurationStatus_operationSucceeded :: Lens.Lens' AgentConfigurationStatus (Prelude.Maybe Prelude.Bool)
agentConfigurationStatus_operationSucceeded :: (Maybe Bool -> f (Maybe Bool))
-> AgentConfigurationStatus -> f AgentConfigurationStatus
agentConfigurationStatus_operationSucceeded = (AgentConfigurationStatus -> Maybe Bool)
-> (AgentConfigurationStatus
-> Maybe Bool -> AgentConfigurationStatus)
-> Lens
AgentConfigurationStatus
AgentConfigurationStatus
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentConfigurationStatus' {Maybe Bool
operationSucceeded :: Maybe Bool
$sel:operationSucceeded:AgentConfigurationStatus' :: AgentConfigurationStatus -> Maybe Bool
operationSucceeded} -> Maybe Bool
operationSucceeded) (\s :: AgentConfigurationStatus
s@AgentConfigurationStatus' {} Maybe Bool
a -> AgentConfigurationStatus
s {$sel:operationSucceeded:AgentConfigurationStatus' :: Maybe Bool
operationSucceeded = Maybe Bool
a} :: AgentConfigurationStatus)
agentConfigurationStatus_description :: Lens.Lens' AgentConfigurationStatus (Prelude.Maybe Prelude.Text)
agentConfigurationStatus_description :: (Maybe Text -> f (Maybe Text))
-> AgentConfigurationStatus -> f AgentConfigurationStatus
agentConfigurationStatus_description = (AgentConfigurationStatus -> Maybe Text)
-> (AgentConfigurationStatus
-> Maybe Text -> AgentConfigurationStatus)
-> Lens
AgentConfigurationStatus
AgentConfigurationStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentConfigurationStatus' {Maybe Text
description :: Maybe Text
$sel:description:AgentConfigurationStatus' :: AgentConfigurationStatus -> Maybe Text
description} -> Maybe Text
description) (\s :: AgentConfigurationStatus
s@AgentConfigurationStatus' {} Maybe Text
a -> AgentConfigurationStatus
s {$sel:description:AgentConfigurationStatus' :: Maybe Text
description = Maybe Text
a} :: AgentConfigurationStatus)
instance Core.FromJSON AgentConfigurationStatus where
parseJSON :: Value -> Parser AgentConfigurationStatus
parseJSON =
String
-> (Object -> Parser AgentConfigurationStatus)
-> Value
-> Parser AgentConfigurationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AgentConfigurationStatus"
( \Object
x ->
Maybe Text -> Maybe Bool -> Maybe Text -> AgentConfigurationStatus
AgentConfigurationStatus'
(Maybe Text
-> Maybe Bool -> Maybe Text -> AgentConfigurationStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Maybe Text -> AgentConfigurationStatus)
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
"agentId")
Parser (Maybe Bool -> Maybe Text -> AgentConfigurationStatus)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> AgentConfigurationStatus)
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
"operationSucceeded")
Parser (Maybe Text -> AgentConfigurationStatus)
-> Parser (Maybe Text) -> Parser AgentConfigurationStatus
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 AgentConfigurationStatus
instance Prelude.NFData AgentConfigurationStatus