{-# 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.Firewalls.Patch
(
FirewallsPatchResource
, firewallsPatch
, FirewallsPatch
, fpRequestId
, fpProject
, fpPayload
, fpFirewall
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type FirewallsPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"firewalls" :>
Capture "firewall" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Firewall :> Patch '[JSON] Operation
data FirewallsPatch = FirewallsPatch'
{ _fpRequestId :: !(Maybe Text)
, _fpProject :: !Text
, _fpPayload :: !Firewall
, _fpFirewall :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
firewallsPatch
:: Text
-> Firewall
-> Text
-> FirewallsPatch
firewallsPatch pFpProject_ pFpPayload_ pFpFirewall_ =
FirewallsPatch'
{ _fpRequestId = Nothing
, _fpProject = pFpProject_
, _fpPayload = pFpPayload_
, _fpFirewall = pFpFirewall_
}
fpRequestId :: Lens' FirewallsPatch (Maybe Text)
fpRequestId
= lens _fpRequestId (\ s a -> s{_fpRequestId = a})
fpProject :: Lens' FirewallsPatch Text
fpProject
= lens _fpProject (\ s a -> s{_fpProject = a})
fpPayload :: Lens' FirewallsPatch Firewall
fpPayload
= lens _fpPayload (\ s a -> s{_fpPayload = a})
fpFirewall :: Lens' FirewallsPatch Text
fpFirewall
= lens _fpFirewall (\ s a -> s{_fpFirewall = a})
instance GoogleRequest FirewallsPatch where
type Rs FirewallsPatch = Operation
type Scopes FirewallsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient FirewallsPatch'{..}
= go _fpProject _fpFirewall _fpRequestId
(Just AltJSON)
_fpPayload
computeService
where go
= buildClient (Proxy :: Proxy FirewallsPatchResource)
mempty