{-# 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.CommentThreads.Update
(
CommentThreadsUpdateResource
, commentThreadsUpdate
, CommentThreadsUpdate
, ctuPart
, ctuPayload
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentThreadsUpdateResource =
"youtube" :>
"v3" :>
"commentThreads" :>
QueryParam "part" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CommentThread :>
Put '[JSON] CommentThread
data CommentThreadsUpdate = CommentThreadsUpdate'
{ _ctuPart :: !Text
, _ctuPayload :: !CommentThread
} deriving (Eq,Show,Data,Typeable,Generic)
commentThreadsUpdate
:: Text
-> CommentThread
-> CommentThreadsUpdate
commentThreadsUpdate pCtuPart_ pCtuPayload_ =
CommentThreadsUpdate'
{ _ctuPart = pCtuPart_
, _ctuPayload = pCtuPayload_
}
ctuPart :: Lens' CommentThreadsUpdate Text
ctuPart = lens _ctuPart (\ s a -> s{_ctuPart = a})
ctuPayload :: Lens' CommentThreadsUpdate CommentThread
ctuPayload
= lens _ctuPayload (\ s a -> s{_ctuPayload = a})
instance GoogleRequest CommentThreadsUpdate where
type Rs CommentThreadsUpdate = CommentThread
type Scopes CommentThreadsUpdate =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentThreadsUpdate'{..}
= go (Just _ctuPart) (Just AltJSON) _ctuPayload
youTubeService
where go
= buildClient
(Proxy :: Proxy CommentThreadsUpdateResource)
mempty