{-# 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.CodePipeline.PutJobSuccessResult
(
PutJobSuccessResult (..),
newPutJobSuccessResult,
putJobSuccessResult_outputVariables,
putJobSuccessResult_continuationToken,
putJobSuccessResult_executionDetails,
putJobSuccessResult_currentRevision,
putJobSuccessResult_jobId,
PutJobSuccessResultResponse (..),
newPutJobSuccessResultResponse,
)
where
import Amazonka.CodePipeline.Types
import qualified Amazonka.Core as Core
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 PutJobSuccessResult = PutJobSuccessResult'
{
PutJobSuccessResult -> Maybe (HashMap Text Text)
outputVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
PutJobSuccessResult -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
PutJobSuccessResult -> Maybe ExecutionDetails
executionDetails :: Prelude.Maybe ExecutionDetails,
PutJobSuccessResult -> Maybe CurrentRevision
currentRevision :: Prelude.Maybe CurrentRevision,
PutJobSuccessResult -> Text
jobId :: Prelude.Text
}
deriving (PutJobSuccessResult -> PutJobSuccessResult -> Bool
(PutJobSuccessResult -> PutJobSuccessResult -> Bool)
-> (PutJobSuccessResult -> PutJobSuccessResult -> Bool)
-> Eq PutJobSuccessResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutJobSuccessResult -> PutJobSuccessResult -> Bool
$c/= :: PutJobSuccessResult -> PutJobSuccessResult -> Bool
== :: PutJobSuccessResult -> PutJobSuccessResult -> Bool
$c== :: PutJobSuccessResult -> PutJobSuccessResult -> Bool
Prelude.Eq, ReadPrec [PutJobSuccessResult]
ReadPrec PutJobSuccessResult
Int -> ReadS PutJobSuccessResult
ReadS [PutJobSuccessResult]
(Int -> ReadS PutJobSuccessResult)
-> ReadS [PutJobSuccessResult]
-> ReadPrec PutJobSuccessResult
-> ReadPrec [PutJobSuccessResult]
-> Read PutJobSuccessResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutJobSuccessResult]
$creadListPrec :: ReadPrec [PutJobSuccessResult]
readPrec :: ReadPrec PutJobSuccessResult
$creadPrec :: ReadPrec PutJobSuccessResult
readList :: ReadS [PutJobSuccessResult]
$creadList :: ReadS [PutJobSuccessResult]
readsPrec :: Int -> ReadS PutJobSuccessResult
$creadsPrec :: Int -> ReadS PutJobSuccessResult
Prelude.Read, Int -> PutJobSuccessResult -> ShowS
[PutJobSuccessResult] -> ShowS
PutJobSuccessResult -> String
(Int -> PutJobSuccessResult -> ShowS)
-> (PutJobSuccessResult -> String)
-> ([PutJobSuccessResult] -> ShowS)
-> Show PutJobSuccessResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutJobSuccessResult] -> ShowS
$cshowList :: [PutJobSuccessResult] -> ShowS
show :: PutJobSuccessResult -> String
$cshow :: PutJobSuccessResult -> String
showsPrec :: Int -> PutJobSuccessResult -> ShowS
$cshowsPrec :: Int -> PutJobSuccessResult -> ShowS
Prelude.Show, (forall x. PutJobSuccessResult -> Rep PutJobSuccessResult x)
-> (forall x. Rep PutJobSuccessResult x -> PutJobSuccessResult)
-> Generic PutJobSuccessResult
forall x. Rep PutJobSuccessResult x -> PutJobSuccessResult
forall x. PutJobSuccessResult -> Rep PutJobSuccessResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutJobSuccessResult x -> PutJobSuccessResult
$cfrom :: forall x. PutJobSuccessResult -> Rep PutJobSuccessResult x
Prelude.Generic)
newPutJobSuccessResult ::
Prelude.Text ->
PutJobSuccessResult
newPutJobSuccessResult :: Text -> PutJobSuccessResult
newPutJobSuccessResult Text
pJobId_ =
PutJobSuccessResult' :: Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe ExecutionDetails
-> Maybe CurrentRevision
-> Text
-> PutJobSuccessResult
PutJobSuccessResult'
{ $sel:outputVariables:PutJobSuccessResult' :: Maybe (HashMap Text Text)
outputVariables =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:continuationToken:PutJobSuccessResult' :: Maybe Text
continuationToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:executionDetails:PutJobSuccessResult' :: Maybe ExecutionDetails
executionDetails = Maybe ExecutionDetails
forall a. Maybe a
Prelude.Nothing,
$sel:currentRevision:PutJobSuccessResult' :: Maybe CurrentRevision
currentRevision = Maybe CurrentRevision
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:PutJobSuccessResult' :: Text
jobId = Text
pJobId_
}
putJobSuccessResult_outputVariables :: Lens.Lens' PutJobSuccessResult (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putJobSuccessResult_outputVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutJobSuccessResult -> f PutJobSuccessResult
putJobSuccessResult_outputVariables = (PutJobSuccessResult -> Maybe (HashMap Text Text))
-> (PutJobSuccessResult
-> Maybe (HashMap Text Text) -> PutJobSuccessResult)
-> Lens
PutJobSuccessResult
PutJobSuccessResult
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutJobSuccessResult' {Maybe (HashMap Text Text)
outputVariables :: Maybe (HashMap Text Text)
$sel:outputVariables:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe (HashMap Text Text)
outputVariables} -> Maybe (HashMap Text Text)
outputVariables) (\s :: PutJobSuccessResult
s@PutJobSuccessResult' {} Maybe (HashMap Text Text)
a -> PutJobSuccessResult
s {$sel:outputVariables:PutJobSuccessResult' :: Maybe (HashMap Text Text)
outputVariables = Maybe (HashMap Text Text)
a} :: PutJobSuccessResult) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutJobSuccessResult -> f PutJobSuccessResult)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutJobSuccessResult
-> f PutJobSuccessResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putJobSuccessResult_continuationToken :: Lens.Lens' PutJobSuccessResult (Prelude.Maybe Prelude.Text)
putJobSuccessResult_continuationToken :: (Maybe Text -> f (Maybe Text))
-> PutJobSuccessResult -> f PutJobSuccessResult
putJobSuccessResult_continuationToken = (PutJobSuccessResult -> Maybe Text)
-> (PutJobSuccessResult -> Maybe Text -> PutJobSuccessResult)
-> Lens
PutJobSuccessResult PutJobSuccessResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutJobSuccessResult' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: PutJobSuccessResult
s@PutJobSuccessResult' {} Maybe Text
a -> PutJobSuccessResult
s {$sel:continuationToken:PutJobSuccessResult' :: Maybe Text
continuationToken = Maybe Text
a} :: PutJobSuccessResult)
putJobSuccessResult_executionDetails :: Lens.Lens' PutJobSuccessResult (Prelude.Maybe ExecutionDetails)
putJobSuccessResult_executionDetails :: (Maybe ExecutionDetails -> f (Maybe ExecutionDetails))
-> PutJobSuccessResult -> f PutJobSuccessResult
putJobSuccessResult_executionDetails = (PutJobSuccessResult -> Maybe ExecutionDetails)
-> (PutJobSuccessResult
-> Maybe ExecutionDetails -> PutJobSuccessResult)
-> Lens
PutJobSuccessResult
PutJobSuccessResult
(Maybe ExecutionDetails)
(Maybe ExecutionDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutJobSuccessResult' {Maybe ExecutionDetails
executionDetails :: Maybe ExecutionDetails
$sel:executionDetails:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe ExecutionDetails
executionDetails} -> Maybe ExecutionDetails
executionDetails) (\s :: PutJobSuccessResult
s@PutJobSuccessResult' {} Maybe ExecutionDetails
a -> PutJobSuccessResult
s {$sel:executionDetails:PutJobSuccessResult' :: Maybe ExecutionDetails
executionDetails = Maybe ExecutionDetails
a} :: PutJobSuccessResult)
putJobSuccessResult_currentRevision :: Lens.Lens' PutJobSuccessResult (Prelude.Maybe CurrentRevision)
putJobSuccessResult_currentRevision :: (Maybe CurrentRevision -> f (Maybe CurrentRevision))
-> PutJobSuccessResult -> f PutJobSuccessResult
putJobSuccessResult_currentRevision = (PutJobSuccessResult -> Maybe CurrentRevision)
-> (PutJobSuccessResult
-> Maybe CurrentRevision -> PutJobSuccessResult)
-> Lens
PutJobSuccessResult
PutJobSuccessResult
(Maybe CurrentRevision)
(Maybe CurrentRevision)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutJobSuccessResult' {Maybe CurrentRevision
currentRevision :: Maybe CurrentRevision
$sel:currentRevision:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe CurrentRevision
currentRevision} -> Maybe CurrentRevision
currentRevision) (\s :: PutJobSuccessResult
s@PutJobSuccessResult' {} Maybe CurrentRevision
a -> PutJobSuccessResult
s {$sel:currentRevision:PutJobSuccessResult' :: Maybe CurrentRevision
currentRevision = Maybe CurrentRevision
a} :: PutJobSuccessResult)
putJobSuccessResult_jobId :: Lens.Lens' PutJobSuccessResult Prelude.Text
putJobSuccessResult_jobId :: (Text -> f Text) -> PutJobSuccessResult -> f PutJobSuccessResult
putJobSuccessResult_jobId = (PutJobSuccessResult -> Text)
-> (PutJobSuccessResult -> Text -> PutJobSuccessResult)
-> Lens PutJobSuccessResult PutJobSuccessResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutJobSuccessResult' {Text
jobId :: Text
$sel:jobId:PutJobSuccessResult' :: PutJobSuccessResult -> Text
jobId} -> Text
jobId) (\s :: PutJobSuccessResult
s@PutJobSuccessResult' {} Text
a -> PutJobSuccessResult
s {$sel:jobId:PutJobSuccessResult' :: Text
jobId = Text
a} :: PutJobSuccessResult)
instance Core.AWSRequest PutJobSuccessResult where
type
AWSResponse PutJobSuccessResult =
PutJobSuccessResultResponse
request :: PutJobSuccessResult -> Request PutJobSuccessResult
request = Service -> PutJobSuccessResult -> Request PutJobSuccessResult
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutJobSuccessResult
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PutJobSuccessResult)))
response =
AWSResponse PutJobSuccessResult
-> Logger
-> Service
-> Proxy PutJobSuccessResult
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PutJobSuccessResult)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse PutJobSuccessResult
PutJobSuccessResultResponse
PutJobSuccessResultResponse'
instance Prelude.Hashable PutJobSuccessResult
instance Prelude.NFData PutJobSuccessResult
instance Core.ToHeaders PutJobSuccessResult where
toHeaders :: PutJobSuccessResult -> [Header]
toHeaders =
[Header] -> PutJobSuccessResult -> [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
"CodePipeline_20150709.PutJobSuccessResult" ::
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 PutJobSuccessResult where
toJSON :: PutJobSuccessResult -> Value
toJSON PutJobSuccessResult' {Maybe Text
Maybe (HashMap Text Text)
Maybe CurrentRevision
Maybe ExecutionDetails
Text
jobId :: Text
currentRevision :: Maybe CurrentRevision
executionDetails :: Maybe ExecutionDetails
continuationToken :: Maybe Text
outputVariables :: Maybe (HashMap Text Text)
$sel:jobId:PutJobSuccessResult' :: PutJobSuccessResult -> Text
$sel:currentRevision:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe CurrentRevision
$sel:executionDetails:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe ExecutionDetails
$sel:continuationToken:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe Text
$sel:outputVariables:PutJobSuccessResult' :: PutJobSuccessResult -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"outputVariables" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
outputVariables,
(Text
"continuationToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
continuationToken,
(Text
"executionDetails" Text -> ExecutionDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ExecutionDetails -> Pair) -> Maybe ExecutionDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionDetails
executionDetails,
(Text
"currentRevision" Text -> CurrentRevision -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CurrentRevision -> Pair) -> Maybe CurrentRevision -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CurrentRevision
currentRevision,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"jobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)
]
)
instance Core.ToPath PutJobSuccessResult where
toPath :: PutJobSuccessResult -> ByteString
toPath = ByteString -> PutJobSuccessResult -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PutJobSuccessResult where
toQuery :: PutJobSuccessResult -> QueryString
toQuery = QueryString -> PutJobSuccessResult -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutJobSuccessResultResponse = PutJobSuccessResultResponse'
{
}
deriving (PutJobSuccessResultResponse -> PutJobSuccessResultResponse -> Bool
(PutJobSuccessResultResponse
-> PutJobSuccessResultResponse -> Bool)
-> (PutJobSuccessResultResponse
-> PutJobSuccessResultResponse -> Bool)
-> Eq PutJobSuccessResultResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutJobSuccessResultResponse -> PutJobSuccessResultResponse -> Bool
$c/= :: PutJobSuccessResultResponse -> PutJobSuccessResultResponse -> Bool
== :: PutJobSuccessResultResponse -> PutJobSuccessResultResponse -> Bool
$c== :: PutJobSuccessResultResponse -> PutJobSuccessResultResponse -> Bool
Prelude.Eq, ReadPrec [PutJobSuccessResultResponse]
ReadPrec PutJobSuccessResultResponse
Int -> ReadS PutJobSuccessResultResponse
ReadS [PutJobSuccessResultResponse]
(Int -> ReadS PutJobSuccessResultResponse)
-> ReadS [PutJobSuccessResultResponse]
-> ReadPrec PutJobSuccessResultResponse
-> ReadPrec [PutJobSuccessResultResponse]
-> Read PutJobSuccessResultResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutJobSuccessResultResponse]
$creadListPrec :: ReadPrec [PutJobSuccessResultResponse]
readPrec :: ReadPrec PutJobSuccessResultResponse
$creadPrec :: ReadPrec PutJobSuccessResultResponse
readList :: ReadS [PutJobSuccessResultResponse]
$creadList :: ReadS [PutJobSuccessResultResponse]
readsPrec :: Int -> ReadS PutJobSuccessResultResponse
$creadsPrec :: Int -> ReadS PutJobSuccessResultResponse
Prelude.Read, Int -> PutJobSuccessResultResponse -> ShowS
[PutJobSuccessResultResponse] -> ShowS
PutJobSuccessResultResponse -> String
(Int -> PutJobSuccessResultResponse -> ShowS)
-> (PutJobSuccessResultResponse -> String)
-> ([PutJobSuccessResultResponse] -> ShowS)
-> Show PutJobSuccessResultResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutJobSuccessResultResponse] -> ShowS
$cshowList :: [PutJobSuccessResultResponse] -> ShowS
show :: PutJobSuccessResultResponse -> String
$cshow :: PutJobSuccessResultResponse -> String
showsPrec :: Int -> PutJobSuccessResultResponse -> ShowS
$cshowsPrec :: Int -> PutJobSuccessResultResponse -> ShowS
Prelude.Show, (forall x.
PutJobSuccessResultResponse -> Rep PutJobSuccessResultResponse x)
-> (forall x.
Rep PutJobSuccessResultResponse x -> PutJobSuccessResultResponse)
-> Generic PutJobSuccessResultResponse
forall x.
Rep PutJobSuccessResultResponse x -> PutJobSuccessResultResponse
forall x.
PutJobSuccessResultResponse -> Rep PutJobSuccessResultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutJobSuccessResultResponse x -> PutJobSuccessResultResponse
$cfrom :: forall x.
PutJobSuccessResultResponse -> Rep PutJobSuccessResultResponse x
Prelude.Generic)
newPutJobSuccessResultResponse ::
PutJobSuccessResultResponse
newPutJobSuccessResultResponse :: PutJobSuccessResultResponse
newPutJobSuccessResultResponse =
PutJobSuccessResultResponse
PutJobSuccessResultResponse'
instance Prelude.NFData PutJobSuccessResultResponse