{-# 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.Zones.Clusters.SetNetworkPolicy
(
ProjectsZonesClustersSetNetworkPolicyResource
, projectsZonesClustersSetNetworkPolicy
, ProjectsZonesClustersSetNetworkPolicy
, pzcsnpXgafv
, pzcsnpUploadProtocol
, pzcsnpAccessToken
, pzcsnpUploadType
, pzcsnpZone
, pzcsnpPayload
, pzcsnpClusterId
, pzcsnpProjectId
, pzcsnpCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsZonesClustersSetNetworkPolicyResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"zones" :>
Capture "zone" Text :>
"clusters" :>
CaptureMode "clusterId" "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 ProjectsZonesClustersSetNetworkPolicy = ProjectsZonesClustersSetNetworkPolicy'
{ _pzcsnpXgafv :: !(Maybe Xgafv)
, _pzcsnpUploadProtocol :: !(Maybe Text)
, _pzcsnpAccessToken :: !(Maybe Text)
, _pzcsnpUploadType :: !(Maybe Text)
, _pzcsnpZone :: !Text
, _pzcsnpPayload :: !SetNetworkPolicyRequest
, _pzcsnpClusterId :: !Text
, _pzcsnpProjectId :: !Text
, _pzcsnpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsZonesClustersSetNetworkPolicy
:: Text
-> SetNetworkPolicyRequest
-> Text
-> Text
-> ProjectsZonesClustersSetNetworkPolicy
projectsZonesClustersSetNetworkPolicy pPzcsnpZone_ pPzcsnpPayload_ pPzcsnpClusterId_ pPzcsnpProjectId_ =
ProjectsZonesClustersSetNetworkPolicy'
{ _pzcsnpXgafv = Nothing
, _pzcsnpUploadProtocol = Nothing
, _pzcsnpAccessToken = Nothing
, _pzcsnpUploadType = Nothing
, _pzcsnpZone = pPzcsnpZone_
, _pzcsnpPayload = pPzcsnpPayload_
, _pzcsnpClusterId = pPzcsnpClusterId_
, _pzcsnpProjectId = pPzcsnpProjectId_
, _pzcsnpCallback = Nothing
}
pzcsnpXgafv :: Lens' ProjectsZonesClustersSetNetworkPolicy (Maybe Xgafv)
pzcsnpXgafv
= lens _pzcsnpXgafv (\ s a -> s{_pzcsnpXgafv = a})
pzcsnpUploadProtocol :: Lens' ProjectsZonesClustersSetNetworkPolicy (Maybe Text)
pzcsnpUploadProtocol
= lens _pzcsnpUploadProtocol
(\ s a -> s{_pzcsnpUploadProtocol = a})
pzcsnpAccessToken :: Lens' ProjectsZonesClustersSetNetworkPolicy (Maybe Text)
pzcsnpAccessToken
= lens _pzcsnpAccessToken
(\ s a -> s{_pzcsnpAccessToken = a})
pzcsnpUploadType :: Lens' ProjectsZonesClustersSetNetworkPolicy (Maybe Text)
pzcsnpUploadType
= lens _pzcsnpUploadType
(\ s a -> s{_pzcsnpUploadType = a})
pzcsnpZone :: Lens' ProjectsZonesClustersSetNetworkPolicy Text
pzcsnpZone
= lens _pzcsnpZone (\ s a -> s{_pzcsnpZone = a})
pzcsnpPayload :: Lens' ProjectsZonesClustersSetNetworkPolicy SetNetworkPolicyRequest
pzcsnpPayload
= lens _pzcsnpPayload
(\ s a -> s{_pzcsnpPayload = a})
pzcsnpClusterId :: Lens' ProjectsZonesClustersSetNetworkPolicy Text
pzcsnpClusterId
= lens _pzcsnpClusterId
(\ s a -> s{_pzcsnpClusterId = a})
pzcsnpProjectId :: Lens' ProjectsZonesClustersSetNetworkPolicy Text
pzcsnpProjectId
= lens _pzcsnpProjectId
(\ s a -> s{_pzcsnpProjectId = a})
pzcsnpCallback :: Lens' ProjectsZonesClustersSetNetworkPolicy (Maybe Text)
pzcsnpCallback
= lens _pzcsnpCallback
(\ s a -> s{_pzcsnpCallback = a})
instance GoogleRequest
ProjectsZonesClustersSetNetworkPolicy where
type Rs ProjectsZonesClustersSetNetworkPolicy =
Operation
type Scopes ProjectsZonesClustersSetNetworkPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsZonesClustersSetNetworkPolicy'{..}
= go _pzcsnpProjectId _pzcsnpZone _pzcsnpClusterId
_pzcsnpXgafv
_pzcsnpUploadProtocol
_pzcsnpAccessToken
_pzcsnpUploadType
_pzcsnpCallback
(Just AltJSON)
_pzcsnpPayload
containerService
where go
= buildClient
(Proxy ::
Proxy ProjectsZonesClustersSetNetworkPolicyResource)
mempty