{-# 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.Organizations.Sinks.Get
(
OrganizationsSinksGetResource
, organizationsSinksGet
, OrganizationsSinksGet
, osgXgafv
, osgUploadProtocol
, osgAccessToken
, osgUploadType
, osgSinkName
, osgCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type OrganizationsSinksGetResource =
"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 OrganizationsSinksGet = OrganizationsSinksGet'
{ _osgXgafv :: !(Maybe Xgafv)
, _osgUploadProtocol :: !(Maybe Text)
, _osgAccessToken :: !(Maybe Text)
, _osgUploadType :: !(Maybe Text)
, _osgSinkName :: !Text
, _osgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsSinksGet
:: Text
-> OrganizationsSinksGet
organizationsSinksGet pOsgSinkName_ =
OrganizationsSinksGet'
{ _osgXgafv = Nothing
, _osgUploadProtocol = Nothing
, _osgAccessToken = Nothing
, _osgUploadType = Nothing
, _osgSinkName = pOsgSinkName_
, _osgCallback = Nothing
}
osgXgafv :: Lens' OrganizationsSinksGet (Maybe Xgafv)
osgXgafv = lens _osgXgafv (\ s a -> s{_osgXgafv = a})
osgUploadProtocol :: Lens' OrganizationsSinksGet (Maybe Text)
osgUploadProtocol
= lens _osgUploadProtocol
(\ s a -> s{_osgUploadProtocol = a})
osgAccessToken :: Lens' OrganizationsSinksGet (Maybe Text)
osgAccessToken
= lens _osgAccessToken
(\ s a -> s{_osgAccessToken = a})
osgUploadType :: Lens' OrganizationsSinksGet (Maybe Text)
osgUploadType
= lens _osgUploadType
(\ s a -> s{_osgUploadType = a})
osgSinkName :: Lens' OrganizationsSinksGet Text
osgSinkName
= lens _osgSinkName (\ s a -> s{_osgSinkName = a})
osgCallback :: Lens' OrganizationsSinksGet (Maybe Text)
osgCallback
= lens _osgCallback (\ s a -> s{_osgCallback = a})
instance GoogleRequest OrganizationsSinksGet where
type Rs OrganizationsSinksGet = LogSink
type Scopes OrganizationsSinksGet =
'["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 OrganizationsSinksGet'{..}
= go _osgSinkName _osgXgafv _osgUploadProtocol
_osgAccessToken
_osgUploadType
_osgCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy OrganizationsSinksGetResource)
mempty