{-# 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.DimensionValues.Query
(
DimensionValuesQueryResource
, dimensionValuesQuery
, DimensionValuesQuery
, dvqProFileId
, dvqPayload
, dvqPageToken
, dvqMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type DimensionValuesQueryResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"dimensionvalues" :>
"query" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DimensionValueRequest :>
Post '[JSON] DimensionValueList
data DimensionValuesQuery = DimensionValuesQuery'
{ _dvqProFileId :: !(Textual Int64)
, _dvqPayload :: !DimensionValueRequest
, _dvqPageToken :: !(Maybe Text)
, _dvqMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
dimensionValuesQuery
:: Int64
-> DimensionValueRequest
-> DimensionValuesQuery
dimensionValuesQuery pDvqProFileId_ pDvqPayload_ =
DimensionValuesQuery'
{ _dvqProFileId = _Coerce # pDvqProFileId_
, _dvqPayload = pDvqPayload_
, _dvqPageToken = Nothing
, _dvqMaxResults = 100
}
dvqProFileId :: Lens' DimensionValuesQuery Int64
dvqProFileId
= lens _dvqProFileId (\ s a -> s{_dvqProFileId = a})
. _Coerce
dvqPayload :: Lens' DimensionValuesQuery DimensionValueRequest
dvqPayload
= lens _dvqPayload (\ s a -> s{_dvqPayload = a})
dvqPageToken :: Lens' DimensionValuesQuery (Maybe Text)
dvqPageToken
= lens _dvqPageToken (\ s a -> s{_dvqPageToken = a})
dvqMaxResults :: Lens' DimensionValuesQuery Int32
dvqMaxResults
= lens _dvqMaxResults
(\ s a -> s{_dvqMaxResults = a})
. _Coerce
instance GoogleRequest DimensionValuesQuery where
type Rs DimensionValuesQuery = DimensionValueList
type Scopes DimensionValuesQuery =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient DimensionValuesQuery'{..}
= go _dvqProFileId _dvqPageToken
(Just _dvqMaxResults)
(Just AltJSON)
_dvqPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy DimensionValuesQueryResource)
mempty