{-# 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.Projects.Sinks.Get
(
ProjectsSinksGetResource
, projectsSinksGet
, ProjectsSinksGet
, psgXgafv
, psgUploadProtocol
, psgAccessToken
, psgUploadType
, psgSinkName
, psgCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type ProjectsSinksGetResource =
"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 ProjectsSinksGet = ProjectsSinksGet'
{ _psgXgafv :: !(Maybe Xgafv)
, _psgUploadProtocol :: !(Maybe Text)
, _psgAccessToken :: !(Maybe Text)
, _psgUploadType :: !(Maybe Text)
, _psgSinkName :: !Text
, _psgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSinksGet
:: Text
-> ProjectsSinksGet
projectsSinksGet pPsgSinkName_ =
ProjectsSinksGet'
{ _psgXgafv = Nothing
, _psgUploadProtocol = Nothing
, _psgAccessToken = Nothing
, _psgUploadType = Nothing
, _psgSinkName = pPsgSinkName_
, _psgCallback = Nothing
}
psgXgafv :: Lens' ProjectsSinksGet (Maybe Xgafv)
psgXgafv = lens _psgXgafv (\ s a -> s{_psgXgafv = a})
psgUploadProtocol :: Lens' ProjectsSinksGet (Maybe Text)
psgUploadProtocol
= lens _psgUploadProtocol
(\ s a -> s{_psgUploadProtocol = a})
psgAccessToken :: Lens' ProjectsSinksGet (Maybe Text)
psgAccessToken
= lens _psgAccessToken
(\ s a -> s{_psgAccessToken = a})
psgUploadType :: Lens' ProjectsSinksGet (Maybe Text)
psgUploadType
= lens _psgUploadType
(\ s a -> s{_psgUploadType = a})
psgSinkName :: Lens' ProjectsSinksGet Text
psgSinkName
= lens _psgSinkName (\ s a -> s{_psgSinkName = a})
psgCallback :: Lens' ProjectsSinksGet (Maybe Text)
psgCallback
= lens _psgCallback (\ s a -> s{_psgCallback = a})
instance GoogleRequest ProjectsSinksGet where
type Rs ProjectsSinksGet = LogSink
type Scopes ProjectsSinksGet =
'["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 ProjectsSinksGet'{..}
= go _psgSinkName _psgXgafv _psgUploadProtocol
_psgAccessToken
_psgUploadType
_psgCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy ProjectsSinksGetResource)
mempty