{-# 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.Patch
(
AccessPoliciesPatchResource
, accessPoliciesPatch
, AccessPoliciesPatch
, appXgafv
, appUploadProtocol
, appUpdateMask
, appAccessToken
, appUploadType
, appPayload
, appName
, appCallback
) where
import Network.Google.AccessContextManager.Types
import Network.Google.Prelude
type AccessPoliciesPatchResource =
"v1beta" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccessPolicy :>
Patch '[JSON] Operation
data AccessPoliciesPatch = AccessPoliciesPatch'
{ _appXgafv :: !(Maybe Xgafv)
, _appUploadProtocol :: !(Maybe Text)
, _appUpdateMask :: !(Maybe GFieldMask)
, _appAccessToken :: !(Maybe Text)
, _appUploadType :: !(Maybe Text)
, _appPayload :: !AccessPolicy
, _appName :: !Text
, _appCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accessPoliciesPatch
:: AccessPolicy
-> Text
-> AccessPoliciesPatch
accessPoliciesPatch pAppPayload_ pAppName_ =
AccessPoliciesPatch'
{ _appXgafv = Nothing
, _appUploadProtocol = Nothing
, _appUpdateMask = Nothing
, _appAccessToken = Nothing
, _appUploadType = Nothing
, _appPayload = pAppPayload_
, _appName = pAppName_
, _appCallback = Nothing
}
appXgafv :: Lens' AccessPoliciesPatch (Maybe Xgafv)
appXgafv = lens _appXgafv (\ s a -> s{_appXgafv = a})
appUploadProtocol :: Lens' AccessPoliciesPatch (Maybe Text)
appUploadProtocol
= lens _appUploadProtocol
(\ s a -> s{_appUploadProtocol = a})
appUpdateMask :: Lens' AccessPoliciesPatch (Maybe GFieldMask)
appUpdateMask
= lens _appUpdateMask
(\ s a -> s{_appUpdateMask = a})
appAccessToken :: Lens' AccessPoliciesPatch (Maybe Text)
appAccessToken
= lens _appAccessToken
(\ s a -> s{_appAccessToken = a})
appUploadType :: Lens' AccessPoliciesPatch (Maybe Text)
appUploadType
= lens _appUploadType
(\ s a -> s{_appUploadType = a})
appPayload :: Lens' AccessPoliciesPatch AccessPolicy
appPayload
= lens _appPayload (\ s a -> s{_appPayload = a})
appName :: Lens' AccessPoliciesPatch Text
appName = lens _appName (\ s a -> s{_appName = a})
appCallback :: Lens' AccessPoliciesPatch (Maybe Text)
appCallback
= lens _appCallback (\ s a -> s{_appCallback = a})
instance GoogleRequest AccessPoliciesPatch where
type Rs AccessPoliciesPatch = Operation
type Scopes AccessPoliciesPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AccessPoliciesPatch'{..}
= go _appName _appXgafv _appUploadProtocol
_appUpdateMask
_appAccessToken
_appUploadType
_appCallback
(Just AltJSON)
_appPayload
accessContextManagerService
where go
= buildClient
(Proxy :: Proxy AccessPoliciesPatchResource)
mempty