{-# 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.DFAReporting.ContentCategories.Update
(
ContentCategoriesUpdateResource
, contentCategoriesUpdate
, ContentCategoriesUpdate
, ccuProFileId
, ccuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ContentCategoriesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"contentCategories" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ContentCategory :>
Put '[JSON] ContentCategory
data ContentCategoriesUpdate = ContentCategoriesUpdate'
{ _ccuProFileId :: !(Textual Int64)
, _ccuPayload :: !ContentCategory
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategoriesUpdate
:: Int64
-> ContentCategory
-> ContentCategoriesUpdate
contentCategoriesUpdate pCcuProFileId_ pCcuPayload_ =
ContentCategoriesUpdate'
{ _ccuProFileId = _Coerce # pCcuProFileId_
, _ccuPayload = pCcuPayload_
}
ccuProFileId :: Lens' ContentCategoriesUpdate Int64
ccuProFileId
= lens _ccuProFileId (\ s a -> s{_ccuProFileId = a})
. _Coerce
ccuPayload :: Lens' ContentCategoriesUpdate ContentCategory
ccuPayload
= lens _ccuPayload (\ s a -> s{_ccuPayload = a})
instance GoogleRequest ContentCategoriesUpdate where
type Rs ContentCategoriesUpdate = ContentCategory
type Scopes ContentCategoriesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient ContentCategoriesUpdate'{..}
= go _ccuProFileId (Just AltJSON) _ccuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ContentCategoriesUpdateResource)
mempty