{-# 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.SetLabels
(
InstancesSetLabelsResource
, instancesSetLabels
, InstancesSetLabels
, islRequestId
, islProject
, islZone
, islPayload
, islInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetLabelsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setLabels" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesSetLabelsRequest :>
Post '[JSON] Operation
data InstancesSetLabels = InstancesSetLabels'
{ _islRequestId :: !(Maybe Text)
, _islProject :: !Text
, _islZone :: !Text
, _islPayload :: !InstancesSetLabelsRequest
, _islInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetLabels
:: Text
-> Text
-> InstancesSetLabelsRequest
-> Text
-> InstancesSetLabels
instancesSetLabels pIslProject_ pIslZone_ pIslPayload_ pIslInstance_ =
InstancesSetLabels'
{ _islRequestId = Nothing
, _islProject = pIslProject_
, _islZone = pIslZone_
, _islPayload = pIslPayload_
, _islInstance = pIslInstance_
}
islRequestId :: Lens' InstancesSetLabels (Maybe Text)
islRequestId
= lens _islRequestId (\ s a -> s{_islRequestId = a})
islProject :: Lens' InstancesSetLabels Text
islProject
= lens _islProject (\ s a -> s{_islProject = a})
islZone :: Lens' InstancesSetLabels Text
islZone = lens _islZone (\ s a -> s{_islZone = a})
islPayload :: Lens' InstancesSetLabels InstancesSetLabelsRequest
islPayload
= lens _islPayload (\ s a -> s{_islPayload = a})
islInstance :: Lens' InstancesSetLabels Text
islInstance
= lens _islInstance (\ s a -> s{_islInstance = a})
instance GoogleRequest InstancesSetLabels where
type Rs InstancesSetLabels = Operation
type Scopes InstancesSetLabels =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetLabels'{..}
= go _islProject _islZone _islInstance _islRequestId
(Just AltJSON)
_islPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetLabelsResource)
mempty