{-# 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.DeploymentManager.Deployments.CancelPreview
(
DeploymentsCancelPreviewResource
, deploymentsCancelPreview
, DeploymentsCancelPreview
, dcpProject
, dcpPayload
, dcpDeployment
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsCancelPreviewResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "deployment" Text :>
"cancelPreview" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DeploymentsCancelPreviewRequest :>
Post '[JSON] Operation
data DeploymentsCancelPreview = DeploymentsCancelPreview'
{ _dcpProject :: !Text
, _dcpPayload :: !DeploymentsCancelPreviewRequest
, _dcpDeployment :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsCancelPreview
:: Text
-> DeploymentsCancelPreviewRequest
-> Text
-> DeploymentsCancelPreview
deploymentsCancelPreview pDcpProject_ pDcpPayload_ pDcpDeployment_ =
DeploymentsCancelPreview'
{ _dcpProject = pDcpProject_
, _dcpPayload = pDcpPayload_
, _dcpDeployment = pDcpDeployment_
}
dcpProject :: Lens' DeploymentsCancelPreview Text
dcpProject
= lens _dcpProject (\ s a -> s{_dcpProject = a})
dcpPayload :: Lens' DeploymentsCancelPreview DeploymentsCancelPreviewRequest
dcpPayload
= lens _dcpPayload (\ s a -> s{_dcpPayload = a})
dcpDeployment :: Lens' DeploymentsCancelPreview Text
dcpDeployment
= lens _dcpDeployment
(\ s a -> s{_dcpDeployment = a})
instance GoogleRequest DeploymentsCancelPreview where
type Rs DeploymentsCancelPreview = Operation
type Scopes DeploymentsCancelPreview =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsCancelPreview'{..}
= go _dcpProject _dcpDeployment (Just AltJSON)
_dcpPayload
deploymentManagerService
where go
= buildClient
(Proxy :: Proxy DeploymentsCancelPreviewResource)
mempty