{-# 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.SecurityCenter.Organizations.Sources.Create
(
OrganizationsSourcesCreateResource
, organizationsSourcesCreate
, OrganizationsSourcesCreate
, oscParent
, oscXgafv
, oscUploadProtocol
, oscAccessToken
, oscUploadType
, oscPayload
, oscCallback
) where
import Network.Google.Prelude
import Network.Google.SecurityCenter.Types
type OrganizationsSourcesCreateResource =
"v1" :>
Capture "parent" Text :>
"sources" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Source :> Post '[JSON] Source
data OrganizationsSourcesCreate =
OrganizationsSourcesCreate'
{ _oscParent :: !Text
, _oscXgafv :: !(Maybe Xgafv)
, _oscUploadProtocol :: !(Maybe Text)
, _oscAccessToken :: !(Maybe Text)
, _oscUploadType :: !(Maybe Text)
, _oscPayload :: !Source
, _oscCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
organizationsSourcesCreate
:: Text
-> Source
-> OrganizationsSourcesCreate
organizationsSourcesCreate pOscParent_ pOscPayload_ =
OrganizationsSourcesCreate'
{ _oscParent = pOscParent_
, _oscXgafv = Nothing
, _oscUploadProtocol = Nothing
, _oscAccessToken = Nothing
, _oscUploadType = Nothing
, _oscPayload = pOscPayload_
, _oscCallback = Nothing
}
oscParent :: Lens' OrganizationsSourcesCreate Text
oscParent
= lens _oscParent (\ s a -> s{_oscParent = a})
oscXgafv :: Lens' OrganizationsSourcesCreate (Maybe Xgafv)
oscXgafv = lens _oscXgafv (\ s a -> s{_oscXgafv = a})
oscUploadProtocol :: Lens' OrganizationsSourcesCreate (Maybe Text)
oscUploadProtocol
= lens _oscUploadProtocol
(\ s a -> s{_oscUploadProtocol = a})
oscAccessToken :: Lens' OrganizationsSourcesCreate (Maybe Text)
oscAccessToken
= lens _oscAccessToken
(\ s a -> s{_oscAccessToken = a})
oscUploadType :: Lens' OrganizationsSourcesCreate (Maybe Text)
oscUploadType
= lens _oscUploadType
(\ s a -> s{_oscUploadType = a})
oscPayload :: Lens' OrganizationsSourcesCreate Source
oscPayload
= lens _oscPayload (\ s a -> s{_oscPayload = a})
oscCallback :: Lens' OrganizationsSourcesCreate (Maybe Text)
oscCallback
= lens _oscCallback (\ s a -> s{_oscCallback = a})
instance GoogleRequest OrganizationsSourcesCreate
where
type Rs OrganizationsSourcesCreate = Source
type Scopes OrganizationsSourcesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OrganizationsSourcesCreate'{..}
= go _oscParent _oscXgafv _oscUploadProtocol
_oscAccessToken
_oscUploadType
_oscCallback
(Just AltJSON)
_oscPayload
securityCenterService
where go
= buildClient
(Proxy :: Proxy OrganizationsSourcesCreateResource)
mempty