{-# 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.Container.Projects.Locations.Clusters.SetNetworkPolicy
(
ProjectsLocationsClustersSetNetworkPolicyResource
, projectsLocationsClustersSetNetworkPolicy
, ProjectsLocationsClustersSetNetworkPolicy
, plcsnpXgafv
, plcsnpUploadProtocol
, plcsnpAccessToken
, plcsnpUploadType
, plcsnpPayload
, plcsnpName
, plcsnpCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsLocationsClustersSetNetworkPolicyResource
=
"v1" :>
CaptureMode "name" "setNetworkPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetNetworkPolicyRequest :>
Post '[JSON] Operation
data ProjectsLocationsClustersSetNetworkPolicy = ProjectsLocationsClustersSetNetworkPolicy'
{ _plcsnpXgafv :: !(Maybe Xgafv)
, _plcsnpUploadProtocol :: !(Maybe Text)
, _plcsnpAccessToken :: !(Maybe Text)
, _plcsnpUploadType :: !(Maybe Text)
, _plcsnpPayload :: !SetNetworkPolicyRequest
, _plcsnpName :: !Text
, _plcsnpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsClustersSetNetworkPolicy
:: SetNetworkPolicyRequest
-> Text
-> ProjectsLocationsClustersSetNetworkPolicy
projectsLocationsClustersSetNetworkPolicy pPlcsnpPayload_ pPlcsnpName_ =
ProjectsLocationsClustersSetNetworkPolicy'
{ _plcsnpXgafv = Nothing
, _plcsnpUploadProtocol = Nothing
, _plcsnpAccessToken = Nothing
, _plcsnpUploadType = Nothing
, _plcsnpPayload = pPlcsnpPayload_
, _plcsnpName = pPlcsnpName_
, _plcsnpCallback = Nothing
}
plcsnpXgafv :: Lens' ProjectsLocationsClustersSetNetworkPolicy (Maybe Xgafv)
plcsnpXgafv
= lens _plcsnpXgafv (\ s a -> s{_plcsnpXgafv = a})
plcsnpUploadProtocol :: Lens' ProjectsLocationsClustersSetNetworkPolicy (Maybe Text)
plcsnpUploadProtocol
= lens _plcsnpUploadProtocol
(\ s a -> s{_plcsnpUploadProtocol = a})
plcsnpAccessToken :: Lens' ProjectsLocationsClustersSetNetworkPolicy (Maybe Text)
plcsnpAccessToken
= lens _plcsnpAccessToken
(\ s a -> s{_plcsnpAccessToken = a})
plcsnpUploadType :: Lens' ProjectsLocationsClustersSetNetworkPolicy (Maybe Text)
plcsnpUploadType
= lens _plcsnpUploadType
(\ s a -> s{_plcsnpUploadType = a})
plcsnpPayload :: Lens' ProjectsLocationsClustersSetNetworkPolicy SetNetworkPolicyRequest
plcsnpPayload
= lens _plcsnpPayload
(\ s a -> s{_plcsnpPayload = a})
plcsnpName :: Lens' ProjectsLocationsClustersSetNetworkPolicy Text
plcsnpName
= lens _plcsnpName (\ s a -> s{_plcsnpName = a})
plcsnpCallback :: Lens' ProjectsLocationsClustersSetNetworkPolicy (Maybe Text)
plcsnpCallback
= lens _plcsnpCallback
(\ s a -> s{_plcsnpCallback = a})
instance GoogleRequest
ProjectsLocationsClustersSetNetworkPolicy where
type Rs ProjectsLocationsClustersSetNetworkPolicy =
Operation
type Scopes ProjectsLocationsClustersSetNetworkPolicy
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsClustersSetNetworkPolicy'{..}
= go _plcsnpName _plcsnpXgafv _plcsnpUploadProtocol
_plcsnpAccessToken
_plcsnpUploadType
_plcsnpCallback
(Just AltJSON)
_plcsnpPayload
containerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsClustersSetNetworkPolicyResource)
mempty