{-# 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.Get
(
ContentCategoriesGetResource
, contentCategoriesGet
, ContentCategoriesGet
, ccgProFileId
, ccgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ContentCategoriesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"contentCategories" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ContentCategory
data ContentCategoriesGet = ContentCategoriesGet'
{ _ccgProFileId :: !(Textual Int64)
, _ccgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategoriesGet
:: Int64
-> Int64
-> ContentCategoriesGet
contentCategoriesGet pCcgProFileId_ pCcgId_ =
ContentCategoriesGet'
{ _ccgProFileId = _Coerce # pCcgProFileId_
, _ccgId = _Coerce # pCcgId_
}
ccgProFileId :: Lens' ContentCategoriesGet Int64
ccgProFileId
= lens _ccgProFileId (\ s a -> s{_ccgProFileId = a})
. _Coerce
ccgId :: Lens' ContentCategoriesGet Int64
ccgId
= lens _ccgId (\ s a -> s{_ccgId = a}) . _Coerce
instance GoogleRequest ContentCategoriesGet where
type Rs ContentCategoriesGet = ContentCategory
type Scopes ContentCategoriesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient ContentCategoriesGet'{..}
= go _ccgProFileId _ccgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ContentCategoriesGetResource)
mempty