{-# 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.ElasticSearch.AddTags
(
addTags
, AddTags
, atARN
, atTagList
, addTagsResponse
, AddTagsResponse
) where
import Network.AWS.ElasticSearch.Types
import Network.AWS.ElasticSearch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AddTags = AddTags'
{ _atARN :: !Text
, _atTagList :: ![Tag]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
addTags
:: Text
-> AddTags
addTags pARN_ =
AddTags'
{ _atARN = pARN_
, _atTagList = mempty
}
atARN :: Lens' AddTags Text
atARN = lens _atARN (\ s a -> s{_atARN = a});
atTagList :: Lens' AddTags [Tag]
atTagList = lens _atTagList (\ s a -> s{_atTagList = a}) . _Coerce;
instance AWSRequest AddTags where
type Rs AddTags = AddTagsResponse
request = postJSON elasticSearch
response = receiveNull AddTagsResponse'
instance Hashable AddTags
instance NFData AddTags
instance ToHeaders AddTags where
toHeaders = const mempty
instance ToJSON AddTags where
toJSON AddTags'{..}
= object
(catMaybes
[Just ("ARN" .= _atARN),
Just ("TagList" .= _atTagList)])
instance ToPath AddTags where
toPath = const "/2015-01-01/tags"
instance ToQuery AddTags where
toQuery = const mempty
data AddTagsResponse =
AddTagsResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
addTagsResponse
:: AddTagsResponse
addTagsResponse = AddTagsResponse'
instance NFData AddTagsResponse