{-# 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.CloudDirectory.DetachTypedLink
(
detachTypedLink
, DetachTypedLink
, dtlDirectoryARN
, dtlTypedLinkSpecifier
, detachTypedLinkResponse
, DetachTypedLinkResponse
) where
import Network.AWS.CloudDirectory.Types
import Network.AWS.CloudDirectory.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DetachTypedLink = DetachTypedLink'
{ _dtlDirectoryARN :: !Text
, _dtlTypedLinkSpecifier :: !TypedLinkSpecifier
} deriving (Eq, Read, Show, Data, Typeable, Generic)
detachTypedLink
:: Text
-> TypedLinkSpecifier
-> DetachTypedLink
detachTypedLink pDirectoryARN_ pTypedLinkSpecifier_ =
DetachTypedLink'
{ _dtlDirectoryARN = pDirectoryARN_
, _dtlTypedLinkSpecifier = pTypedLinkSpecifier_
}
dtlDirectoryARN :: Lens' DetachTypedLink Text
dtlDirectoryARN = lens _dtlDirectoryARN (\ s a -> s{_dtlDirectoryARN = a})
dtlTypedLinkSpecifier :: Lens' DetachTypedLink TypedLinkSpecifier
dtlTypedLinkSpecifier = lens _dtlTypedLinkSpecifier (\ s a -> s{_dtlTypedLinkSpecifier = a})
instance AWSRequest DetachTypedLink where
type Rs DetachTypedLink = DetachTypedLinkResponse
request = putJSON cloudDirectory
response = receiveNull DetachTypedLinkResponse'
instance Hashable DetachTypedLink where
instance NFData DetachTypedLink where
instance ToHeaders DetachTypedLink where
toHeaders DetachTypedLink'{..}
= mconcat
["x-amz-data-partition" =# _dtlDirectoryARN]
instance ToJSON DetachTypedLink where
toJSON DetachTypedLink'{..}
= object
(catMaybes
[Just
("TypedLinkSpecifier" .= _dtlTypedLinkSpecifier)])
instance ToPath DetachTypedLink where
toPath
= const
"/amazonclouddirectory/2017-01-11/typedlink/detach"
instance ToQuery DetachTypedLink where
toQuery = const mempty
data DetachTypedLinkResponse =
DetachTypedLinkResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
detachTypedLinkResponse
:: DetachTypedLinkResponse
detachTypedLinkResponse = DetachTypedLinkResponse'
instance NFData DetachTypedLinkResponse where