Skip to content

Commit

Permalink
Regenerating WorkSpaces from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed May 30, 2016
1 parent b9af316 commit b869bf0
Show file tree
Hide file tree
Showing 9 changed files with 404 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
135 changes: 135 additions & 0 deletions amazonka-workspaces/gen/Network/AWS/WorkSpaces/CreateTags.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module : Network.AWS.WorkSpaces.CreateTags
-- Copyright : (c) 2013-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates tags for a WorkSpace.
module Network.AWS.WorkSpaces.CreateTags
(
-- * Creating a Request
createTags
, CreateTags
-- * Request Lenses
, ctResourceId
, ctTags

-- * Destructuring the Response
, createTagsResponse
, CreateTagsResponse
-- * Response Lenses
, ctrsResponseStatus
) where

import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WorkSpaces.Types
import Network.AWS.WorkSpaces.Types.Product

-- | The request of the create tags action.
--
-- /See:/ 'createTags' smart constructor.
data CreateTags = CreateTags'
{ _ctResourceId :: !Text
, _ctTags :: ![Tag]
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateTags' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ctResourceId'
--
-- * 'ctTags'
createTags
:: Text -- ^ 'ctResourceId'
-> CreateTags
createTags pResourceId_ =
CreateTags'
{ _ctResourceId = pResourceId_
, _ctTags = mempty
}

-- | The resource ID of the request.
ctResourceId :: Lens' CreateTags Text
ctResourceId = lens _ctResourceId (\ s a -> s{_ctResourceId = a});

-- | The tags of the request.
ctTags :: Lens' CreateTags [Tag]
ctTags = lens _ctTags (\ s a -> s{_ctTags = a}) . _Coerce;

instance AWSRequest CreateTags where
type Rs CreateTags = CreateTagsResponse
request = postJSON workSpaces
response
= receiveEmpty
(\ s h x ->
CreateTagsResponse' <$> (pure (fromEnum s)))

instance Hashable CreateTags

instance NFData CreateTags

instance ToHeaders CreateTags where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("WorkspacesService.CreateTags" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])

instance ToJSON CreateTags where
toJSON CreateTags'{..}
= object
(catMaybes
[Just ("ResourceId" .= _ctResourceId),
Just ("Tags" .= _ctTags)])

instance ToPath CreateTags where
toPath = const "/"

instance ToQuery CreateTags where
toQuery = const mempty

-- | The result of the create tags action.
--
-- /See:/ 'createTagsResponse' smart constructor.
newtype CreateTagsResponse = CreateTagsResponse'
{ _ctrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateTagsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ctrsResponseStatus'
createTagsResponse
:: Int -- ^ 'ctrsResponseStatus'
-> CreateTagsResponse
createTagsResponse pResponseStatus_ =
CreateTagsResponse'
{ _ctrsResponseStatus = pResponseStatus_
}

-- | The response status code.
ctrsResponseStatus :: Lens' CreateTagsResponse Int
ctrsResponseStatus = lens _ctrsResponseStatus (\ s a -> s{_ctrsResponseStatus = a});

instance NFData CreateTagsResponse
135 changes: 135 additions & 0 deletions amazonka-workspaces/gen/Network/AWS/WorkSpaces/DeleteTags.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module : Network.AWS.WorkSpaces.DeleteTags
-- Copyright : (c) 2013-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes tags from a WorkSpace.
module Network.AWS.WorkSpaces.DeleteTags
(
-- * Creating a Request
deleteTags
, DeleteTags
-- * Request Lenses
, dResourceId
, dTagKeys

-- * Destructuring the Response
, deleteTagsResponse
, DeleteTagsResponse
-- * Response Lenses
, drsResponseStatus
) where

import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WorkSpaces.Types
import Network.AWS.WorkSpaces.Types.Product

-- | The request of the delete tags action.
--
-- /See:/ 'deleteTags' smart constructor.
data DeleteTags = DeleteTags'
{ _dResourceId :: !Text
, _dTagKeys :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'DeleteTags' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dResourceId'
--
-- * 'dTagKeys'
deleteTags
:: Text -- ^ 'dResourceId'
-> DeleteTags
deleteTags pResourceId_ =
DeleteTags'
{ _dResourceId = pResourceId_
, _dTagKeys = mempty
}

-- | The resource ID of the request.
dResourceId :: Lens' DeleteTags Text
dResourceId = lens _dResourceId (\ s a -> s{_dResourceId = a});

-- | The tag keys of the request.
dTagKeys :: Lens' DeleteTags [Text]
dTagKeys = lens _dTagKeys (\ s a -> s{_dTagKeys = a}) . _Coerce;

instance AWSRequest DeleteTags where
type Rs DeleteTags = DeleteTagsResponse
request = postJSON workSpaces
response
= receiveEmpty
(\ s h x ->
DeleteTagsResponse' <$> (pure (fromEnum s)))

instance Hashable DeleteTags

instance NFData DeleteTags

instance ToHeaders DeleteTags where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("WorkspacesService.DeleteTags" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])

instance ToJSON DeleteTags where
toJSON DeleteTags'{..}
= object
(catMaybes
[Just ("ResourceId" .= _dResourceId),
Just ("TagKeys" .= _dTagKeys)])

instance ToPath DeleteTags where
toPath = const "/"

instance ToQuery DeleteTags where
toQuery = const mempty

-- | The result of the delete tags action.
--
-- /See:/ 'deleteTagsResponse' smart constructor.
newtype DeleteTagsResponse = DeleteTagsResponse'
{ _drsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'DeleteTagsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'drsResponseStatus'
deleteTagsResponse
:: Int -- ^ 'drsResponseStatus'
-> DeleteTagsResponse
deleteTagsResponse pResponseStatus_ =
DeleteTagsResponse'
{ _drsResponseStatus = pResponseStatus_
}

-- | The response status code.
drsResponseStatus :: Lens' DeleteTagsResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});

instance NFData DeleteTagsResponse
Loading

0 comments on commit b869bf0

Please sign in to comment.