{-# 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.CloudSearch.Stats.GetIndex
(
StatsGetIndexResource
, statsGetIndex
, StatsGetIndex
, sgiFromDateMonth
, sgiXgafv
, sgiUploadProtocol
, sgiFromDateDay
, sgiAccessToken
, sgiUploadType
, sgiFromDateYear
, sgiToDateDay
, sgiToDateYear
, sgiToDateMonth
, sgiCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type StatsGetIndexResource =
"v1" :>
"stats" :>
"index" :>
QueryParam "fromDate.month" (Textual Int32) :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "fromDate.day" (Textual Int32) :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "fromDate.year" (Textual Int32) :>
QueryParam "toDate.day" (Textual Int32) :>
QueryParam "toDate.year" (Textual Int32) :>
QueryParam "toDate.month" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetCustomerIndexStatsResponse
data StatsGetIndex = StatsGetIndex'
{ _sgiFromDateMonth :: !(Maybe (Textual Int32))
, _sgiXgafv :: !(Maybe Xgafv)
, _sgiUploadProtocol :: !(Maybe Text)
, _sgiFromDateDay :: !(Maybe (Textual Int32))
, _sgiAccessToken :: !(Maybe Text)
, _sgiUploadType :: !(Maybe Text)
, _sgiFromDateYear :: !(Maybe (Textual Int32))
, _sgiToDateDay :: !(Maybe (Textual Int32))
, _sgiToDateYear :: !(Maybe (Textual Int32))
, _sgiToDateMonth :: !(Maybe (Textual Int32))
, _sgiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
statsGetIndex
:: StatsGetIndex
statsGetIndex =
StatsGetIndex'
{ _sgiFromDateMonth = Nothing
, _sgiXgafv = Nothing
, _sgiUploadProtocol = Nothing
, _sgiFromDateDay = Nothing
, _sgiAccessToken = Nothing
, _sgiUploadType = Nothing
, _sgiFromDateYear = Nothing
, _sgiToDateDay = Nothing
, _sgiToDateYear = Nothing
, _sgiToDateMonth = Nothing
, _sgiCallback = Nothing
}
sgiFromDateMonth :: Lens' StatsGetIndex (Maybe Int32)
sgiFromDateMonth
= lens _sgiFromDateMonth
(\ s a -> s{_sgiFromDateMonth = a})
. mapping _Coerce
sgiXgafv :: Lens' StatsGetIndex (Maybe Xgafv)
sgiXgafv = lens _sgiXgafv (\ s a -> s{_sgiXgafv = a})
sgiUploadProtocol :: Lens' StatsGetIndex (Maybe Text)
sgiUploadProtocol
= lens _sgiUploadProtocol
(\ s a -> s{_sgiUploadProtocol = a})
sgiFromDateDay :: Lens' StatsGetIndex (Maybe Int32)
sgiFromDateDay
= lens _sgiFromDateDay
(\ s a -> s{_sgiFromDateDay = a})
. mapping _Coerce
sgiAccessToken :: Lens' StatsGetIndex (Maybe Text)
sgiAccessToken
= lens _sgiAccessToken
(\ s a -> s{_sgiAccessToken = a})
sgiUploadType :: Lens' StatsGetIndex (Maybe Text)
sgiUploadType
= lens _sgiUploadType
(\ s a -> s{_sgiUploadType = a})
sgiFromDateYear :: Lens' StatsGetIndex (Maybe Int32)
sgiFromDateYear
= lens _sgiFromDateYear
(\ s a -> s{_sgiFromDateYear = a})
. mapping _Coerce
sgiToDateDay :: Lens' StatsGetIndex (Maybe Int32)
sgiToDateDay
= lens _sgiToDateDay (\ s a -> s{_sgiToDateDay = a})
. mapping _Coerce
sgiToDateYear :: Lens' StatsGetIndex (Maybe Int32)
sgiToDateYear
= lens _sgiToDateYear
(\ s a -> s{_sgiToDateYear = a})
. mapping _Coerce
sgiToDateMonth :: Lens' StatsGetIndex (Maybe Int32)
sgiToDateMonth
= lens _sgiToDateMonth
(\ s a -> s{_sgiToDateMonth = a})
. mapping _Coerce
sgiCallback :: Lens' StatsGetIndex (Maybe Text)
sgiCallback
= lens _sgiCallback (\ s a -> s{_sgiCallback = a})
instance GoogleRequest StatsGetIndex where
type Rs StatsGetIndex = GetCustomerIndexStatsResponse
type Scopes StatsGetIndex =
'["https://www.googleapis.com/auth/cloud_search",
"https://www.googleapis.com/auth/cloud_search.stats",
"https://www.googleapis.com/auth/cloud_search.stats.indexing"]
requestClient StatsGetIndex'{..}
= go _sgiFromDateMonth _sgiXgafv _sgiUploadProtocol
_sgiFromDateDay
_sgiAccessToken
_sgiUploadType
_sgiFromDateYear
_sgiToDateDay
_sgiToDateYear
_sgiToDateMonth
_sgiCallback
(Just AltJSON)
cloudSearchService
where go
= buildClient (Proxy :: Proxy StatsGetIndexResource)
mempty