{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.YouTube.Comments.SetModerationStatus
(
CommentsSetModerationStatusResource
, commentsSetModerationStatus
, CommentsSetModerationStatus
, csmsBanAuthor
, csmsModerationStatus
, csmsId
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentsSetModerationStatusResource =
"youtube" :>
"v3" :>
"comments" :>
"setModerationStatus" :>
QueryParam "id" Text :>
QueryParam "moderationStatus"
CommentsSetModerationStatusModerationStatus
:>
QueryParam "banAuthor" Bool :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data CommentsSetModerationStatus = CommentsSetModerationStatus'
{ _csmsBanAuthor :: !Bool
, _csmsModerationStatus :: !CommentsSetModerationStatusModerationStatus
, _csmsId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
commentsSetModerationStatus
:: CommentsSetModerationStatusModerationStatus
-> Text
-> CommentsSetModerationStatus
commentsSetModerationStatus pCsmsModerationStatus_ pCsmsId_ =
CommentsSetModerationStatus'
{ _csmsBanAuthor = False
, _csmsModerationStatus = pCsmsModerationStatus_
, _csmsId = pCsmsId_
}
csmsBanAuthor :: Lens' CommentsSetModerationStatus Bool
csmsBanAuthor
= lens _csmsBanAuthor
(\ s a -> s{_csmsBanAuthor = a})
csmsModerationStatus :: Lens' CommentsSetModerationStatus CommentsSetModerationStatusModerationStatus
csmsModerationStatus
= lens _csmsModerationStatus
(\ s a -> s{_csmsModerationStatus = a})
csmsId :: Lens' CommentsSetModerationStatus Text
csmsId = lens _csmsId (\ s a -> s{_csmsId = a})
instance GoogleRequest CommentsSetModerationStatus
where
type Rs CommentsSetModerationStatus = ()
type Scopes CommentsSetModerationStatus =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentsSetModerationStatus'{..}
= go (Just _csmsId) (Just _csmsModerationStatus)
(Just _csmsBanAuthor)
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy CommentsSetModerationStatusResource)
mempty