{-# 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.AccessLevels.Create
(
AccessPoliciesAccessLevelsCreateResource
, accessPoliciesAccessLevelsCreate
, AccessPoliciesAccessLevelsCreate
, apalcParent
, apalcXgafv
, apalcUploadProtocol
, apalcAccessToken
, apalcUploadType
, apalcPayload
, apalcCallback
) where
import Network.Google.AccessContextManager.Types
import Network.Google.Prelude
type AccessPoliciesAccessLevelsCreateResource =
"v1beta" :>
Capture "parent" Text :>
"accessLevels" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccessLevel :> Post '[JSON] Operation
data AccessPoliciesAccessLevelsCreate = AccessPoliciesAccessLevelsCreate'
{ _apalcParent :: !Text
, _apalcXgafv :: !(Maybe Xgafv)
, _apalcUploadProtocol :: !(Maybe Text)
, _apalcAccessToken :: !(Maybe Text)
, _apalcUploadType :: !(Maybe Text)
, _apalcPayload :: !AccessLevel
, _apalcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accessPoliciesAccessLevelsCreate
:: Text
-> AccessLevel
-> AccessPoliciesAccessLevelsCreate
accessPoliciesAccessLevelsCreate pApalcParent_ pApalcPayload_ =
AccessPoliciesAccessLevelsCreate'
{ _apalcParent = pApalcParent_
, _apalcXgafv = Nothing
, _apalcUploadProtocol = Nothing
, _apalcAccessToken = Nothing
, _apalcUploadType = Nothing
, _apalcPayload = pApalcPayload_
, _apalcCallback = Nothing
}
apalcParent :: Lens' AccessPoliciesAccessLevelsCreate Text
apalcParent
= lens _apalcParent (\ s a -> s{_apalcParent = a})
apalcXgafv :: Lens' AccessPoliciesAccessLevelsCreate (Maybe Xgafv)
apalcXgafv
= lens _apalcXgafv (\ s a -> s{_apalcXgafv = a})
apalcUploadProtocol :: Lens' AccessPoliciesAccessLevelsCreate (Maybe Text)
apalcUploadProtocol
= lens _apalcUploadProtocol
(\ s a -> s{_apalcUploadProtocol = a})
apalcAccessToken :: Lens' AccessPoliciesAccessLevelsCreate (Maybe Text)
apalcAccessToken
= lens _apalcAccessToken
(\ s a -> s{_apalcAccessToken = a})
apalcUploadType :: Lens' AccessPoliciesAccessLevelsCreate (Maybe Text)
apalcUploadType
= lens _apalcUploadType
(\ s a -> s{_apalcUploadType = a})
apalcPayload :: Lens' AccessPoliciesAccessLevelsCreate AccessLevel
apalcPayload
= lens _apalcPayload (\ s a -> s{_apalcPayload = a})
apalcCallback :: Lens' AccessPoliciesAccessLevelsCreate (Maybe Text)
apalcCallback
= lens _apalcCallback
(\ s a -> s{_apalcCallback = a})
instance GoogleRequest
AccessPoliciesAccessLevelsCreate where
type Rs AccessPoliciesAccessLevelsCreate = Operation
type Scopes AccessPoliciesAccessLevelsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AccessPoliciesAccessLevelsCreate'{..}
= go _apalcParent _apalcXgafv _apalcUploadProtocol
_apalcAccessToken
_apalcUploadType
_apalcCallback
(Just AltJSON)
_apalcPayload
accessContextManagerService
where go
= buildClient
(Proxy ::
Proxy AccessPoliciesAccessLevelsCreateResource)
mempty