{-# 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.Insert
(
DirectorySitesInsertResource
, directorySitesInsert
, DirectorySitesInsert
, dsiProFileId
, dsiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type DirectorySitesInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"directorySites" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DirectorySite :>
Post '[JSON] DirectorySite
data DirectorySitesInsert = DirectorySitesInsert'
{ _dsiProFileId :: !(Textual Int64)
, _dsiPayload :: !DirectorySite
} deriving (Eq,Show,Data,Typeable,Generic)
directorySitesInsert
:: Int64
-> DirectorySite
-> DirectorySitesInsert
directorySitesInsert pDsiProFileId_ pDsiPayload_ =
DirectorySitesInsert'
{ _dsiProFileId = _Coerce # pDsiProFileId_
, _dsiPayload = pDsiPayload_
}
dsiProFileId :: Lens' DirectorySitesInsert Int64
dsiProFileId
= lens _dsiProFileId (\ s a -> s{_dsiProFileId = a})
. _Coerce
dsiPayload :: Lens' DirectorySitesInsert DirectorySite
dsiPayload
= lens _dsiPayload (\ s a -> s{_dsiPayload = a})
instance GoogleRequest DirectorySitesInsert where
type Rs DirectorySitesInsert = DirectorySite
type Scopes DirectorySitesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient DirectorySitesInsert'{..}
= go _dsiProFileId (Just AltJSON) _dsiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy DirectorySitesInsertResource)
mempty