{-# 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.AppEngine.Apps.Firewall.IngressRules.Create
(
AppsFirewallIngressRulesCreateResource
, appsFirewallIngressRulesCreate
, AppsFirewallIngressRulesCreate
, afircXgafv
, afircUploadProtocol
, afircAccessToken
, afircUploadType
, afircPayload
, afircAppsId
, afircCallback
) where
import Network.Google.AppEngine.Types
import Network.Google.Prelude
type AppsFirewallIngressRulesCreateResource =
"v1" :>
"apps" :>
Capture "appsId" Text :>
"firewall" :>
"ingressRules" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FirewallRule :>
Post '[JSON] FirewallRule
data AppsFirewallIngressRulesCreate = AppsFirewallIngressRulesCreate'
{ _afircXgafv :: !(Maybe Xgafv)
, _afircUploadProtocol :: !(Maybe Text)
, _afircAccessToken :: !(Maybe Text)
, _afircUploadType :: !(Maybe Text)
, _afircPayload :: !FirewallRule
, _afircAppsId :: !Text
, _afircCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
appsFirewallIngressRulesCreate
:: FirewallRule
-> Text
-> AppsFirewallIngressRulesCreate
appsFirewallIngressRulesCreate pAfircPayload_ pAfircAppsId_ =
AppsFirewallIngressRulesCreate'
{ _afircXgafv = Nothing
, _afircUploadProtocol = Nothing
, _afircAccessToken = Nothing
, _afircUploadType = Nothing
, _afircPayload = pAfircPayload_
, _afircAppsId = pAfircAppsId_
, _afircCallback = Nothing
}
afircXgafv :: Lens' AppsFirewallIngressRulesCreate (Maybe Xgafv)
afircXgafv
= lens _afircXgafv (\ s a -> s{_afircXgafv = a})
afircUploadProtocol :: Lens' AppsFirewallIngressRulesCreate (Maybe Text)
afircUploadProtocol
= lens _afircUploadProtocol
(\ s a -> s{_afircUploadProtocol = a})
afircAccessToken :: Lens' AppsFirewallIngressRulesCreate (Maybe Text)
afircAccessToken
= lens _afircAccessToken
(\ s a -> s{_afircAccessToken = a})
afircUploadType :: Lens' AppsFirewallIngressRulesCreate (Maybe Text)
afircUploadType
= lens _afircUploadType
(\ s a -> s{_afircUploadType = a})
afircPayload :: Lens' AppsFirewallIngressRulesCreate FirewallRule
afircPayload
= lens _afircPayload (\ s a -> s{_afircPayload = a})
afircAppsId :: Lens' AppsFirewallIngressRulesCreate Text
afircAppsId
= lens _afircAppsId (\ s a -> s{_afircAppsId = a})
afircCallback :: Lens' AppsFirewallIngressRulesCreate (Maybe Text)
afircCallback
= lens _afircCallback
(\ s a -> s{_afircCallback = a})
instance GoogleRequest AppsFirewallIngressRulesCreate
where
type Rs AppsFirewallIngressRulesCreate = FirewallRule
type Scopes AppsFirewallIngressRulesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AppsFirewallIngressRulesCreate'{..}
= go _afircAppsId _afircXgafv _afircUploadProtocol
_afircAccessToken
_afircUploadType
_afircCallback
(Just AltJSON)
_afircPayload
appEngineService
where go
= buildClient
(Proxy ::
Proxy AppsFirewallIngressRulesCreateResource)
mempty