{-# 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.DataPipeline.SetStatus
(
SetStatus (..),
newSetStatus,
setStatus_pipelineId,
setStatus_objectIds,
setStatus_status,
SetStatusResponse (..),
newSetStatusResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataPipeline.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 SetStatus = SetStatus'
{
SetStatus -> Text
pipelineId :: Prelude.Text,
SetStatus -> [Text]
objectIds :: [Prelude.Text],
SetStatus -> Text
status :: Prelude.Text
}
deriving (SetStatus -> SetStatus -> Bool
(SetStatus -> SetStatus -> Bool)
-> (SetStatus -> SetStatus -> Bool) -> Eq SetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetStatus -> SetStatus -> Bool
$c/= :: SetStatus -> SetStatus -> Bool
== :: SetStatus -> SetStatus -> Bool
$c== :: SetStatus -> SetStatus -> Bool
Prelude.Eq, ReadPrec [SetStatus]
ReadPrec SetStatus
Int -> ReadS SetStatus
ReadS [SetStatus]
(Int -> ReadS SetStatus)
-> ReadS [SetStatus]
-> ReadPrec SetStatus
-> ReadPrec [SetStatus]
-> Read SetStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetStatus]
$creadListPrec :: ReadPrec [SetStatus]
readPrec :: ReadPrec SetStatus
$creadPrec :: ReadPrec SetStatus
readList :: ReadS [SetStatus]
$creadList :: ReadS [SetStatus]
readsPrec :: Int -> ReadS SetStatus
$creadsPrec :: Int -> ReadS SetStatus
Prelude.Read, Int -> SetStatus -> ShowS
[SetStatus] -> ShowS
SetStatus -> String
(Int -> SetStatus -> ShowS)
-> (SetStatus -> String)
-> ([SetStatus] -> ShowS)
-> Show SetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetStatus] -> ShowS
$cshowList :: [SetStatus] -> ShowS
show :: SetStatus -> String
$cshow :: SetStatus -> String
showsPrec :: Int -> SetStatus -> ShowS
$cshowsPrec :: Int -> SetStatus -> ShowS
Prelude.Show, (forall x. SetStatus -> Rep SetStatus x)
-> (forall x. Rep SetStatus x -> SetStatus) -> Generic SetStatus
forall x. Rep SetStatus x -> SetStatus
forall x. SetStatus -> Rep SetStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetStatus x -> SetStatus
$cfrom :: forall x. SetStatus -> Rep SetStatus x
Prelude.Generic)
newSetStatus ::
Prelude.Text ->
Prelude.Text ->
SetStatus
newSetStatus :: Text -> Text -> SetStatus
newSetStatus Text
pPipelineId_ Text
pStatus_ =
SetStatus' :: Text -> [Text] -> Text -> SetStatus
SetStatus'
{ $sel:pipelineId:SetStatus' :: Text
pipelineId = Text
pPipelineId_,
$sel:objectIds:SetStatus' :: [Text]
objectIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:status:SetStatus' :: Text
status = Text
pStatus_
}
setStatus_pipelineId :: Lens.Lens' SetStatus Prelude.Text
setStatus_pipelineId :: (Text -> f Text) -> SetStatus -> f SetStatus
setStatus_pipelineId = (SetStatus -> Text)
-> (SetStatus -> Text -> SetStatus)
-> Lens SetStatus SetStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetStatus' {Text
pipelineId :: Text
$sel:pipelineId:SetStatus' :: SetStatus -> Text
pipelineId} -> Text
pipelineId) (\s :: SetStatus
s@SetStatus' {} Text
a -> SetStatus
s {$sel:pipelineId:SetStatus' :: Text
pipelineId = Text
a} :: SetStatus)
setStatus_objectIds :: Lens.Lens' SetStatus [Prelude.Text]
setStatus_objectIds :: ([Text] -> f [Text]) -> SetStatus -> f SetStatus
setStatus_objectIds = (SetStatus -> [Text])
-> (SetStatus -> [Text] -> SetStatus)
-> Lens SetStatus SetStatus [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetStatus' {[Text]
objectIds :: [Text]
$sel:objectIds:SetStatus' :: SetStatus -> [Text]
objectIds} -> [Text]
objectIds) (\s :: SetStatus
s@SetStatus' {} [Text]
a -> SetStatus
s {$sel:objectIds:SetStatus' :: [Text]
objectIds = [Text]
a} :: SetStatus) (([Text] -> f [Text]) -> SetStatus -> f SetStatus)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> SetStatus
-> f SetStatus
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
setStatus_status :: Lens.Lens' SetStatus Prelude.Text
setStatus_status :: (Text -> f Text) -> SetStatus -> f SetStatus
setStatus_status = (SetStatus -> Text)
-> (SetStatus -> Text -> SetStatus)
-> Lens SetStatus SetStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetStatus' {Text
status :: Text
$sel:status:SetStatus' :: SetStatus -> Text
status} -> Text
status) (\s :: SetStatus
s@SetStatus' {} Text
a -> SetStatus
s {$sel:status:SetStatus' :: Text
status = Text
a} :: SetStatus)
instance Core.AWSRequest SetStatus where
type AWSResponse SetStatus = SetStatusResponse
request :: SetStatus -> Request SetStatus
request = Service -> SetStatus -> Request SetStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SetStatus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SetStatus)))
response = AWSResponse SetStatus
-> Logger
-> Service
-> Proxy SetStatus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SetStatus)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SetStatus
SetStatusResponse
SetStatusResponse'
instance Prelude.Hashable SetStatus
instance Prelude.NFData SetStatus
instance Core.ToHeaders SetStatus where
toHeaders :: SetStatus -> [Header]
toHeaders =
[Header] -> SetStatus -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"DataPipeline.SetStatus" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON SetStatus where
toJSON :: SetStatus -> Value
toJSON SetStatus' {[Text]
Text
status :: Text
objectIds :: [Text]
pipelineId :: Text
$sel:status:SetStatus' :: SetStatus -> Text
$sel:objectIds:SetStatus' :: SetStatus -> [Text]
$sel:pipelineId:SetStatus' :: SetStatus -> 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
"pipelineId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"objectIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
objectIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
status)
]
)
instance Core.ToPath SetStatus where
toPath :: SetStatus -> ByteString
toPath = ByteString -> SetStatus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SetStatus where
toQuery :: SetStatus -> QueryString
toQuery = QueryString -> SetStatus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SetStatusResponse = SetStatusResponse'
{
}
deriving (SetStatusResponse -> SetStatusResponse -> Bool
(SetStatusResponse -> SetStatusResponse -> Bool)
-> (SetStatusResponse -> SetStatusResponse -> Bool)
-> Eq SetStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetStatusResponse -> SetStatusResponse -> Bool
$c/= :: SetStatusResponse -> SetStatusResponse -> Bool
== :: SetStatusResponse -> SetStatusResponse -> Bool
$c== :: SetStatusResponse -> SetStatusResponse -> Bool
Prelude.Eq, ReadPrec [SetStatusResponse]
ReadPrec SetStatusResponse
Int -> ReadS SetStatusResponse
ReadS [SetStatusResponse]
(Int -> ReadS SetStatusResponse)
-> ReadS [SetStatusResponse]
-> ReadPrec SetStatusResponse
-> ReadPrec [SetStatusResponse]
-> Read SetStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetStatusResponse]
$creadListPrec :: ReadPrec [SetStatusResponse]
readPrec :: ReadPrec SetStatusResponse
$creadPrec :: ReadPrec SetStatusResponse
readList :: ReadS [SetStatusResponse]
$creadList :: ReadS [SetStatusResponse]
readsPrec :: Int -> ReadS SetStatusResponse
$creadsPrec :: Int -> ReadS SetStatusResponse
Prelude.Read, Int -> SetStatusResponse -> ShowS
[SetStatusResponse] -> ShowS
SetStatusResponse -> String
(Int -> SetStatusResponse -> ShowS)
-> (SetStatusResponse -> String)
-> ([SetStatusResponse] -> ShowS)
-> Show SetStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetStatusResponse] -> ShowS
$cshowList :: [SetStatusResponse] -> ShowS
show :: SetStatusResponse -> String
$cshow :: SetStatusResponse -> String
showsPrec :: Int -> SetStatusResponse -> ShowS
$cshowsPrec :: Int -> SetStatusResponse -> ShowS
Prelude.Show, (forall x. SetStatusResponse -> Rep SetStatusResponse x)
-> (forall x. Rep SetStatusResponse x -> SetStatusResponse)
-> Generic SetStatusResponse
forall x. Rep SetStatusResponse x -> SetStatusResponse
forall x. SetStatusResponse -> Rep SetStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetStatusResponse x -> SetStatusResponse
$cfrom :: forall x. SetStatusResponse -> Rep SetStatusResponse x
Prelude.Generic)
newSetStatusResponse ::
SetStatusResponse
newSetStatusResponse :: SetStatusResponse
newSetStatusResponse = SetStatusResponse
SetStatusResponse'
instance Prelude.NFData SetStatusResponse