{-# 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.SetScheduling
(
InstancesSetSchedulingResource
, instancesSetScheduling
, InstancesSetScheduling
, issRequestId
, issProject
, issZone
, issPayload
, issInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetSchedulingResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setScheduling" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Scheduling :> Post '[JSON] Operation
data InstancesSetScheduling = InstancesSetScheduling'
{ _issRequestId :: !(Maybe Text)
, _issProject :: !Text
, _issZone :: !Text
, _issPayload :: !Scheduling
, _issInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetScheduling
:: Text
-> Text
-> Scheduling
-> Text
-> InstancesSetScheduling
instancesSetScheduling pIssProject_ pIssZone_ pIssPayload_ pIssInstance_ =
InstancesSetScheduling'
{ _issRequestId = Nothing
, _issProject = pIssProject_
, _issZone = pIssZone_
, _issPayload = pIssPayload_
, _issInstance = pIssInstance_
}
issRequestId :: Lens' InstancesSetScheduling (Maybe Text)
issRequestId
= lens _issRequestId (\ s a -> s{_issRequestId = a})
issProject :: Lens' InstancesSetScheduling Text
issProject
= lens _issProject (\ s a -> s{_issProject = a})
issZone :: Lens' InstancesSetScheduling Text
issZone = lens _issZone (\ s a -> s{_issZone = a})
issPayload :: Lens' InstancesSetScheduling Scheduling
issPayload
= lens _issPayload (\ s a -> s{_issPayload = a})
issInstance :: Lens' InstancesSetScheduling Text
issInstance
= lens _issInstance (\ s a -> s{_issInstance = a})
instance GoogleRequest InstancesSetScheduling where
type Rs InstancesSetScheduling = Operation
type Scopes InstancesSetScheduling =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetScheduling'{..}
= go _issProject _issZone _issInstance _issRequestId
(Just AltJSON)
_issPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetSchedulingResource)
mempty