{-# 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.Index.Datasources.Get
(
StatsIndexDatasourcesGetResource
, statsIndexDatasourcesGet
, StatsIndexDatasourcesGet
, sidgFromDateMonth
, sidgXgafv
, sidgUploadProtocol
, sidgFromDateDay
, sidgAccessToken
, sidgUploadType
, sidgFromDateYear
, sidgName
, sidgToDateDay
, sidgToDateYear
, sidgToDateMonth
, sidgCallback
) where
import Network.Google.CloudSearch.Types
import Network.Google.Prelude
type StatsIndexDatasourcesGetResource =
"v1" :>
"stats" :>
"index" :>
Capture "name" Text :>
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] GetDataSourceIndexStatsResponse
data StatsIndexDatasourcesGet = StatsIndexDatasourcesGet'
{ _sidgFromDateMonth :: !(Maybe (Textual Int32))
, _sidgXgafv :: !(Maybe Xgafv)
, _sidgUploadProtocol :: !(Maybe Text)
, _sidgFromDateDay :: !(Maybe (Textual Int32))
, _sidgAccessToken :: !(Maybe Text)
, _sidgUploadType :: !(Maybe Text)
, _sidgFromDateYear :: !(Maybe (Textual Int32))
, _sidgName :: !Text
, _sidgToDateDay :: !(Maybe (Textual Int32))
, _sidgToDateYear :: !(Maybe (Textual Int32))
, _sidgToDateMonth :: !(Maybe (Textual Int32))
, _sidgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
statsIndexDatasourcesGet
:: Text
-> StatsIndexDatasourcesGet
statsIndexDatasourcesGet pSidgName_ =
StatsIndexDatasourcesGet'
{ _sidgFromDateMonth = Nothing
, _sidgXgafv = Nothing
, _sidgUploadProtocol = Nothing
, _sidgFromDateDay = Nothing
, _sidgAccessToken = Nothing
, _sidgUploadType = Nothing
, _sidgFromDateYear = Nothing
, _sidgName = pSidgName_
, _sidgToDateDay = Nothing
, _sidgToDateYear = Nothing
, _sidgToDateMonth = Nothing
, _sidgCallback = Nothing
}
sidgFromDateMonth :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgFromDateMonth
= lens _sidgFromDateMonth
(\ s a -> s{_sidgFromDateMonth = a})
. mapping _Coerce
sidgXgafv :: Lens' StatsIndexDatasourcesGet (Maybe Xgafv)
sidgXgafv
= lens _sidgXgafv (\ s a -> s{_sidgXgafv = a})
sidgUploadProtocol :: Lens' StatsIndexDatasourcesGet (Maybe Text)
sidgUploadProtocol
= lens _sidgUploadProtocol
(\ s a -> s{_sidgUploadProtocol = a})
sidgFromDateDay :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgFromDateDay
= lens _sidgFromDateDay
(\ s a -> s{_sidgFromDateDay = a})
. mapping _Coerce
sidgAccessToken :: Lens' StatsIndexDatasourcesGet (Maybe Text)
sidgAccessToken
= lens _sidgAccessToken
(\ s a -> s{_sidgAccessToken = a})
sidgUploadType :: Lens' StatsIndexDatasourcesGet (Maybe Text)
sidgUploadType
= lens _sidgUploadType
(\ s a -> s{_sidgUploadType = a})
sidgFromDateYear :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgFromDateYear
= lens _sidgFromDateYear
(\ s a -> s{_sidgFromDateYear = a})
. mapping _Coerce
sidgName :: Lens' StatsIndexDatasourcesGet Text
sidgName = lens _sidgName (\ s a -> s{_sidgName = a})
sidgToDateDay :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgToDateDay
= lens _sidgToDateDay
(\ s a -> s{_sidgToDateDay = a})
. mapping _Coerce
sidgToDateYear :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgToDateYear
= lens _sidgToDateYear
(\ s a -> s{_sidgToDateYear = a})
. mapping _Coerce
sidgToDateMonth :: Lens' StatsIndexDatasourcesGet (Maybe Int32)
sidgToDateMonth
= lens _sidgToDateMonth
(\ s a -> s{_sidgToDateMonth = a})
. mapping _Coerce
sidgCallback :: Lens' StatsIndexDatasourcesGet (Maybe Text)
sidgCallback
= lens _sidgCallback (\ s a -> s{_sidgCallback = a})
instance GoogleRequest StatsIndexDatasourcesGet where
type Rs StatsIndexDatasourcesGet =
GetDataSourceIndexStatsResponse
type Scopes StatsIndexDatasourcesGet =
'["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 StatsIndexDatasourcesGet'{..}
= go _sidgName _sidgFromDateMonth _sidgXgafv
_sidgUploadProtocol
_sidgFromDateDay
_sidgAccessToken
_sidgUploadType
_sidgFromDateYear
_sidgToDateDay
_sidgToDateYear
_sidgToDateMonth
_sidgCallback
(Just AltJSON)
cloudSearchService
where go
= buildClient
(Proxy :: Proxy StatsIndexDatasourcesGetResource)
mempty