{-# 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.Cities.List
(
CitiesListResource
, citiesList
, CitiesList
, citRegionDartIds
, citProFileId
, citNamePrefix
, citCountryDartIds
, citDartIds
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CitiesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"cities" :>
QueryParams "regionDartIds" (Textual Int64) :>
QueryParam "namePrefix" Text :>
QueryParams "countryDartIds" (Textual Int64) :>
QueryParams "dartIds" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CitiesListResponse
data CitiesList = CitiesList'
{ _citRegionDartIds :: !(Maybe [Textual Int64])
, _citProFileId :: !(Textual Int64)
, _citNamePrefix :: !(Maybe Text)
, _citCountryDartIds :: !(Maybe [Textual Int64])
, _citDartIds :: !(Maybe [Textual Int64])
} deriving (Eq,Show,Data,Typeable,Generic)
citiesList
:: Int64
-> CitiesList
citiesList pCitProFileId_ =
CitiesList'
{ _citRegionDartIds = Nothing
, _citProFileId = _Coerce # pCitProFileId_
, _citNamePrefix = Nothing
, _citCountryDartIds = Nothing
, _citDartIds = Nothing
}
citRegionDartIds :: Lens' CitiesList [Int64]
citRegionDartIds
= lens _citRegionDartIds
(\ s a -> s{_citRegionDartIds = a})
. _Default
. _Coerce
citProFileId :: Lens' CitiesList Int64
citProFileId
= lens _citProFileId (\ s a -> s{_citProFileId = a})
. _Coerce
citNamePrefix :: Lens' CitiesList (Maybe Text)
citNamePrefix
= lens _citNamePrefix
(\ s a -> s{_citNamePrefix = a})
citCountryDartIds :: Lens' CitiesList [Int64]
citCountryDartIds
= lens _citCountryDartIds
(\ s a -> s{_citCountryDartIds = a})
. _Default
. _Coerce
citDartIds :: Lens' CitiesList [Int64]
citDartIds
= lens _citDartIds (\ s a -> s{_citDartIds = a}) .
_Default
. _Coerce
instance GoogleRequest CitiesList where
type Rs CitiesList = CitiesListResponse
type Scopes CitiesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CitiesList'{..}
= go _citProFileId (_citRegionDartIds ^. _Default)
_citNamePrefix
(_citCountryDartIds ^. _Default)
(_citDartIds ^. _Default)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy CitiesListResource)
mempty