{-# 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.List
(
OrganizationsSinksListResource
, organizationsSinksList
, OrganizationsSinksList
, oslParent
, oslXgafv
, oslUploadProtocol
, oslAccessToken
, oslUploadType
, oslPageToken
, oslPageSize
, oslCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type OrganizationsSinksListResource =
"v2" :>
Capture "parent" Text :>
"sinks" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListSinksResponse
data OrganizationsSinksList = OrganizationsSinksList'
{ _oslParent :: !Text
, _oslXgafv :: !(Maybe Xgafv)
, _oslUploadProtocol :: !(Maybe Text)
, _oslAccessToken :: !(Maybe Text)
, _oslUploadType :: !(Maybe Text)
, _oslPageToken :: !(Maybe Text)
, _oslPageSize :: !(Maybe (Textual Int32))
, _oslCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsSinksList
:: Text
-> OrganizationsSinksList
organizationsSinksList pOslParent_ =
OrganizationsSinksList'
{ _oslParent = pOslParent_
, _oslXgafv = Nothing
, _oslUploadProtocol = Nothing
, _oslAccessToken = Nothing
, _oslUploadType = Nothing
, _oslPageToken = Nothing
, _oslPageSize = Nothing
, _oslCallback = Nothing
}
oslParent :: Lens' OrganizationsSinksList Text
oslParent
= lens _oslParent (\ s a -> s{_oslParent = a})
oslXgafv :: Lens' OrganizationsSinksList (Maybe Xgafv)
oslXgafv = lens _oslXgafv (\ s a -> s{_oslXgafv = a})
oslUploadProtocol :: Lens' OrganizationsSinksList (Maybe Text)
oslUploadProtocol
= lens _oslUploadProtocol
(\ s a -> s{_oslUploadProtocol = a})
oslAccessToken :: Lens' OrganizationsSinksList (Maybe Text)
oslAccessToken
= lens _oslAccessToken
(\ s a -> s{_oslAccessToken = a})
oslUploadType :: Lens' OrganizationsSinksList (Maybe Text)
oslUploadType
= lens _oslUploadType
(\ s a -> s{_oslUploadType = a})
oslPageToken :: Lens' OrganizationsSinksList (Maybe Text)
oslPageToken
= lens _oslPageToken (\ s a -> s{_oslPageToken = a})
oslPageSize :: Lens' OrganizationsSinksList (Maybe Int32)
oslPageSize
= lens _oslPageSize (\ s a -> s{_oslPageSize = a}) .
mapping _Coerce
oslCallback :: Lens' OrganizationsSinksList (Maybe Text)
oslCallback
= lens _oslCallback (\ s a -> s{_oslCallback = a})
instance GoogleRequest OrganizationsSinksList where
type Rs OrganizationsSinksList = ListSinksResponse
type Scopes OrganizationsSinksList =
'["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 OrganizationsSinksList'{..}
= go _oslParent _oslXgafv _oslUploadProtocol
_oslAccessToken
_oslUploadType
_oslPageToken
_oslPageSize
_oslCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy OrganizationsSinksListResource)
mempty