{-# 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.CodeStar.UntagProject
(
untagProject
, UntagProject
, uId
, uTags
, untagProjectResponse
, UntagProjectResponse
, ursResponseStatus
) where
import Network.AWS.CodeStar.Types
import Network.AWS.CodeStar.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UntagProject = UntagProject'
{ _uId :: !Text
, _uTags :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagProject
:: Text
-> UntagProject
untagProject pId_ = UntagProject' {_uId = pId_, _uTags = mempty}
uId :: Lens' UntagProject Text
uId = lens _uId (\ s a -> s{_uId = a})
uTags :: Lens' UntagProject [Text]
uTags = lens _uTags (\ s a -> s{_uTags = a}) . _Coerce
instance AWSRequest UntagProject where
type Rs UntagProject = UntagProjectResponse
request = postJSON codeStar
response
= receiveEmpty
(\ s h x ->
UntagProjectResponse' <$> (pure (fromEnum s)))
instance Hashable UntagProject where
instance NFData UntagProject where
instance ToHeaders UntagProject where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeStar_20170419.UntagProject" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UntagProject where
toJSON UntagProject'{..}
= object
(catMaybes
[Just ("id" .= _uId), Just ("tags" .= _uTags)])
instance ToPath UntagProject where
toPath = const "/"
instance ToQuery UntagProject where
toQuery = const mempty
newtype UntagProjectResponse = UntagProjectResponse'
{ _ursResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagProjectResponse
:: Int
-> UntagProjectResponse
untagProjectResponse pResponseStatus_ =
UntagProjectResponse' {_ursResponseStatus = pResponseStatus_}
ursResponseStatus :: Lens' UntagProjectResponse Int
ursResponseStatus = lens _ursResponseStatus (\ s a -> s{_ursResponseStatus = a})
instance NFData UntagProjectResponse where