{-# 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.Folders.Sinks.Get
(
FoldersSinksGetResource
, foldersSinksGet
, FoldersSinksGet
, fsgXgafv
, fsgUploadProtocol
, fsgAccessToken
, fsgUploadType
, fsgSinkName
, fsgCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type FoldersSinksGetResource =
"v2" :>
Capture "sinkName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] LogSink
data FoldersSinksGet = FoldersSinksGet'
{ _fsgXgafv :: !(Maybe Xgafv)
, _fsgUploadProtocol :: !(Maybe Text)
, _fsgAccessToken :: !(Maybe Text)
, _fsgUploadType :: !(Maybe Text)
, _fsgSinkName :: !Text
, _fsgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersSinksGet
:: Text
-> FoldersSinksGet
foldersSinksGet pFsgSinkName_ =
FoldersSinksGet'
{ _fsgXgafv = Nothing
, _fsgUploadProtocol = Nothing
, _fsgAccessToken = Nothing
, _fsgUploadType = Nothing
, _fsgSinkName = pFsgSinkName_
, _fsgCallback = Nothing
}
fsgXgafv :: Lens' FoldersSinksGet (Maybe Xgafv)
fsgXgafv = lens _fsgXgafv (\ s a -> s{_fsgXgafv = a})
fsgUploadProtocol :: Lens' FoldersSinksGet (Maybe Text)
fsgUploadProtocol
= lens _fsgUploadProtocol
(\ s a -> s{_fsgUploadProtocol = a})
fsgAccessToken :: Lens' FoldersSinksGet (Maybe Text)
fsgAccessToken
= lens _fsgAccessToken
(\ s a -> s{_fsgAccessToken = a})
fsgUploadType :: Lens' FoldersSinksGet (Maybe Text)
fsgUploadType
= lens _fsgUploadType
(\ s a -> s{_fsgUploadType = a})
fsgSinkName :: Lens' FoldersSinksGet Text
fsgSinkName
= lens _fsgSinkName (\ s a -> s{_fsgSinkName = a})
fsgCallback :: Lens' FoldersSinksGet (Maybe Text)
fsgCallback
= lens _fsgCallback (\ s a -> s{_fsgCallback = a})
instance GoogleRequest FoldersSinksGet where
type Rs FoldersSinksGet = LogSink
type Scopes FoldersSinksGet =
'["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 FoldersSinksGet'{..}
= go _fsgSinkName _fsgXgafv _fsgUploadProtocol
_fsgAccessToken
_fsgUploadType
_fsgCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy FoldersSinksGetResource)
mempty