{-# 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.AppStream.UntagResource
(
untagResource
, UntagResource
, urResourceARN
, urTagKeys
, untagResourceResponse
, UntagResourceResponse
, urrsResponseStatus
) where
import Network.AWS.AppStream.Types
import Network.AWS.AppStream.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UntagResource = UntagResource'
{ _urResourceARN :: !Text
, _urTagKeys :: !(List1 Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagResource
:: Text
-> NonEmpty Text
-> UntagResource
untagResource pResourceARN_ pTagKeys_ =
UntagResource'
{_urResourceARN = pResourceARN_, _urTagKeys = _List1 # pTagKeys_}
urResourceARN :: Lens' UntagResource Text
urResourceARN = lens _urResourceARN (\ s a -> s{_urResourceARN = a})
urTagKeys :: Lens' UntagResource (NonEmpty Text)
urTagKeys = lens _urTagKeys (\ s a -> s{_urTagKeys = a}) . _List1
instance AWSRequest UntagResource where
type Rs UntagResource = UntagResourceResponse
request = postJSON appStream
response
= receiveEmpty
(\ s h x ->
UntagResourceResponse' <$> (pure (fromEnum s)))
instance Hashable UntagResource where
instance NFData UntagResource where
instance ToHeaders UntagResource where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("PhotonAdminProxyService.UntagResource" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UntagResource where
toJSON UntagResource'{..}
= object
(catMaybes
[Just ("ResourceArn" .= _urResourceARN),
Just ("TagKeys" .= _urTagKeys)])
instance ToPath UntagResource where
toPath = const "/"
instance ToQuery UntagResource where
toQuery = const mempty
newtype UntagResourceResponse = UntagResourceResponse'
{ _urrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagResourceResponse
:: Int
-> UntagResourceResponse
untagResourceResponse pResponseStatus_ =
UntagResourceResponse' {_urrsResponseStatus = pResponseStatus_}
urrsResponseStatus :: Lens' UntagResourceResponse Int
urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a})
instance NFData UntagResourceResponse where