{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.CodePipeline.PutThirdPartyJobSuccessResult
(
putThirdPartyJobSuccessResult
, PutThirdPartyJobSuccessResult
, ptpjsrContinuationToken
, ptpjsrExecutionDetails
, ptpjsrCurrentRevision
, ptpjsrJobId
, ptpjsrClientToken
, putThirdPartyJobSuccessResultResponse
, PutThirdPartyJobSuccessResultResponse
) where
import Network.AWS.CodePipeline.Types
import Network.AWS.CodePipeline.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data PutThirdPartyJobSuccessResult = PutThirdPartyJobSuccessResult'
{ _ptpjsrContinuationToken :: !(Maybe Text)
, _ptpjsrExecutionDetails :: !(Maybe ExecutionDetails)
, _ptpjsrCurrentRevision :: !(Maybe CurrentRevision)
, _ptpjsrJobId :: !Text
, _ptpjsrClientToken :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
putThirdPartyJobSuccessResult
:: Text
-> Text
-> PutThirdPartyJobSuccessResult
putThirdPartyJobSuccessResult pJobId_ pClientToken_ =
PutThirdPartyJobSuccessResult'
{ _ptpjsrContinuationToken = Nothing
, _ptpjsrExecutionDetails = Nothing
, _ptpjsrCurrentRevision = Nothing
, _ptpjsrJobId = pJobId_
, _ptpjsrClientToken = pClientToken_
}
ptpjsrContinuationToken :: Lens' PutThirdPartyJobSuccessResult (Maybe Text)
ptpjsrContinuationToken = lens _ptpjsrContinuationToken (\ s a -> s{_ptpjsrContinuationToken = a});
ptpjsrExecutionDetails :: Lens' PutThirdPartyJobSuccessResult (Maybe ExecutionDetails)
ptpjsrExecutionDetails = lens _ptpjsrExecutionDetails (\ s a -> s{_ptpjsrExecutionDetails = a});
ptpjsrCurrentRevision :: Lens' PutThirdPartyJobSuccessResult (Maybe CurrentRevision)
ptpjsrCurrentRevision = lens _ptpjsrCurrentRevision (\ s a -> s{_ptpjsrCurrentRevision = a});
ptpjsrJobId :: Lens' PutThirdPartyJobSuccessResult Text
ptpjsrJobId = lens _ptpjsrJobId (\ s a -> s{_ptpjsrJobId = a});
ptpjsrClientToken :: Lens' PutThirdPartyJobSuccessResult Text
ptpjsrClientToken = lens _ptpjsrClientToken (\ s a -> s{_ptpjsrClientToken = a});
instance AWSRequest PutThirdPartyJobSuccessResult
where
type Rs PutThirdPartyJobSuccessResult =
PutThirdPartyJobSuccessResultResponse
request = postJSON codePipeline
response
= receiveNull PutThirdPartyJobSuccessResultResponse'
instance Hashable PutThirdPartyJobSuccessResult
instance NFData PutThirdPartyJobSuccessResult
instance ToHeaders PutThirdPartyJobSuccessResult
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodePipeline_20150709.PutThirdPartyJobSuccessResult"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON PutThirdPartyJobSuccessResult where
toJSON PutThirdPartyJobSuccessResult'{..}
= object
(catMaybes
[("continuationToken" .=) <$>
_ptpjsrContinuationToken,
("executionDetails" .=) <$> _ptpjsrExecutionDetails,
("currentRevision" .=) <$> _ptpjsrCurrentRevision,
Just ("jobId" .= _ptpjsrJobId),
Just ("clientToken" .= _ptpjsrClientToken)])
instance ToPath PutThirdPartyJobSuccessResult where
toPath = const "/"
instance ToQuery PutThirdPartyJobSuccessResult where
toQuery = const mempty
data PutThirdPartyJobSuccessResultResponse =
PutThirdPartyJobSuccessResultResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
putThirdPartyJobSuccessResultResponse
:: PutThirdPartyJobSuccessResultResponse
putThirdPartyJobSuccessResultResponse = PutThirdPartyJobSuccessResultResponse'
instance NFData PutThirdPartyJobSuccessResultResponse