{-# 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.LiveChatBans.Insert
(
LiveChatBansInsertResource
, liveChatBansInsert
, LiveChatBansInsert
, lcbiPart
, lcbiPayload
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type LiveChatBansInsertResource =
"youtube" :>
"v3" :>
"liveChat" :>
"bans" :>
QueryParam "part" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LiveChatBan :>
Post '[JSON] LiveChatBan
data LiveChatBansInsert = LiveChatBansInsert'
{ _lcbiPart :: !Text
, _lcbiPayload :: !LiveChatBan
} deriving (Eq,Show,Data,Typeable,Generic)
liveChatBansInsert
:: Text
-> LiveChatBan
-> LiveChatBansInsert
liveChatBansInsert pLcbiPart_ pLcbiPayload_ =
LiveChatBansInsert'
{ _lcbiPart = pLcbiPart_
, _lcbiPayload = pLcbiPayload_
}
lcbiPart :: Lens' LiveChatBansInsert Text
lcbiPart = lens _lcbiPart (\ s a -> s{_lcbiPart = a})
lcbiPayload :: Lens' LiveChatBansInsert LiveChatBan
lcbiPayload
= lens _lcbiPayload (\ s a -> s{_lcbiPayload = a})
instance GoogleRequest LiveChatBansInsert where
type Rs LiveChatBansInsert = LiveChatBan
type Scopes LiveChatBansInsert =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient LiveChatBansInsert'{..}
= go (Just _lcbiPart) (Just AltJSON) _lcbiPayload
youTubeService
where go
= buildClient
(Proxy :: Proxy LiveChatBansInsertResource)
mempty