{-# 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.ServiceUsage.Services.List
(
ServicesListResource
, servicesList
, ServicesList
, slParent
, slXgafv
, slUploadProtocol
, slAccessToken
, slUploadType
, slFilter
, slPageToken
, slPageSize
, slCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUsage.Types
type ServicesListResource =
"v1" :>
Capture "parent" Text :>
"services" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "filter" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListServicesResponse
data ServicesList = ServicesList'
{ _slParent :: !Text
, _slXgafv :: !(Maybe Xgafv)
, _slUploadProtocol :: !(Maybe Text)
, _slAccessToken :: !(Maybe Text)
, _slUploadType :: !(Maybe Text)
, _slFilter :: !(Maybe Text)
, _slPageToken :: !(Maybe Text)
, _slPageSize :: !(Maybe (Textual Int32))
, _slCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesList
:: Text
-> ServicesList
servicesList pSlParent_ =
ServicesList'
{ _slParent = pSlParent_
, _slXgafv = Nothing
, _slUploadProtocol = Nothing
, _slAccessToken = Nothing
, _slUploadType = Nothing
, _slFilter = Nothing
, _slPageToken = Nothing
, _slPageSize = Nothing
, _slCallback = Nothing
}
slParent :: Lens' ServicesList Text
slParent = lens _slParent (\ s a -> s{_slParent = a})
slXgafv :: Lens' ServicesList (Maybe Xgafv)
slXgafv = lens _slXgafv (\ s a -> s{_slXgafv = a})
slUploadProtocol :: Lens' ServicesList (Maybe Text)
slUploadProtocol
= lens _slUploadProtocol
(\ s a -> s{_slUploadProtocol = a})
slAccessToken :: Lens' ServicesList (Maybe Text)
slAccessToken
= lens _slAccessToken
(\ s a -> s{_slAccessToken = a})
slUploadType :: Lens' ServicesList (Maybe Text)
slUploadType
= lens _slUploadType (\ s a -> s{_slUploadType = a})
slFilter :: Lens' ServicesList (Maybe Text)
slFilter = lens _slFilter (\ s a -> s{_slFilter = a})
slPageToken :: Lens' ServicesList (Maybe Text)
slPageToken
= lens _slPageToken (\ s a -> s{_slPageToken = a})
slPageSize :: Lens' ServicesList (Maybe Int32)
slPageSize
= lens _slPageSize (\ s a -> s{_slPageSize = a}) .
mapping _Coerce
slCallback :: Lens' ServicesList (Maybe Text)
slCallback
= lens _slCallback (\ s a -> s{_slCallback = a})
instance GoogleRequest ServicesList where
type Rs ServicesList = ListServicesResponse
type Scopes ServicesList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient ServicesList'{..}
= go _slParent _slXgafv _slUploadProtocol
_slAccessToken
_slUploadType
_slFilter
_slPageToken
_slPageSize
_slCallback
(Just AltJSON)
serviceUsageService
where go
= buildClient (Proxy :: Proxy ServicesListResource)
mempty