{-# 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.Pinpoint.GetExportJob
(
getExportJob
, GetExportJob
, gejApplicationId
, gejJobId
, getExportJobResponse
, GetExportJobResponse
, getrsResponseStatus
, getrsExportJobResponse
) where
import Network.AWS.Lens
import Network.AWS.Pinpoint.Types
import Network.AWS.Pinpoint.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetExportJob = GetExportJob'
{ _gejApplicationId :: !Text
, _gejJobId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getExportJob
:: Text
-> Text
-> GetExportJob
getExportJob pApplicationId_ pJobId_ =
GetExportJob' {_gejApplicationId = pApplicationId_, _gejJobId = pJobId_}
gejApplicationId :: Lens' GetExportJob Text
gejApplicationId = lens _gejApplicationId (\ s a -> s{_gejApplicationId = a})
gejJobId :: Lens' GetExportJob Text
gejJobId = lens _gejJobId (\ s a -> s{_gejJobId = a})
instance AWSRequest GetExportJob where
type Rs GetExportJob = GetExportJobResponse
request = get pinpoint
response
= receiveJSON
(\ s h x ->
GetExportJobResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable GetExportJob where
instance NFData GetExportJob where
instance ToHeaders GetExportJob where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetExportJob where
toPath GetExportJob'{..}
= mconcat
["/v1/apps/", toBS _gejApplicationId,
"/jobs/export/", toBS _gejJobId]
instance ToQuery GetExportJob where
toQuery = const mempty
data GetExportJobResponse = GetExportJobResponse'
{ _getrsResponseStatus :: !Int
, _getrsExportJobResponse :: !ExportJobResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getExportJobResponse
:: Int
-> ExportJobResponse
-> GetExportJobResponse
getExportJobResponse pResponseStatus_ pExportJobResponse_ =
GetExportJobResponse'
{ _getrsResponseStatus = pResponseStatus_
, _getrsExportJobResponse = pExportJobResponse_
}
getrsResponseStatus :: Lens' GetExportJobResponse Int
getrsResponseStatus = lens _getrsResponseStatus (\ s a -> s{_getrsResponseStatus = a})
getrsExportJobResponse :: Lens' GetExportJobResponse ExportJobResponse
getrsExportJobResponse = lens _getrsExportJobResponse (\ s a -> s{_getrsExportJobResponse = a})
instance NFData GetExportJobResponse where