{-# 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.Insert
(
FirewallsInsertResource
, firewallsInsert
, FirewallsInsert
, fiRequestId
, fiProject
, fiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type FirewallsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"firewalls" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Firewall :> Post '[JSON] Operation
data FirewallsInsert = FirewallsInsert'
{ _fiRequestId :: !(Maybe Text)
, _fiProject :: !Text
, _fiPayload :: !Firewall
} deriving (Eq,Show,Data,Typeable,Generic)
firewallsInsert
:: Text
-> Firewall
-> FirewallsInsert
firewallsInsert pFiProject_ pFiPayload_ =
FirewallsInsert'
{ _fiRequestId = Nothing
, _fiProject = pFiProject_
, _fiPayload = pFiPayload_
}
fiRequestId :: Lens' FirewallsInsert (Maybe Text)
fiRequestId
= lens _fiRequestId (\ s a -> s{_fiRequestId = a})
fiProject :: Lens' FirewallsInsert Text
fiProject
= lens _fiProject (\ s a -> s{_fiProject = a})
fiPayload :: Lens' FirewallsInsert Firewall
fiPayload
= lens _fiPayload (\ s a -> s{_fiPayload = a})
instance GoogleRequest FirewallsInsert where
type Rs FirewallsInsert = Operation
type Scopes FirewallsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient FirewallsInsert'{..}
= go _fiProject _fiRequestId (Just AltJSON)
_fiPayload
computeService
where go
= buildClient
(Proxy :: Proxy FirewallsInsertResource)
mempty