module Network.AWS.CodePipeline.GetThirdPartyJobDetails
(
getThirdPartyJobDetails
, GetThirdPartyJobDetails
, gtpjdJobId
, gtpjdClientToken
, getThirdPartyJobDetailsResponse
, GetThirdPartyJobDetailsResponse
, gtpjdrsJobDetails
, gtpjdrsResponseStatus
) 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 GetThirdPartyJobDetails = GetThirdPartyJobDetails'
{ _gtpjdJobId :: !Text
, _gtpjdClientToken :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getThirdPartyJobDetails
:: Text
-> Text
-> GetThirdPartyJobDetails
getThirdPartyJobDetails pJobId_ pClientToken_ =
GetThirdPartyJobDetails'
{ _gtpjdJobId = pJobId_
, _gtpjdClientToken = pClientToken_
}
gtpjdJobId :: Lens' GetThirdPartyJobDetails Text
gtpjdJobId = lens _gtpjdJobId (\ s a -> s{_gtpjdJobId = a});
gtpjdClientToken :: Lens' GetThirdPartyJobDetails Text
gtpjdClientToken = lens _gtpjdClientToken (\ s a -> s{_gtpjdClientToken = a});
instance AWSRequest GetThirdPartyJobDetails where
type Rs GetThirdPartyJobDetails =
GetThirdPartyJobDetailsResponse
request = postJSON codePipeline
response
= receiveJSON
(\ s h x ->
GetThirdPartyJobDetailsResponse' <$>
(x .?> "jobDetails") <*> (pure (fromEnum s)))
instance ToHeaders GetThirdPartyJobDetails where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodePipeline_20150709.GetThirdPartyJobDetails" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetThirdPartyJobDetails where
toJSON GetThirdPartyJobDetails'{..}
= object
(catMaybes
[Just ("jobId" .= _gtpjdJobId),
Just ("clientToken" .= _gtpjdClientToken)])
instance ToPath GetThirdPartyJobDetails where
toPath = const "/"
instance ToQuery GetThirdPartyJobDetails where
toQuery = const mempty
data GetThirdPartyJobDetailsResponse = GetThirdPartyJobDetailsResponse'
{ _gtpjdrsJobDetails :: !(Maybe ThirdPartyJobDetails)
, _gtpjdrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getThirdPartyJobDetailsResponse
:: Int
-> GetThirdPartyJobDetailsResponse
getThirdPartyJobDetailsResponse pResponseStatus_ =
GetThirdPartyJobDetailsResponse'
{ _gtpjdrsJobDetails = Nothing
, _gtpjdrsResponseStatus = pResponseStatus_
}
gtpjdrsJobDetails :: Lens' GetThirdPartyJobDetailsResponse (Maybe ThirdPartyJobDetails)
gtpjdrsJobDetails = lens _gtpjdrsJobDetails (\ s a -> s{_gtpjdrsJobDetails = a});
gtpjdrsResponseStatus :: Lens' GetThirdPartyJobDetailsResponse Int
gtpjdrsResponseStatus = lens _gtpjdrsResponseStatus (\ s a -> s{_gtpjdrsResponseStatus = a});