{-# 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.PutJobSuccessResult
(
putJobSuccessResult
, PutJobSuccessResult
, pjsrContinuationToken
, pjsrExecutionDetails
, pjsrCurrentRevision
, pjsrJobId
, putJobSuccessResultResponse
, PutJobSuccessResultResponse
) 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 PutJobSuccessResult = PutJobSuccessResult'
{ _pjsrContinuationToken :: !(Maybe Text)
, _pjsrExecutionDetails :: !(Maybe ExecutionDetails)
, _pjsrCurrentRevision :: !(Maybe CurrentRevision)
, _pjsrJobId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
putJobSuccessResult
:: Text
-> PutJobSuccessResult
putJobSuccessResult pJobId_ =
PutJobSuccessResult'
{ _pjsrContinuationToken = Nothing
, _pjsrExecutionDetails = Nothing
, _pjsrCurrentRevision = Nothing
, _pjsrJobId = pJobId_
}
pjsrContinuationToken :: Lens' PutJobSuccessResult (Maybe Text)
pjsrContinuationToken = lens _pjsrContinuationToken (\ s a -> s{_pjsrContinuationToken = a})
pjsrExecutionDetails :: Lens' PutJobSuccessResult (Maybe ExecutionDetails)
pjsrExecutionDetails = lens _pjsrExecutionDetails (\ s a -> s{_pjsrExecutionDetails = a})
pjsrCurrentRevision :: Lens' PutJobSuccessResult (Maybe CurrentRevision)
pjsrCurrentRevision = lens _pjsrCurrentRevision (\ s a -> s{_pjsrCurrentRevision = a})
pjsrJobId :: Lens' PutJobSuccessResult Text
pjsrJobId = lens _pjsrJobId (\ s a -> s{_pjsrJobId = a})
instance AWSRequest PutJobSuccessResult where
type Rs PutJobSuccessResult =
PutJobSuccessResultResponse
request = postJSON codePipeline
response = receiveNull PutJobSuccessResultResponse'
instance Hashable PutJobSuccessResult where
instance NFData PutJobSuccessResult where
instance ToHeaders PutJobSuccessResult where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodePipeline_20150709.PutJobSuccessResult" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON PutJobSuccessResult where
toJSON PutJobSuccessResult'{..}
= object
(catMaybes
[("continuationToken" .=) <$> _pjsrContinuationToken,
("executionDetails" .=) <$> _pjsrExecutionDetails,
("currentRevision" .=) <$> _pjsrCurrentRevision,
Just ("jobId" .= _pjsrJobId)])
instance ToPath PutJobSuccessResult where
toPath = const "/"
instance ToQuery PutJobSuccessResult where
toQuery = const mempty
data PutJobSuccessResultResponse =
PutJobSuccessResultResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
putJobSuccessResultResponse
:: PutJobSuccessResultResponse
putJobSuccessResultResponse = PutJobSuccessResultResponse'
instance NFData PutJobSuccessResultResponse where