{-# 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.YouTubeAnalytics.Groups.Update
(
GroupsUpdateResource
, groupsUpdate
, GroupsUpdate
, guXgafv
, guUploadProtocol
, guAccessToken
, guUploadType
, guPayload
, guOnBehalfOfContentOwner
, guCallback
) where
import Network.Google.Prelude
import Network.Google.YouTubeAnalytics.Types
type GroupsUpdateResource =
"v2" :>
"groups" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "onBehalfOfContentOwner" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Put '[JSON] Group
data GroupsUpdate = GroupsUpdate'
{ _guXgafv :: !(Maybe Xgafv)
, _guUploadProtocol :: !(Maybe Text)
, _guAccessToken :: !(Maybe Text)
, _guUploadType :: !(Maybe Text)
, _guPayload :: !Group
, _guOnBehalfOfContentOwner :: !(Maybe Text)
, _guCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupsUpdate
:: Group
-> GroupsUpdate
groupsUpdate pGuPayload_ =
GroupsUpdate'
{ _guXgafv = Nothing
, _guUploadProtocol = Nothing
, _guAccessToken = Nothing
, _guUploadType = Nothing
, _guPayload = pGuPayload_
, _guOnBehalfOfContentOwner = Nothing
, _guCallback = Nothing
}
guXgafv :: Lens' GroupsUpdate (Maybe Xgafv)
guXgafv = lens _guXgafv (\ s a -> s{_guXgafv = a})
guUploadProtocol :: Lens' GroupsUpdate (Maybe Text)
guUploadProtocol
= lens _guUploadProtocol
(\ s a -> s{_guUploadProtocol = a})
guAccessToken :: Lens' GroupsUpdate (Maybe Text)
guAccessToken
= lens _guAccessToken
(\ s a -> s{_guAccessToken = a})
guUploadType :: Lens' GroupsUpdate (Maybe Text)
guUploadType
= lens _guUploadType (\ s a -> s{_guUploadType = a})
guPayload :: Lens' GroupsUpdate Group
guPayload
= lens _guPayload (\ s a -> s{_guPayload = a})
guOnBehalfOfContentOwner :: Lens' GroupsUpdate (Maybe Text)
guOnBehalfOfContentOwner
= lens _guOnBehalfOfContentOwner
(\ s a -> s{_guOnBehalfOfContentOwner = a})
guCallback :: Lens' GroupsUpdate (Maybe Text)
guCallback
= lens _guCallback (\ s a -> s{_guCallback = a})
instance GoogleRequest GroupsUpdate where
type Rs GroupsUpdate = Group
type Scopes GroupsUpdate =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/youtubepartner",
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"]
requestClient GroupsUpdate'{..}
= go _guXgafv _guUploadProtocol _guAccessToken
_guUploadType
_guOnBehalfOfContentOwner
_guCallback
(Just AltJSON)
_guPayload
youTubeAnalyticsService
where go
= buildClient (Proxy :: Proxy GroupsUpdateResource)
mempty