{-# 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.BackendServices.SetSecurityPolicy
(
BackendServicesSetSecurityPolicyResource
, backendServicesSetSecurityPolicy
, BackendServicesSetSecurityPolicy
, bssspRequestId
, bssspProject
, bssspPayload
, bssspBackendService
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendServicesSetSecurityPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendServices" :>
Capture "backendService" Text :>
"setSecurityPolicy" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SecurityPolicyReference :>
Post '[JSON] Operation
data BackendServicesSetSecurityPolicy = BackendServicesSetSecurityPolicy'
{ _bssspRequestId :: !(Maybe Text)
, _bssspProject :: !Text
, _bssspPayload :: !SecurityPolicyReference
, _bssspBackendService :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backendServicesSetSecurityPolicy
:: Text
-> SecurityPolicyReference
-> Text
-> BackendServicesSetSecurityPolicy
backendServicesSetSecurityPolicy pBssspProject_ pBssspPayload_ pBssspBackendService_ =
BackendServicesSetSecurityPolicy'
{ _bssspRequestId = Nothing
, _bssspProject = pBssspProject_
, _bssspPayload = pBssspPayload_
, _bssspBackendService = pBssspBackendService_
}
bssspRequestId :: Lens' BackendServicesSetSecurityPolicy (Maybe Text)
bssspRequestId
= lens _bssspRequestId
(\ s a -> s{_bssspRequestId = a})
bssspProject :: Lens' BackendServicesSetSecurityPolicy Text
bssspProject
= lens _bssspProject (\ s a -> s{_bssspProject = a})
bssspPayload :: Lens' BackendServicesSetSecurityPolicy SecurityPolicyReference
bssspPayload
= lens _bssspPayload (\ s a -> s{_bssspPayload = a})
bssspBackendService :: Lens' BackendServicesSetSecurityPolicy Text
bssspBackendService
= lens _bssspBackendService
(\ s a -> s{_bssspBackendService = a})
instance GoogleRequest
BackendServicesSetSecurityPolicy where
type Rs BackendServicesSetSecurityPolicy = Operation
type Scopes BackendServicesSetSecurityPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient BackendServicesSetSecurityPolicy'{..}
= go _bssspProject _bssspBackendService
_bssspRequestId
(Just AltJSON)
_bssspPayload
computeService
where go
= buildClient
(Proxy ::
Proxy BackendServicesSetSecurityPolicyResource)
mempty