{-# 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.SetMaintenancePolicy
(
ProjectsLocationsClustersSetMaintenancePolicyResource
, projectsLocationsClustersSetMaintenancePolicy
, ProjectsLocationsClustersSetMaintenancePolicy
, plcsmpXgafv
, plcsmpUploadProtocol
, plcsmpAccessToken
, plcsmpUploadType
, plcsmpPayload
, plcsmpName
, plcsmpCallback
) where
import Network.Google.Container.Types
import Network.Google.Prelude
type ProjectsLocationsClustersSetMaintenancePolicyResource
=
"v1" :>
CaptureMode "name" "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 ProjectsLocationsClustersSetMaintenancePolicy = ProjectsLocationsClustersSetMaintenancePolicy'
{ _plcsmpXgafv :: !(Maybe Xgafv)
, _plcsmpUploadProtocol :: !(Maybe Text)
, _plcsmpAccessToken :: !(Maybe Text)
, _plcsmpUploadType :: !(Maybe Text)
, _plcsmpPayload :: !SetMaintenancePolicyRequest
, _plcsmpName :: !Text
, _plcsmpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsClustersSetMaintenancePolicy
:: SetMaintenancePolicyRequest
-> Text
-> ProjectsLocationsClustersSetMaintenancePolicy
projectsLocationsClustersSetMaintenancePolicy pPlcsmpPayload_ pPlcsmpName_ =
ProjectsLocationsClustersSetMaintenancePolicy'
{ _plcsmpXgafv = Nothing
, _plcsmpUploadProtocol = Nothing
, _plcsmpAccessToken = Nothing
, _plcsmpUploadType = Nothing
, _plcsmpPayload = pPlcsmpPayload_
, _plcsmpName = pPlcsmpName_
, _plcsmpCallback = Nothing
}
plcsmpXgafv :: Lens' ProjectsLocationsClustersSetMaintenancePolicy (Maybe Xgafv)
plcsmpXgafv
= lens _plcsmpXgafv (\ s a -> s{_plcsmpXgafv = a})
plcsmpUploadProtocol :: Lens' ProjectsLocationsClustersSetMaintenancePolicy (Maybe Text)
plcsmpUploadProtocol
= lens _plcsmpUploadProtocol
(\ s a -> s{_plcsmpUploadProtocol = a})
plcsmpAccessToken :: Lens' ProjectsLocationsClustersSetMaintenancePolicy (Maybe Text)
plcsmpAccessToken
= lens _plcsmpAccessToken
(\ s a -> s{_plcsmpAccessToken = a})
plcsmpUploadType :: Lens' ProjectsLocationsClustersSetMaintenancePolicy (Maybe Text)
plcsmpUploadType
= lens _plcsmpUploadType
(\ s a -> s{_plcsmpUploadType = a})
plcsmpPayload :: Lens' ProjectsLocationsClustersSetMaintenancePolicy SetMaintenancePolicyRequest
plcsmpPayload
= lens _plcsmpPayload
(\ s a -> s{_plcsmpPayload = a})
plcsmpName :: Lens' ProjectsLocationsClustersSetMaintenancePolicy Text
plcsmpName
= lens _plcsmpName (\ s a -> s{_plcsmpName = a})
plcsmpCallback :: Lens' ProjectsLocationsClustersSetMaintenancePolicy (Maybe Text)
plcsmpCallback
= lens _plcsmpCallback
(\ s a -> s{_plcsmpCallback = a})
instance GoogleRequest
ProjectsLocationsClustersSetMaintenancePolicy where
type Rs ProjectsLocationsClustersSetMaintenancePolicy
= Operation
type Scopes
ProjectsLocationsClustersSetMaintenancePolicy
= '["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsClustersSetMaintenancePolicy'{..}
= go _plcsmpName _plcsmpXgafv _plcsmpUploadProtocol
_plcsmpAccessToken
_plcsmpUploadType
_plcsmpCallback
(Just AltJSON)
_plcsmpPayload
containerService
where go
= buildClient
(Proxy ::
Proxy
ProjectsLocationsClustersSetMaintenancePolicyResource)
mempty