{-# 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.Route53AutoNaming.DeleteService
(
deleteService
, DeleteService
, dsId
, deleteServiceResponse
, DeleteServiceResponse
, dsrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53AutoNaming.Types
import Network.AWS.Route53AutoNaming.Types.Product
newtype DeleteService = DeleteService'
{ _dsId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteService
:: Text
-> DeleteService
deleteService pId_ = DeleteService' {_dsId = pId_}
dsId :: Lens' DeleteService Text
dsId = lens _dsId (\ s a -> s{_dsId = a})
instance AWSRequest DeleteService where
type Rs DeleteService = DeleteServiceResponse
request = postJSON route53AutoNaming
response
= receiveEmpty
(\ s h x ->
DeleteServiceResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteService where
instance NFData DeleteService where
instance ToHeaders DeleteService where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53AutoNaming_v20170314.DeleteService" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteService where
toJSON DeleteService'{..}
= object (catMaybes [Just ("Id" .= _dsId)])
instance ToPath DeleteService where
toPath = const "/"
instance ToQuery DeleteService where
toQuery = const mempty
newtype DeleteServiceResponse = DeleteServiceResponse'
{ _dsrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteServiceResponse
:: Int
-> DeleteServiceResponse
deleteServiceResponse pResponseStatus_ =
DeleteServiceResponse' {_dsrsResponseStatus = pResponseStatus_}
dsrsResponseStatus :: Lens' DeleteServiceResponse Int
dsrsResponseStatus = lens _dsrsResponseStatus (\ s a -> s{_dsrsResponseStatus = a})
instance NFData DeleteServiceResponse where