{-# 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.Patch
(
SecurityPoliciesPatchResource
, securityPoliciesPatch
, SecurityPoliciesPatch
, sRequestId
, sProject
, sPayload
, sSecurityPolicy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SecurityPoliciesPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"securityPolicies" :>
Capture "securityPolicy" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SecurityPolicy :>
Patch '[JSON] Operation
data SecurityPoliciesPatch = SecurityPoliciesPatch'
{ _sRequestId :: !(Maybe Text)
, _sProject :: !Text
, _sPayload :: !SecurityPolicy
, _sSecurityPolicy :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
securityPoliciesPatch
:: Text
-> SecurityPolicy
-> Text
-> SecurityPoliciesPatch
securityPoliciesPatch pSProject_ pSPayload_ pSSecurityPolicy_ =
SecurityPoliciesPatch'
{ _sRequestId = Nothing
, _sProject = pSProject_
, _sPayload = pSPayload_
, _sSecurityPolicy = pSSecurityPolicy_
}
sRequestId :: Lens' SecurityPoliciesPatch (Maybe Text)
sRequestId
= lens _sRequestId (\ s a -> s{_sRequestId = a})
sProject :: Lens' SecurityPoliciesPatch Text
sProject = lens _sProject (\ s a -> s{_sProject = a})
sPayload :: Lens' SecurityPoliciesPatch SecurityPolicy
sPayload = lens _sPayload (\ s a -> s{_sPayload = a})
sSecurityPolicy :: Lens' SecurityPoliciesPatch Text
sSecurityPolicy
= lens _sSecurityPolicy
(\ s a -> s{_sSecurityPolicy = a})
instance GoogleRequest SecurityPoliciesPatch where
type Rs SecurityPoliciesPatch = Operation
type Scopes SecurityPoliciesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SecurityPoliciesPatch'{..}
= go _sProject _sSecurityPolicy _sRequestId
(Just AltJSON)
_sPayload
computeService
where go
= buildClient
(Proxy :: Proxy SecurityPoliciesPatchResource)
mempty