{-# 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.SQL.Operations.List
(
OperationsListResource
, operationsList
, OperationsList
, olProject
, olPageToken
, olMaxResults
, olInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type OperationsListResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"operations" :>
QueryParam "instance" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] OperationsListResponse
data OperationsList = OperationsList'
{ _olProject :: !Text
, _olPageToken :: !(Maybe Text)
, _olMaxResults :: !(Maybe (Textual Word32))
, _olInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
operationsList
:: Text
-> Text
-> OperationsList
operationsList pOlProject_ pOlInstance_ =
OperationsList'
{ _olProject = pOlProject_
, _olPageToken = Nothing
, _olMaxResults = Nothing
, _olInstance = pOlInstance_
}
olProject :: Lens' OperationsList Text
olProject
= lens _olProject (\ s a -> s{_olProject = a})
olPageToken :: Lens' OperationsList (Maybe Text)
olPageToken
= lens _olPageToken (\ s a -> s{_olPageToken = a})
olMaxResults :: Lens' OperationsList (Maybe Word32)
olMaxResults
= lens _olMaxResults (\ s a -> s{_olMaxResults = a})
. mapping _Coerce
olInstance :: Lens' OperationsList Text
olInstance
= lens _olInstance (\ s a -> s{_olInstance = a})
instance GoogleRequest OperationsList where
type Rs OperationsList = OperationsListResponse
type Scopes OperationsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient OperationsList'{..}
= go _olProject (Just _olInstance) _olPageToken
_olMaxResults
(Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy OperationsListResource)
mempty