{-# 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.Sites.Get
(
SitesGetResource
, sitesGet
, SitesGet
, sggProFileId
, sggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type SitesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"sites" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Site
data SitesGet = SitesGet'
{ _sggProFileId :: !(Textual Int64)
, _sggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesGet
:: Int64
-> Int64
-> SitesGet
sitesGet pSggProFileId_ pSggId_ =
SitesGet'
{ _sggProFileId = _Coerce # pSggProFileId_
, _sggId = _Coerce # pSggId_
}
sggProFileId :: Lens' SitesGet Int64
sggProFileId
= lens _sggProFileId (\ s a -> s{_sggProFileId = a})
. _Coerce
sggId :: Lens' SitesGet Int64
sggId
= lens _sggId (\ s a -> s{_sggId = a}) . _Coerce
instance GoogleRequest SitesGet where
type Rs SitesGet = Site
type Scopes SitesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient SitesGet'{..}
= go _sggProFileId _sggId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy SitesGetResource)
mempty