{-# 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.RemoveRule
(
SecurityPoliciesRemoveRuleResource
, securityPoliciesRemoveRule
, SecurityPoliciesRemoveRule
, sprrPriority
, sprrProject
, sprrSecurityPolicy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SecurityPoliciesRemoveRuleResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"securityPolicies" :>
Capture "securityPolicy" Text :>
"removeRule" :>
QueryParam "priority" (Textual Int32) :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data SecurityPoliciesRemoveRule =
SecurityPoliciesRemoveRule'
{ _sprrPriority :: !(Maybe (Textual Int32))
, _sprrProject :: !Text
, _sprrSecurityPolicy :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
securityPoliciesRemoveRule
:: Text
-> Text
-> SecurityPoliciesRemoveRule
securityPoliciesRemoveRule pSprrProject_ pSprrSecurityPolicy_ =
SecurityPoliciesRemoveRule'
{ _sprrPriority = Nothing
, _sprrProject = pSprrProject_
, _sprrSecurityPolicy = pSprrSecurityPolicy_
}
sprrPriority :: Lens' SecurityPoliciesRemoveRule (Maybe Int32)
sprrPriority
= lens _sprrPriority (\ s a -> s{_sprrPriority = a})
. mapping _Coerce
sprrProject :: Lens' SecurityPoliciesRemoveRule Text
sprrProject
= lens _sprrProject (\ s a -> s{_sprrProject = a})
sprrSecurityPolicy :: Lens' SecurityPoliciesRemoveRule Text
sprrSecurityPolicy
= lens _sprrSecurityPolicy
(\ s a -> s{_sprrSecurityPolicy = a})
instance GoogleRequest SecurityPoliciesRemoveRule
where
type Rs SecurityPoliciesRemoveRule = Operation
type Scopes SecurityPoliciesRemoveRule =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SecurityPoliciesRemoveRule'{..}
= go _sprrProject _sprrSecurityPolicy _sprrPriority
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy SecurityPoliciesRemoveRuleResource)
mempty