{-# 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.Videos.ReportAbuse
(
VideosReportAbuseResource
, videosReportAbuse
, VideosReportAbuse
, vraPayload
, vraOnBehalfOfContentOwner
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type VideosReportAbuseResource =
"youtube" :>
"v3" :>
"videos" :>
"reportAbuse" :>
QueryParam "onBehalfOfContentOwner" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] VideoAbuseReport :> Post '[JSON] ()
data VideosReportAbuse = VideosReportAbuse'
{ _vraPayload :: !VideoAbuseReport
, _vraOnBehalfOfContentOwner :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
videosReportAbuse
:: VideoAbuseReport
-> VideosReportAbuse
videosReportAbuse pVraPayload_ =
VideosReportAbuse'
{ _vraPayload = pVraPayload_
, _vraOnBehalfOfContentOwner = Nothing
}
vraPayload :: Lens' VideosReportAbuse VideoAbuseReport
vraPayload
= lens _vraPayload (\ s a -> s{_vraPayload = a})
vraOnBehalfOfContentOwner :: Lens' VideosReportAbuse (Maybe Text)
vraOnBehalfOfContentOwner
= lens _vraOnBehalfOfContentOwner
(\ s a -> s{_vraOnBehalfOfContentOwner = a})
instance GoogleRequest VideosReportAbuse where
type Rs VideosReportAbuse = ()
type Scopes VideosReportAbuse =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtubepartner"]
requestClient VideosReportAbuse'{..}
= go _vraOnBehalfOfContentOwner (Just AltJSON)
_vraPayload
youTubeService
where go
= buildClient
(Proxy :: Proxy VideosReportAbuseResource)
mempty