{-# 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.Compute.Instances.Start
(
InstancesStartResource
, instancesStart
, InstancesStart
, insnRequestId
, insnProject
, insnZone
, insnInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesStartResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"start" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesStart = InstancesStart'
{ _insnRequestId :: !(Maybe Text)
, _insnProject :: !Text
, _insnZone :: !Text
, _insnInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesStart
:: Text
-> Text
-> Text
-> InstancesStart
instancesStart pInsnProject_ pInsnZone_ pInsnInstance_ =
InstancesStart'
{ _insnRequestId = Nothing
, _insnProject = pInsnProject_
, _insnZone = pInsnZone_
, _insnInstance = pInsnInstance_
}
insnRequestId :: Lens' InstancesStart (Maybe Text)
insnRequestId
= lens _insnRequestId
(\ s a -> s{_insnRequestId = a})
insnProject :: Lens' InstancesStart Text
insnProject
= lens _insnProject (\ s a -> s{_insnProject = a})
insnZone :: Lens' InstancesStart Text
insnZone = lens _insnZone (\ s a -> s{_insnZone = a})
insnInstance :: Lens' InstancesStart Text
insnInstance
= lens _insnInstance (\ s a -> s{_insnInstance = a})
instance GoogleRequest InstancesStart where
type Rs InstancesStart = Operation
type Scopes InstancesStart =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesStart'{..}
= go _insnProject _insnZone _insnInstance
_insnRequestId
(Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy InstancesStartResource)
mempty