{-# 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.Reports.CompatibleFields.Query
(
ReportsCompatibleFieldsQueryResource
, reportsCompatibleFieldsQuery
, ReportsCompatibleFieldsQuery
, rcfqProFileId
, rcfqPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsCompatibleFieldsQueryResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
"compatiblefields" :>
"query" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Report :>
Post '[JSON] CompatibleFields
data ReportsCompatibleFieldsQuery = ReportsCompatibleFieldsQuery'
{ _rcfqProFileId :: !(Textual Int64)
, _rcfqPayload :: !Report
} deriving (Eq,Show,Data,Typeable,Generic)
reportsCompatibleFieldsQuery
:: Int64
-> Report
-> ReportsCompatibleFieldsQuery
reportsCompatibleFieldsQuery pRcfqProFileId_ pRcfqPayload_ =
ReportsCompatibleFieldsQuery'
{ _rcfqProFileId = _Coerce # pRcfqProFileId_
, _rcfqPayload = pRcfqPayload_
}
rcfqProFileId :: Lens' ReportsCompatibleFieldsQuery Int64
rcfqProFileId
= lens _rcfqProFileId
(\ s a -> s{_rcfqProFileId = a})
. _Coerce
rcfqPayload :: Lens' ReportsCompatibleFieldsQuery Report
rcfqPayload
= lens _rcfqPayload (\ s a -> s{_rcfqPayload = a})
instance GoogleRequest ReportsCompatibleFieldsQuery
where
type Rs ReportsCompatibleFieldsQuery =
CompatibleFields
type Scopes ReportsCompatibleFieldsQuery =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsCompatibleFieldsQuery'{..}
= go _rcfqProFileId (Just AltJSON) _rcfqPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ReportsCompatibleFieldsQueryResource)
mempty