{-# 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.AccessContextManager.AccessPolicies.ServicePerimeters.Create
(
AccessPoliciesServicePerimetersCreateResource
, accessPoliciesServicePerimetersCreate
, AccessPoliciesServicePerimetersCreate
, apspcParent
, apspcXgafv
, apspcUploadProtocol
, apspcAccessToken
, apspcUploadType
, apspcPayload
, apspcCallback
) where
import Network.Google.AccessContextManager.Types
import Network.Google.Prelude
type AccessPoliciesServicePerimetersCreateResource =
"v1beta" :>
Capture "parent" Text :>
"servicePerimeters" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ServicePerimeter :>
Post '[JSON] Operation
data AccessPoliciesServicePerimetersCreate = AccessPoliciesServicePerimetersCreate'
{ _apspcParent :: !Text
, _apspcXgafv :: !(Maybe Xgafv)
, _apspcUploadProtocol :: !(Maybe Text)
, _apspcAccessToken :: !(Maybe Text)
, _apspcUploadType :: !(Maybe Text)
, _apspcPayload :: !ServicePerimeter
, _apspcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accessPoliciesServicePerimetersCreate
:: Text
-> ServicePerimeter
-> AccessPoliciesServicePerimetersCreate
accessPoliciesServicePerimetersCreate pApspcParent_ pApspcPayload_ =
AccessPoliciesServicePerimetersCreate'
{ _apspcParent = pApspcParent_
, _apspcXgafv = Nothing
, _apspcUploadProtocol = Nothing
, _apspcAccessToken = Nothing
, _apspcUploadType = Nothing
, _apspcPayload = pApspcPayload_
, _apspcCallback = Nothing
}
apspcParent :: Lens' AccessPoliciesServicePerimetersCreate Text
apspcParent
= lens _apspcParent (\ s a -> s{_apspcParent = a})
apspcXgafv :: Lens' AccessPoliciesServicePerimetersCreate (Maybe Xgafv)
apspcXgafv
= lens _apspcXgafv (\ s a -> s{_apspcXgafv = a})
apspcUploadProtocol :: Lens' AccessPoliciesServicePerimetersCreate (Maybe Text)
apspcUploadProtocol
= lens _apspcUploadProtocol
(\ s a -> s{_apspcUploadProtocol = a})
apspcAccessToken :: Lens' AccessPoliciesServicePerimetersCreate (Maybe Text)
apspcAccessToken
= lens _apspcAccessToken
(\ s a -> s{_apspcAccessToken = a})
apspcUploadType :: Lens' AccessPoliciesServicePerimetersCreate (Maybe Text)
apspcUploadType
= lens _apspcUploadType
(\ s a -> s{_apspcUploadType = a})
apspcPayload :: Lens' AccessPoliciesServicePerimetersCreate ServicePerimeter
apspcPayload
= lens _apspcPayload (\ s a -> s{_apspcPayload = a})
apspcCallback :: Lens' AccessPoliciesServicePerimetersCreate (Maybe Text)
apspcCallback
= lens _apspcCallback
(\ s a -> s{_apspcCallback = a})
instance GoogleRequest
AccessPoliciesServicePerimetersCreate where
type Rs AccessPoliciesServicePerimetersCreate =
Operation
type Scopes AccessPoliciesServicePerimetersCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
AccessPoliciesServicePerimetersCreate'{..}
= go _apspcParent _apspcXgafv _apspcUploadProtocol
_apspcAccessToken
_apspcUploadType
_apspcCallback
(Just AltJSON)
_apspcPayload
accessContextManagerService
where go
= buildClient
(Proxy ::
Proxy AccessPoliciesServicePerimetersCreateResource)
mempty