{-# 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.LiveChatModerators.Insert
(
LiveChatModeratorsInsertResource
, liveChatModeratorsInsert
, LiveChatModeratorsInsert
, lPart
, lPayload
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type LiveChatModeratorsInsertResource =
"youtube" :>
"v3" :>
"liveChat" :>
"moderators" :>
QueryParam "part" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LiveChatModerator :>
Post '[JSON] LiveChatModerator
data LiveChatModeratorsInsert = LiveChatModeratorsInsert'
{ _lPart :: !Text
, _lPayload :: !LiveChatModerator
} deriving (Eq,Show,Data,Typeable,Generic)
liveChatModeratorsInsert
:: Text
-> LiveChatModerator
-> LiveChatModeratorsInsert
liveChatModeratorsInsert pLPart_ pLPayload_ =
LiveChatModeratorsInsert'
{ _lPart = pLPart_
, _lPayload = pLPayload_
}
lPart :: Lens' LiveChatModeratorsInsert Text
lPart = lens _lPart (\ s a -> s{_lPart = a})
lPayload :: Lens' LiveChatModeratorsInsert LiveChatModerator
lPayload = lens _lPayload (\ s a -> s{_lPayload = a})
instance GoogleRequest LiveChatModeratorsInsert where
type Rs LiveChatModeratorsInsert = LiveChatModerator
type Scopes LiveChatModeratorsInsert =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient LiveChatModeratorsInsert'{..}
= go (Just _lPart) (Just AltJSON) _lPayload
youTubeService
where go
= buildClient
(Proxy :: Proxy LiveChatModeratorsInsertResource)
mempty