{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Discovery.StopDataCollectionByAgentIds
(
StopDataCollectionByAgentIds (..),
newStopDataCollectionByAgentIds,
stopDataCollectionByAgentIds_agentIds,
StopDataCollectionByAgentIdsResponse (..),
newStopDataCollectionByAgentIdsResponse,
stopDataCollectionByAgentIdsResponse_agentsConfigurationStatus,
stopDataCollectionByAgentIdsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Discovery.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StopDataCollectionByAgentIds = StopDataCollectionByAgentIds'
{
StopDataCollectionByAgentIds -> [Text]
agentIds :: [Prelude.Text]
}
deriving (StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool
(StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool)
-> (StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool)
-> Eq StopDataCollectionByAgentIds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool
$c/= :: StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool
== :: StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool
$c== :: StopDataCollectionByAgentIds
-> StopDataCollectionByAgentIds -> Bool
Prelude.Eq, ReadPrec [StopDataCollectionByAgentIds]
ReadPrec StopDataCollectionByAgentIds
Int -> ReadS StopDataCollectionByAgentIds
ReadS [StopDataCollectionByAgentIds]
(Int -> ReadS StopDataCollectionByAgentIds)
-> ReadS [StopDataCollectionByAgentIds]
-> ReadPrec StopDataCollectionByAgentIds
-> ReadPrec [StopDataCollectionByAgentIds]
-> Read StopDataCollectionByAgentIds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopDataCollectionByAgentIds]
$creadListPrec :: ReadPrec [StopDataCollectionByAgentIds]
readPrec :: ReadPrec StopDataCollectionByAgentIds
$creadPrec :: ReadPrec StopDataCollectionByAgentIds
readList :: ReadS [StopDataCollectionByAgentIds]
$creadList :: ReadS [StopDataCollectionByAgentIds]
readsPrec :: Int -> ReadS StopDataCollectionByAgentIds
$creadsPrec :: Int -> ReadS StopDataCollectionByAgentIds
Prelude.Read, Int -> StopDataCollectionByAgentIds -> ShowS
[StopDataCollectionByAgentIds] -> ShowS
StopDataCollectionByAgentIds -> String
(Int -> StopDataCollectionByAgentIds -> ShowS)
-> (StopDataCollectionByAgentIds -> String)
-> ([StopDataCollectionByAgentIds] -> ShowS)
-> Show StopDataCollectionByAgentIds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopDataCollectionByAgentIds] -> ShowS
$cshowList :: [StopDataCollectionByAgentIds] -> ShowS
show :: StopDataCollectionByAgentIds -> String
$cshow :: StopDataCollectionByAgentIds -> String
showsPrec :: Int -> StopDataCollectionByAgentIds -> ShowS
$cshowsPrec :: Int -> StopDataCollectionByAgentIds -> ShowS
Prelude.Show, (forall x.
StopDataCollectionByAgentIds -> Rep StopDataCollectionByAgentIds x)
-> (forall x.
Rep StopDataCollectionByAgentIds x -> StopDataCollectionByAgentIds)
-> Generic StopDataCollectionByAgentIds
forall x.
Rep StopDataCollectionByAgentIds x -> StopDataCollectionByAgentIds
forall x.
StopDataCollectionByAgentIds -> Rep StopDataCollectionByAgentIds x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopDataCollectionByAgentIds x -> StopDataCollectionByAgentIds
$cfrom :: forall x.
StopDataCollectionByAgentIds -> Rep StopDataCollectionByAgentIds x
Prelude.Generic)
newStopDataCollectionByAgentIds ::
StopDataCollectionByAgentIds
newStopDataCollectionByAgentIds :: StopDataCollectionByAgentIds
newStopDataCollectionByAgentIds =
StopDataCollectionByAgentIds' :: [Text] -> StopDataCollectionByAgentIds
StopDataCollectionByAgentIds'
{ $sel:agentIds:StopDataCollectionByAgentIds' :: [Text]
agentIds =
[Text]
forall a. Monoid a => a
Prelude.mempty
}
stopDataCollectionByAgentIds_agentIds :: Lens.Lens' StopDataCollectionByAgentIds [Prelude.Text]
stopDataCollectionByAgentIds_agentIds :: ([Text] -> f [Text])
-> StopDataCollectionByAgentIds -> f StopDataCollectionByAgentIds
stopDataCollectionByAgentIds_agentIds = (StopDataCollectionByAgentIds -> [Text])
-> (StopDataCollectionByAgentIds
-> [Text] -> StopDataCollectionByAgentIds)
-> Lens
StopDataCollectionByAgentIds
StopDataCollectionByAgentIds
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopDataCollectionByAgentIds' {[Text]
agentIds :: [Text]
$sel:agentIds:StopDataCollectionByAgentIds' :: StopDataCollectionByAgentIds -> [Text]
agentIds} -> [Text]
agentIds) (\s :: StopDataCollectionByAgentIds
s@StopDataCollectionByAgentIds' {} [Text]
a -> StopDataCollectionByAgentIds
s {$sel:agentIds:StopDataCollectionByAgentIds' :: [Text]
agentIds = [Text]
a} :: StopDataCollectionByAgentIds) (([Text] -> f [Text])
-> StopDataCollectionByAgentIds -> f StopDataCollectionByAgentIds)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> StopDataCollectionByAgentIds
-> f StopDataCollectionByAgentIds
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest StopDataCollectionByAgentIds where
type
AWSResponse StopDataCollectionByAgentIds =
StopDataCollectionByAgentIdsResponse
request :: StopDataCollectionByAgentIds
-> Request StopDataCollectionByAgentIds
request = Service
-> StopDataCollectionByAgentIds
-> Request StopDataCollectionByAgentIds
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopDataCollectionByAgentIds
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopDataCollectionByAgentIds)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StopDataCollectionByAgentIds))
-> Logger
-> Service
-> Proxy StopDataCollectionByAgentIds
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopDataCollectionByAgentIds)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [AgentConfigurationStatus]
-> Int -> StopDataCollectionByAgentIdsResponse
StopDataCollectionByAgentIdsResponse'
(Maybe [AgentConfigurationStatus]
-> Int -> StopDataCollectionByAgentIdsResponse)
-> Either String (Maybe [AgentConfigurationStatus])
-> Either String (Int -> StopDataCollectionByAgentIdsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [AgentConfigurationStatus]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"agentsConfigurationStatus"
Either String (Maybe (Maybe [AgentConfigurationStatus]))
-> Maybe [AgentConfigurationStatus]
-> Either String (Maybe [AgentConfigurationStatus])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AgentConfigurationStatus]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> StopDataCollectionByAgentIdsResponse)
-> Either String Int
-> Either String StopDataCollectionByAgentIdsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
StopDataCollectionByAgentIds
instance Prelude.NFData StopDataCollectionByAgentIds
instance Core.ToHeaders StopDataCollectionByAgentIds where
toHeaders :: StopDataCollectionByAgentIds -> ResponseHeaders
toHeaders =
ResponseHeaders -> StopDataCollectionByAgentIds -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSPoseidonService_V2015_11_01.StopDataCollectionByAgentIds" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON StopDataCollectionByAgentIds where
toJSON :: StopDataCollectionByAgentIds -> Value
toJSON StopDataCollectionByAgentIds' {[Text]
agentIds :: [Text]
$sel:agentIds:StopDataCollectionByAgentIds' :: StopDataCollectionByAgentIds -> [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"agentIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
agentIds)]
)
instance Core.ToPath StopDataCollectionByAgentIds where
toPath :: StopDataCollectionByAgentIds -> ByteString
toPath = ByteString -> StopDataCollectionByAgentIds -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopDataCollectionByAgentIds where
toQuery :: StopDataCollectionByAgentIds -> QueryString
toQuery = QueryString -> StopDataCollectionByAgentIds -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopDataCollectionByAgentIdsResponse = StopDataCollectionByAgentIdsResponse'
{
StopDataCollectionByAgentIdsResponse
-> Maybe [AgentConfigurationStatus]
agentsConfigurationStatus :: Prelude.Maybe [AgentConfigurationStatus],
StopDataCollectionByAgentIdsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool
(StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool)
-> (StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool)
-> Eq StopDataCollectionByAgentIdsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool
$c/= :: StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool
== :: StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool
$c== :: StopDataCollectionByAgentIdsResponse
-> StopDataCollectionByAgentIdsResponse -> Bool
Prelude.Eq, ReadPrec [StopDataCollectionByAgentIdsResponse]
ReadPrec StopDataCollectionByAgentIdsResponse
Int -> ReadS StopDataCollectionByAgentIdsResponse
ReadS [StopDataCollectionByAgentIdsResponse]
(Int -> ReadS StopDataCollectionByAgentIdsResponse)
-> ReadS [StopDataCollectionByAgentIdsResponse]
-> ReadPrec StopDataCollectionByAgentIdsResponse
-> ReadPrec [StopDataCollectionByAgentIdsResponse]
-> Read StopDataCollectionByAgentIdsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopDataCollectionByAgentIdsResponse]
$creadListPrec :: ReadPrec [StopDataCollectionByAgentIdsResponse]
readPrec :: ReadPrec StopDataCollectionByAgentIdsResponse
$creadPrec :: ReadPrec StopDataCollectionByAgentIdsResponse
readList :: ReadS [StopDataCollectionByAgentIdsResponse]
$creadList :: ReadS [StopDataCollectionByAgentIdsResponse]
readsPrec :: Int -> ReadS StopDataCollectionByAgentIdsResponse
$creadsPrec :: Int -> ReadS StopDataCollectionByAgentIdsResponse
Prelude.Read, Int -> StopDataCollectionByAgentIdsResponse -> ShowS
[StopDataCollectionByAgentIdsResponse] -> ShowS
StopDataCollectionByAgentIdsResponse -> String
(Int -> StopDataCollectionByAgentIdsResponse -> ShowS)
-> (StopDataCollectionByAgentIdsResponse -> String)
-> ([StopDataCollectionByAgentIdsResponse] -> ShowS)
-> Show StopDataCollectionByAgentIdsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopDataCollectionByAgentIdsResponse] -> ShowS
$cshowList :: [StopDataCollectionByAgentIdsResponse] -> ShowS
show :: StopDataCollectionByAgentIdsResponse -> String
$cshow :: StopDataCollectionByAgentIdsResponse -> String
showsPrec :: Int -> StopDataCollectionByAgentIdsResponse -> ShowS
$cshowsPrec :: Int -> StopDataCollectionByAgentIdsResponse -> ShowS
Prelude.Show, (forall x.
StopDataCollectionByAgentIdsResponse
-> Rep StopDataCollectionByAgentIdsResponse x)
-> (forall x.
Rep StopDataCollectionByAgentIdsResponse x
-> StopDataCollectionByAgentIdsResponse)
-> Generic StopDataCollectionByAgentIdsResponse
forall x.
Rep StopDataCollectionByAgentIdsResponse x
-> StopDataCollectionByAgentIdsResponse
forall x.
StopDataCollectionByAgentIdsResponse
-> Rep StopDataCollectionByAgentIdsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopDataCollectionByAgentIdsResponse x
-> StopDataCollectionByAgentIdsResponse
$cfrom :: forall x.
StopDataCollectionByAgentIdsResponse
-> Rep StopDataCollectionByAgentIdsResponse x
Prelude.Generic)
newStopDataCollectionByAgentIdsResponse ::
Prelude.Int ->
StopDataCollectionByAgentIdsResponse
newStopDataCollectionByAgentIdsResponse :: Int -> StopDataCollectionByAgentIdsResponse
newStopDataCollectionByAgentIdsResponse Int
pHttpStatus_ =
StopDataCollectionByAgentIdsResponse' :: Maybe [AgentConfigurationStatus]
-> Int -> StopDataCollectionByAgentIdsResponse
StopDataCollectionByAgentIdsResponse'
{ $sel:agentsConfigurationStatus:StopDataCollectionByAgentIdsResponse' :: Maybe [AgentConfigurationStatus]
agentsConfigurationStatus =
Maybe [AgentConfigurationStatus]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StopDataCollectionByAgentIdsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
stopDataCollectionByAgentIdsResponse_agentsConfigurationStatus :: Lens.Lens' StopDataCollectionByAgentIdsResponse (Prelude.Maybe [AgentConfigurationStatus])
stopDataCollectionByAgentIdsResponse_agentsConfigurationStatus :: (Maybe [AgentConfigurationStatus]
-> f (Maybe [AgentConfigurationStatus]))
-> StopDataCollectionByAgentIdsResponse
-> f StopDataCollectionByAgentIdsResponse
stopDataCollectionByAgentIdsResponse_agentsConfigurationStatus = (StopDataCollectionByAgentIdsResponse
-> Maybe [AgentConfigurationStatus])
-> (StopDataCollectionByAgentIdsResponse
-> Maybe [AgentConfigurationStatus]
-> StopDataCollectionByAgentIdsResponse)
-> Lens
StopDataCollectionByAgentIdsResponse
StopDataCollectionByAgentIdsResponse
(Maybe [AgentConfigurationStatus])
(Maybe [AgentConfigurationStatus])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopDataCollectionByAgentIdsResponse' {Maybe [AgentConfigurationStatus]
agentsConfigurationStatus :: Maybe [AgentConfigurationStatus]
$sel:agentsConfigurationStatus:StopDataCollectionByAgentIdsResponse' :: StopDataCollectionByAgentIdsResponse
-> Maybe [AgentConfigurationStatus]
agentsConfigurationStatus} -> Maybe [AgentConfigurationStatus]
agentsConfigurationStatus) (\s :: StopDataCollectionByAgentIdsResponse
s@StopDataCollectionByAgentIdsResponse' {} Maybe [AgentConfigurationStatus]
a -> StopDataCollectionByAgentIdsResponse
s {$sel:agentsConfigurationStatus:StopDataCollectionByAgentIdsResponse' :: Maybe [AgentConfigurationStatus]
agentsConfigurationStatus = Maybe [AgentConfigurationStatus]
a} :: StopDataCollectionByAgentIdsResponse) ((Maybe [AgentConfigurationStatus]
-> f (Maybe [AgentConfigurationStatus]))
-> StopDataCollectionByAgentIdsResponse
-> f StopDataCollectionByAgentIdsResponse)
-> ((Maybe [AgentConfigurationStatus]
-> f (Maybe [AgentConfigurationStatus]))
-> Maybe [AgentConfigurationStatus]
-> f (Maybe [AgentConfigurationStatus]))
-> (Maybe [AgentConfigurationStatus]
-> f (Maybe [AgentConfigurationStatus]))
-> StopDataCollectionByAgentIdsResponse
-> f StopDataCollectionByAgentIdsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AgentConfigurationStatus]
[AgentConfigurationStatus]
[AgentConfigurationStatus]
[AgentConfigurationStatus]
-> Iso
(Maybe [AgentConfigurationStatus])
(Maybe [AgentConfigurationStatus])
(Maybe [AgentConfigurationStatus])
(Maybe [AgentConfigurationStatus])
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
[AgentConfigurationStatus]
[AgentConfigurationStatus]
[AgentConfigurationStatus]
[AgentConfigurationStatus]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
stopDataCollectionByAgentIdsResponse_httpStatus :: Lens.Lens' StopDataCollectionByAgentIdsResponse Prelude.Int
stopDataCollectionByAgentIdsResponse_httpStatus :: (Int -> f Int)
-> StopDataCollectionByAgentIdsResponse
-> f StopDataCollectionByAgentIdsResponse
stopDataCollectionByAgentIdsResponse_httpStatus = (StopDataCollectionByAgentIdsResponse -> Int)
-> (StopDataCollectionByAgentIdsResponse
-> Int -> StopDataCollectionByAgentIdsResponse)
-> Lens
StopDataCollectionByAgentIdsResponse
StopDataCollectionByAgentIdsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopDataCollectionByAgentIdsResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopDataCollectionByAgentIdsResponse' :: StopDataCollectionByAgentIdsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StopDataCollectionByAgentIdsResponse
s@StopDataCollectionByAgentIdsResponse' {} Int
a -> StopDataCollectionByAgentIdsResponse
s {$sel:httpStatus:StopDataCollectionByAgentIdsResponse' :: Int
httpStatus = Int
a} :: StopDataCollectionByAgentIdsResponse)
instance
Prelude.NFData
StopDataCollectionByAgentIdsResponse