{-# 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.Prediction.TrainedModels.List
(
TrainedModelsListResource
, trainedModelsList
, TrainedModelsList
, tmlProject
, tmlPageToken
, tmlMaxResults
) where
import Network.Google.Prediction.Types
import Network.Google.Prelude
type TrainedModelsListResource =
"prediction" :>
"v1.6" :>
"projects" :>
Capture "project" Text :>
"trainedmodels" :>
"list" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] List
data TrainedModelsList = TrainedModelsList'
{ _tmlProject :: !Text
, _tmlPageToken :: !(Maybe Text)
, _tmlMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
trainedModelsList
:: Text
-> TrainedModelsList
trainedModelsList pTmlProject_ =
TrainedModelsList'
{ _tmlProject = pTmlProject_
, _tmlPageToken = Nothing
, _tmlMaxResults = Nothing
}
tmlProject :: Lens' TrainedModelsList Text
tmlProject
= lens _tmlProject (\ s a -> s{_tmlProject = a})
tmlPageToken :: Lens' TrainedModelsList (Maybe Text)
tmlPageToken
= lens _tmlPageToken (\ s a -> s{_tmlPageToken = a})
tmlMaxResults :: Lens' TrainedModelsList (Maybe Word32)
tmlMaxResults
= lens _tmlMaxResults
(\ s a -> s{_tmlMaxResults = a})
. mapping _Coerce
instance GoogleRequest TrainedModelsList where
type Rs TrainedModelsList = List
type Scopes TrainedModelsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/prediction"]
requestClient TrainedModelsList'{..}
= go _tmlProject _tmlPageToken _tmlMaxResults
(Just AltJSON)
predictionService
where go
= buildClient
(Proxy :: Proxy TrainedModelsListResource)
mempty