module Network.AWS.CodePipeline.AcknowledgeThirdPartyJob
(
acknowledgeThirdPartyJob
, AcknowledgeThirdPartyJob
, atpjJobId
, atpjNonce
, atpjClientToken
, acknowledgeThirdPartyJobResponse
, AcknowledgeThirdPartyJobResponse
, atpjrsStatus
) where
import Network.AWS.CodePipeline.Types
import Network.AWS.CodePipeline.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AcknowledgeThirdPartyJob = AcknowledgeThirdPartyJob'
{ _atpjJobId :: !Text
, _atpjNonce :: !Text
, _atpjClientToken :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
acknowledgeThirdPartyJob
:: Text
-> Text
-> Text
-> AcknowledgeThirdPartyJob
acknowledgeThirdPartyJob pJobId_ pNonce_ pClientToken_ =
AcknowledgeThirdPartyJob'
{ _atpjJobId = pJobId_
, _atpjNonce = pNonce_
, _atpjClientToken = pClientToken_
}
atpjJobId :: Lens' AcknowledgeThirdPartyJob Text
atpjJobId = lens _atpjJobId (\ s a -> s{_atpjJobId = a});
atpjNonce :: Lens' AcknowledgeThirdPartyJob Text
atpjNonce = lens _atpjNonce (\ s a -> s{_atpjNonce = a});
atpjClientToken :: Lens' AcknowledgeThirdPartyJob Text
atpjClientToken = lens _atpjClientToken (\ s a -> s{_atpjClientToken = a});
instance AWSRequest AcknowledgeThirdPartyJob where
type Sv AcknowledgeThirdPartyJob = CodePipeline
type Rs AcknowledgeThirdPartyJob =
AcknowledgeThirdPartyJobResponse
request = postJSON
response
= receiveEmpty
(\ s h x ->
AcknowledgeThirdPartyJobResponse' <$>
(pure (fromEnum s)))
instance ToHeaders AcknowledgeThirdPartyJob where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodePipeline_20150709.AcknowledgeThirdPartyJob" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON AcknowledgeThirdPartyJob where
toJSON AcknowledgeThirdPartyJob'{..}
= object
["jobId" .= _atpjJobId, "nonce" .= _atpjNonce,
"clientToken" .= _atpjClientToken]
instance ToPath AcknowledgeThirdPartyJob where
toPath = const "/"
instance ToQuery AcknowledgeThirdPartyJob where
toQuery = const mempty
newtype AcknowledgeThirdPartyJobResponse = AcknowledgeThirdPartyJobResponse'
{ _atpjrsStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
acknowledgeThirdPartyJobResponse
:: Int
-> AcknowledgeThirdPartyJobResponse
acknowledgeThirdPartyJobResponse pStatus_ =
AcknowledgeThirdPartyJobResponse'
{ _atpjrsStatus = pStatus_
}
atpjrsStatus :: Lens' AcknowledgeThirdPartyJobResponse Int
atpjrsStatus = lens _atpjrsStatus (\ s a -> s{_atpjrsStatus = a});