{-# 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.Update
(
CommentsUpdateResource
, commentsUpdate
, CommentsUpdate
, cuPart
, cuPayload
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentsUpdateResource =
"youtube" :>
"v3" :>
"comments" :>
QueryParam "part" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Comment :> Put '[JSON] Comment
data CommentsUpdate = CommentsUpdate'
{ _cuPart :: !Text
, _cuPayload :: !Comment
} deriving (Eq,Show,Data,Typeable,Generic)
commentsUpdate
:: Text
-> Comment
-> CommentsUpdate
commentsUpdate pCuPart_ pCuPayload_ =
CommentsUpdate'
{ _cuPart = pCuPart_
, _cuPayload = pCuPayload_
}
cuPart :: Lens' CommentsUpdate Text
cuPart = lens _cuPart (\ s a -> s{_cuPart = a})
cuPayload :: Lens' CommentsUpdate Comment
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
instance GoogleRequest CommentsUpdate where
type Rs CommentsUpdate = Comment
type Scopes CommentsUpdate =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentsUpdate'{..}
= go (Just _cuPart) (Just AltJSON) _cuPayload
youTubeService
where go
= buildClient (Proxy :: Proxy CommentsUpdateResource)
mempty