{-# 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.DirectorySites.Get
(
DirectorySitesGetResource
, directorySitesGet
, DirectorySitesGet
, dsgProFileId
, dsgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type DirectorySitesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"directorySites" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] DirectorySite
data DirectorySitesGet = DirectorySitesGet'
{ _dsgProFileId :: !(Textual Int64)
, _dsgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
directorySitesGet
:: Int64
-> Int64
-> DirectorySitesGet
directorySitesGet pDsgProFileId_ pDsgId_ =
DirectorySitesGet'
{ _dsgProFileId = _Coerce # pDsgProFileId_
, _dsgId = _Coerce # pDsgId_
}
dsgProFileId :: Lens' DirectorySitesGet Int64
dsgProFileId
= lens _dsgProFileId (\ s a -> s{_dsgProFileId = a})
. _Coerce
dsgId :: Lens' DirectorySitesGet Int64
dsgId
= lens _dsgId (\ s a -> s{_dsgId = a}) . _Coerce
instance GoogleRequest DirectorySitesGet where
type Rs DirectorySitesGet = DirectorySite
type Scopes DirectorySitesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient DirectorySitesGet'{..}
= go _dsgProFileId _dsgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy DirectorySitesGetResource)
mempty