{-# 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.Create
(
AccessPoliciesCreateResource
, accessPoliciesCreate
, AccessPoliciesCreate
, apcXgafv
, apcUploadProtocol
, apcAccessToken
, apcUploadType
, apcPayload
, apcCallback
) where
import Network.Google.AccessContextManager.Types
import Network.Google.Prelude
type AccessPoliciesCreateResource =
"v1beta" :>
"accessPolicies" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccessPolicy :>
Post '[JSON] Operation
data AccessPoliciesCreate = AccessPoliciesCreate'
{ _apcXgafv :: !(Maybe Xgafv)
, _apcUploadProtocol :: !(Maybe Text)
, _apcAccessToken :: !(Maybe Text)
, _apcUploadType :: !(Maybe Text)
, _apcPayload :: !AccessPolicy
, _apcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accessPoliciesCreate
:: AccessPolicy
-> AccessPoliciesCreate
accessPoliciesCreate pApcPayload_ =
AccessPoliciesCreate'
{ _apcXgafv = Nothing
, _apcUploadProtocol = Nothing
, _apcAccessToken = Nothing
, _apcUploadType = Nothing
, _apcPayload = pApcPayload_
, _apcCallback = Nothing
}
apcXgafv :: Lens' AccessPoliciesCreate (Maybe Xgafv)
apcXgafv = lens _apcXgafv (\ s a -> s{_apcXgafv = a})
apcUploadProtocol :: Lens' AccessPoliciesCreate (Maybe Text)
apcUploadProtocol
= lens _apcUploadProtocol
(\ s a -> s{_apcUploadProtocol = a})
apcAccessToken :: Lens' AccessPoliciesCreate (Maybe Text)
apcAccessToken
= lens _apcAccessToken
(\ s a -> s{_apcAccessToken = a})
apcUploadType :: Lens' AccessPoliciesCreate (Maybe Text)
apcUploadType
= lens _apcUploadType
(\ s a -> s{_apcUploadType = a})
apcPayload :: Lens' AccessPoliciesCreate AccessPolicy
apcPayload
= lens _apcPayload (\ s a -> s{_apcPayload = a})
apcCallback :: Lens' AccessPoliciesCreate (Maybe Text)
apcCallback
= lens _apcCallback (\ s a -> s{_apcCallback = a})
instance GoogleRequest AccessPoliciesCreate where
type Rs AccessPoliciesCreate = Operation
type Scopes AccessPoliciesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AccessPoliciesCreate'{..}
= go _apcXgafv _apcUploadProtocol _apcAccessToken
_apcUploadType
_apcCallback
(Just AltJSON)
_apcPayload
accessContextManagerService
where go
= buildClient
(Proxy :: Proxy AccessPoliciesCreateResource)
mempty