module Network.AWS.Route53.UpdateHostedZoneComment
(
updateHostedZoneComment
, UpdateHostedZoneComment
, uhzcComment
, uhzcId
, updateHostedZoneCommentResponse
, UpdateHostedZoneCommentResponse
, uhzcrsResponseStatus
, uhzcrsHostedZone
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data UpdateHostedZoneComment = UpdateHostedZoneComment'
{ _uhzcComment :: !(Maybe Text)
, _uhzcId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateHostedZoneComment
:: Text
-> UpdateHostedZoneComment
updateHostedZoneComment pId_ =
UpdateHostedZoneComment'
{ _uhzcComment = Nothing
, _uhzcId = pId_
}
uhzcComment :: Lens' UpdateHostedZoneComment (Maybe Text)
uhzcComment = lens _uhzcComment (\ s a -> s{_uhzcComment = a});
uhzcId :: Lens' UpdateHostedZoneComment Text
uhzcId = lens _uhzcId (\ s a -> s{_uhzcId = a});
instance AWSRequest UpdateHostedZoneComment where
type Rs UpdateHostedZoneComment =
UpdateHostedZoneCommentResponse
request = postXML route53
response
= receiveXML
(\ s h x ->
UpdateHostedZoneCommentResponse' <$>
(pure (fromEnum s)) <*> (x .@ "HostedZone"))
instance ToElement UpdateHostedZoneComment where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}UpdateHostedZoneCommentRequest"
instance ToHeaders UpdateHostedZoneComment where
toHeaders = const mempty
instance ToPath UpdateHostedZoneComment where
toPath UpdateHostedZoneComment'{..}
= mconcat ["/2013-04-01/hostedzone/", toBS _uhzcId]
instance ToQuery UpdateHostedZoneComment where
toQuery = const mempty
instance ToXML UpdateHostedZoneComment where
toXML UpdateHostedZoneComment'{..}
= mconcat ["Comment" @= _uhzcComment]
data UpdateHostedZoneCommentResponse = UpdateHostedZoneCommentResponse'
{ _uhzcrsResponseStatus :: !Int
, _uhzcrsHostedZone :: !HostedZone
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateHostedZoneCommentResponse
:: Int
-> HostedZone
-> UpdateHostedZoneCommentResponse
updateHostedZoneCommentResponse pResponseStatus_ pHostedZone_ =
UpdateHostedZoneCommentResponse'
{ _uhzcrsResponseStatus = pResponseStatus_
, _uhzcrsHostedZone = pHostedZone_
}
uhzcrsResponseStatus :: Lens' UpdateHostedZoneCommentResponse Int
uhzcrsResponseStatus = lens _uhzcrsResponseStatus (\ s a -> s{_uhzcrsResponseStatus = a});
uhzcrsHostedZone :: Lens' UpdateHostedZoneCommentResponse HostedZone
uhzcrsHostedZone = lens _uhzcrsHostedZone (\ s a -> s{_uhzcrsHostedZone = a});