{-# 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.Get
(
SinksGetResource
, sinksGet
, SinksGet
, sgXgafv
, sgUploadProtocol
, sgAccessToken
, sgUploadType
, sgSinkName
, sgCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type SinksGetResource =
"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 SinksGet = SinksGet'
{ _sgXgafv :: !(Maybe Xgafv)
, _sgUploadProtocol :: !(Maybe Text)
, _sgAccessToken :: !(Maybe Text)
, _sgUploadType :: !(Maybe Text)
, _sgSinkName :: !Text
, _sgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sinksGet
:: Text
-> SinksGet
sinksGet pSgSinkName_ =
SinksGet'
{ _sgXgafv = Nothing
, _sgUploadProtocol = Nothing
, _sgAccessToken = Nothing
, _sgUploadType = Nothing
, _sgSinkName = pSgSinkName_
, _sgCallback = Nothing
}
sgXgafv :: Lens' SinksGet (Maybe Xgafv)
sgXgafv = lens _sgXgafv (\ s a -> s{_sgXgafv = a})
sgUploadProtocol :: Lens' SinksGet (Maybe Text)
sgUploadProtocol
= lens _sgUploadProtocol
(\ s a -> s{_sgUploadProtocol = a})
sgAccessToken :: Lens' SinksGet (Maybe Text)
sgAccessToken
= lens _sgAccessToken
(\ s a -> s{_sgAccessToken = a})
sgUploadType :: Lens' SinksGet (Maybe Text)
sgUploadType
= lens _sgUploadType (\ s a -> s{_sgUploadType = a})
sgSinkName :: Lens' SinksGet Text
sgSinkName
= lens _sgSinkName (\ s a -> s{_sgSinkName = a})
sgCallback :: Lens' SinksGet (Maybe Text)
sgCallback
= lens _sgCallback (\ s a -> s{_sgCallback = a})
instance GoogleRequest SinksGet where
type Rs SinksGet = LogSink
type Scopes SinksGet =
'["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 SinksGet'{..}
= go _sgSinkName _sgXgafv _sgUploadProtocol
_sgAccessToken
_sgUploadType
_sgCallback
(Just AltJSON)
loggingService
where go
= buildClient (Proxy :: Proxy SinksGetResource)
mempty