module Network.AWS.Glue.ImportCatalogToGlue
(
importCatalogToGlue
, ImportCatalogToGlue
, ictgCatalogId
, importCatalogToGlueResponse
, ImportCatalogToGlueResponse
, ictgrsResponseStatus
) where
import Network.AWS.Glue.Types
import Network.AWS.Glue.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype ImportCatalogToGlue = ImportCatalogToGlue'
{ _ictgCatalogId :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importCatalogToGlue
:: ImportCatalogToGlue
importCatalogToGlue = ImportCatalogToGlue' {_ictgCatalogId = Nothing}
ictgCatalogId :: Lens' ImportCatalogToGlue (Maybe Text)
ictgCatalogId = lens _ictgCatalogId (\ s a -> s{_ictgCatalogId = a});
instance AWSRequest ImportCatalogToGlue where
type Rs ImportCatalogToGlue =
ImportCatalogToGlueResponse
request = postJSON glue
response
= receiveEmpty
(\ s h x ->
ImportCatalogToGlueResponse' <$> (pure (fromEnum s)))
instance Hashable ImportCatalogToGlue where
instance NFData ImportCatalogToGlue where
instance ToHeaders ImportCatalogToGlue where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSGlue.ImportCatalogToGlue" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON ImportCatalogToGlue where
toJSON ImportCatalogToGlue'{..}
= object
(catMaybes [("CatalogId" .=) <$> _ictgCatalogId])
instance ToPath ImportCatalogToGlue where
toPath = const "/"
instance ToQuery ImportCatalogToGlue where
toQuery = const mempty
newtype ImportCatalogToGlueResponse = ImportCatalogToGlueResponse'
{ _ictgrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importCatalogToGlueResponse
:: Int
-> ImportCatalogToGlueResponse
importCatalogToGlueResponse pResponseStatus_ =
ImportCatalogToGlueResponse' {_ictgrsResponseStatus = pResponseStatus_}
ictgrsResponseStatus :: Lens' ImportCatalogToGlueResponse Int
ictgrsResponseStatus = lens _ictgrsResponseStatus (\ s a -> s{_ictgrsResponseStatus = a});
instance NFData ImportCatalogToGlueResponse where