{-# 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.Stop
(
DeploymentsStopResource
, deploymentsStop
, DeploymentsStop
, dsProject
, dsPayload
, dsDeployment
) where
import Network.Google.DeploymentManager.Types
import Network.Google.Prelude
type DeploymentsStopResource =
"deploymentmanager" :>
"v2" :>
"projects" :>
Capture "project" Text :>
"global" :>
"deployments" :>
Capture "deployment" Text :>
"stop" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DeploymentsStopRequest :>
Post '[JSON] Operation
data DeploymentsStop = DeploymentsStop'
{ _dsProject :: !Text
, _dsPayload :: !DeploymentsStopRequest
, _dsDeployment :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
deploymentsStop
:: Text
-> DeploymentsStopRequest
-> Text
-> DeploymentsStop
deploymentsStop pDsProject_ pDsPayload_ pDsDeployment_ =
DeploymentsStop'
{ _dsProject = pDsProject_
, _dsPayload = pDsPayload_
, _dsDeployment = pDsDeployment_
}
dsProject :: Lens' DeploymentsStop Text
dsProject
= lens _dsProject (\ s a -> s{_dsProject = a})
dsPayload :: Lens' DeploymentsStop DeploymentsStopRequest
dsPayload
= lens _dsPayload (\ s a -> s{_dsPayload = a})
dsDeployment :: Lens' DeploymentsStop Text
dsDeployment
= lens _dsDeployment (\ s a -> s{_dsDeployment = a})
instance GoogleRequest DeploymentsStop where
type Rs DeploymentsStop = Operation
type Scopes DeploymentsStop =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient DeploymentsStop'{..}
= go _dsProject _dsDeployment (Just AltJSON)
_dsPayload
deploymentManagerService
where go
= buildClient
(Proxy :: Proxy DeploymentsStopResource)
mempty