{-# 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.SetMaintenancePolicy
(
ProjectsZonesClustersSetMaintenancePolicyResource
, projectsZonesClustersSetMaintenancePolicy
, ProjectsZonesClustersSetMaintenancePolicy
, pzcsmpXgafv
, pzcsmpUploadProtocol
, pzcsmpAccessToken
, pzcsmpUploadType
, pzcsmpZone
, pzcsmpPayload
, pzcsmpClusterId
, pzcsmpProjectId
, pzcsmpCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsZonesClustersSetMaintenancePolicyResource
=
"v1" :>
"projects" :>
Capture "projectId" Text :>
"zones" :>
Capture "zone" Text :>
"clusters" :>
CaptureMode "clusterId" "setMaintenancePolicy" Text
:>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SetMaintenancePolicyRequest :>
Post '[JSON] Operation
data ProjectsZonesClustersSetMaintenancePolicy = ProjectsZonesClustersSetMaintenancePolicy'
{ _pzcsmpXgafv :: !(Maybe Xgafv)
, _pzcsmpUploadProtocol :: !(Maybe Text)
, _pzcsmpAccessToken :: !(Maybe Text)
, _pzcsmpUploadType :: !(Maybe Text)
, _pzcsmpZone :: !Text
, _pzcsmpPayload :: !SetMaintenancePolicyRequest
, _pzcsmpClusterId :: !Text
, _pzcsmpProjectId :: !Text
, _pzcsmpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsZonesClustersSetMaintenancePolicy
:: Text
-> SetMaintenancePolicyRequest
-> Text
-> Text
-> ProjectsZonesClustersSetMaintenancePolicy
projectsZonesClustersSetMaintenancePolicy pPzcsmpZone_ pPzcsmpPayload_ pPzcsmpClusterId_ pPzcsmpProjectId_ =
ProjectsZonesClustersSetMaintenancePolicy'
{ _pzcsmpXgafv = Nothing
, _pzcsmpUploadProtocol = Nothing
, _pzcsmpAccessToken = Nothing
, _pzcsmpUploadType = Nothing
, _pzcsmpZone = pPzcsmpZone_
, _pzcsmpPayload = pPzcsmpPayload_
, _pzcsmpClusterId = pPzcsmpClusterId_
, _pzcsmpProjectId = pPzcsmpProjectId_
, _pzcsmpCallback = Nothing
}
pzcsmpXgafv :: Lens' ProjectsZonesClustersSetMaintenancePolicy (Maybe Xgafv)
pzcsmpXgafv
= lens _pzcsmpXgafv (\ s a -> s{_pzcsmpXgafv = a})
pzcsmpUploadProtocol :: Lens' ProjectsZonesClustersSetMaintenancePolicy (Maybe Text)
pzcsmpUploadProtocol
= lens _pzcsmpUploadProtocol
(\ s a -> s{_pzcsmpUploadProtocol = a})
pzcsmpAccessToken :: Lens' ProjectsZonesClustersSetMaintenancePolicy (Maybe Text)
pzcsmpAccessToken
= lens _pzcsmpAccessToken
(\ s a -> s{_pzcsmpAccessToken = a})
pzcsmpUploadType :: Lens' ProjectsZonesClustersSetMaintenancePolicy (Maybe Text)
pzcsmpUploadType
= lens _pzcsmpUploadType
(\ s a -> s{_pzcsmpUploadType = a})
pzcsmpZone :: Lens' ProjectsZonesClustersSetMaintenancePolicy Text
pzcsmpZone
= lens _pzcsmpZone (\ s a -> s{_pzcsmpZone = a})
pzcsmpPayload :: Lens' ProjectsZonesClustersSetMaintenancePolicy SetMaintenancePolicyRequest
pzcsmpPayload
= lens _pzcsmpPayload
(\ s a -> s{_pzcsmpPayload = a})
pzcsmpClusterId :: Lens' ProjectsZonesClustersSetMaintenancePolicy Text
pzcsmpClusterId
= lens _pzcsmpClusterId
(\ s a -> s{_pzcsmpClusterId = a})
pzcsmpProjectId :: Lens' ProjectsZonesClustersSetMaintenancePolicy Text
pzcsmpProjectId
= lens _pzcsmpProjectId
(\ s a -> s{_pzcsmpProjectId = a})
pzcsmpCallback :: Lens' ProjectsZonesClustersSetMaintenancePolicy (Maybe Text)
pzcsmpCallback
= lens _pzcsmpCallback
(\ s a -> s{_pzcsmpCallback = a})
instance GoogleRequest
ProjectsZonesClustersSetMaintenancePolicy where
type Rs ProjectsZonesClustersSetMaintenancePolicy =
Operation
type Scopes ProjectsZonesClustersSetMaintenancePolicy
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsZonesClustersSetMaintenancePolicy'{..}
= go _pzcsmpProjectId _pzcsmpZone _pzcsmpClusterId
_pzcsmpXgafv
_pzcsmpUploadProtocol
_pzcsmpAccessToken
_pzcsmpUploadType
_pzcsmpCallback
(Just AltJSON)
_pzcsmpPayload
containerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsZonesClustersSetMaintenancePolicyResource)
mempty