{-# 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.Batch.DeregisterJobDefinition
(
deregisterJobDefinition
, DeregisterJobDefinition
, djdJobDefinition
, deregisterJobDefinitionResponse
, DeregisterJobDefinitionResponse
, derrsResponseStatus
) where
import Network.AWS.Batch.Types
import Network.AWS.Batch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeregisterJobDefinition = DeregisterJobDefinition'
{ _djdJobDefinition :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deregisterJobDefinition
:: Text
-> DeregisterJobDefinition
deregisterJobDefinition pJobDefinition_ =
DeregisterJobDefinition' {_djdJobDefinition = pJobDefinition_}
djdJobDefinition :: Lens' DeregisterJobDefinition Text
djdJobDefinition = lens _djdJobDefinition (\ s a -> s{_djdJobDefinition = a})
instance AWSRequest DeregisterJobDefinition where
type Rs DeregisterJobDefinition =
DeregisterJobDefinitionResponse
request = postJSON batch
response
= receiveEmpty
(\ s h x ->
DeregisterJobDefinitionResponse' <$>
(pure (fromEnum s)))
instance Hashable DeregisterJobDefinition where
instance NFData DeregisterJobDefinition where
instance ToHeaders DeregisterJobDefinition where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeregisterJobDefinition where
toJSON DeregisterJobDefinition'{..}
= object
(catMaybes
[Just ("jobDefinition" .= _djdJobDefinition)])
instance ToPath DeregisterJobDefinition where
toPath = const "/v1/deregisterjobdefinition"
instance ToQuery DeregisterJobDefinition where
toQuery = const mempty
newtype DeregisterJobDefinitionResponse = DeregisterJobDefinitionResponse'
{ _derrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deregisterJobDefinitionResponse
:: Int
-> DeregisterJobDefinitionResponse
deregisterJobDefinitionResponse pResponseStatus_ =
DeregisterJobDefinitionResponse' {_derrsResponseStatus = pResponseStatus_}
derrsResponseStatus :: Lens' DeregisterJobDefinitionResponse Int
derrsResponseStatus = lens _derrsResponseStatus (\ s a -> s{_derrsResponseStatus = a})
instance NFData DeregisterJobDefinitionResponse where