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