{-# 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.Compute.SecurityPolicies.PatchRule
(
SecurityPoliciesPatchRuleResource
, securityPoliciesPatchRule
, SecurityPoliciesPatchRule
, spprPriority
, spprProject
, spprPayload
, spprSecurityPolicy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SecurityPoliciesPatchRuleResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"securityPolicies" :>
Capture "securityPolicy" Text :>
"patchRule" :>
QueryParam "priority" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SecurityPolicyRule :>
Post '[JSON] Operation
data SecurityPoliciesPatchRule = SecurityPoliciesPatchRule'
{ _spprPriority :: !(Maybe (Textual Int32))
, _spprProject :: !Text
, _spprPayload :: !SecurityPolicyRule
, _spprSecurityPolicy :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
securityPoliciesPatchRule
:: Text
-> SecurityPolicyRule
-> Text
-> SecurityPoliciesPatchRule
securityPoliciesPatchRule pSpprProject_ pSpprPayload_ pSpprSecurityPolicy_ =
SecurityPoliciesPatchRule'
{ _spprPriority = Nothing
, _spprProject = pSpprProject_
, _spprPayload = pSpprPayload_
, _spprSecurityPolicy = pSpprSecurityPolicy_
}
spprPriority :: Lens' SecurityPoliciesPatchRule (Maybe Int32)
spprPriority
= lens _spprPriority (\ s a -> s{_spprPriority = a})
. mapping _Coerce
spprProject :: Lens' SecurityPoliciesPatchRule Text
spprProject
= lens _spprProject (\ s a -> s{_spprProject = a})
spprPayload :: Lens' SecurityPoliciesPatchRule SecurityPolicyRule
spprPayload
= lens _spprPayload (\ s a -> s{_spprPayload = a})
spprSecurityPolicy :: Lens' SecurityPoliciesPatchRule Text
spprSecurityPolicy
= lens _spprSecurityPolicy
(\ s a -> s{_spprSecurityPolicy = a})
instance GoogleRequest SecurityPoliciesPatchRule
where
type Rs SecurityPoliciesPatchRule = Operation
type Scopes SecurityPoliciesPatchRule =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SecurityPoliciesPatchRule'{..}
= go _spprProject _spprSecurityPolicy _spprPriority
(Just AltJSON)
_spprPayload
computeService
where go
= buildClient
(Proxy :: Proxy SecurityPoliciesPatchRuleResource)
mempty