{-# 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.BillingAccounts.Sinks.Get
(
BillingAccountsSinksGetResource
, billingAccountsSinksGet
, BillingAccountsSinksGet
, basgXgafv
, basgUploadProtocol
, basgAccessToken
, basgUploadType
, basgSinkName
, basgCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type BillingAccountsSinksGetResource =
"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 BillingAccountsSinksGet = BillingAccountsSinksGet'
{ _basgXgafv :: !(Maybe Xgafv)
, _basgUploadProtocol :: !(Maybe Text)
, _basgAccessToken :: !(Maybe Text)
, _basgUploadType :: !(Maybe Text)
, _basgSinkName :: !Text
, _basgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
billingAccountsSinksGet
:: Text
-> BillingAccountsSinksGet
billingAccountsSinksGet pBasgSinkName_ =
BillingAccountsSinksGet'
{ _basgXgafv = Nothing
, _basgUploadProtocol = Nothing
, _basgAccessToken = Nothing
, _basgUploadType = Nothing
, _basgSinkName = pBasgSinkName_
, _basgCallback = Nothing
}
basgXgafv :: Lens' BillingAccountsSinksGet (Maybe Xgafv)
basgXgafv
= lens _basgXgafv (\ s a -> s{_basgXgafv = a})
basgUploadProtocol :: Lens' BillingAccountsSinksGet (Maybe Text)
basgUploadProtocol
= lens _basgUploadProtocol
(\ s a -> s{_basgUploadProtocol = a})
basgAccessToken :: Lens' BillingAccountsSinksGet (Maybe Text)
basgAccessToken
= lens _basgAccessToken
(\ s a -> s{_basgAccessToken = a})
basgUploadType :: Lens' BillingAccountsSinksGet (Maybe Text)
basgUploadType
= lens _basgUploadType
(\ s a -> s{_basgUploadType = a})
basgSinkName :: Lens' BillingAccountsSinksGet Text
basgSinkName
= lens _basgSinkName (\ s a -> s{_basgSinkName = a})
basgCallback :: Lens' BillingAccountsSinksGet (Maybe Text)
basgCallback
= lens _basgCallback (\ s a -> s{_basgCallback = a})
instance GoogleRequest BillingAccountsSinksGet where
type Rs BillingAccountsSinksGet = LogSink
type Scopes BillingAccountsSinksGet =
'["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 BillingAccountsSinksGet'{..}
= go _basgSinkName _basgXgafv _basgUploadProtocol
_basgAccessToken
_basgUploadType
_basgCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy BillingAccountsSinksGetResource)
mempty