{-# 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.Images.SetLabels
(
ImagesSetLabelsResource
, imagesSetLabels
, ImagesSetLabels
, islsProject
, islsPayload
, islsResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesSetLabelsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
Capture "resource" Text :>
"setLabels" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GlobalSetLabelsRequest :>
Post '[JSON] Operation
data ImagesSetLabels = ImagesSetLabels'
{ _islsProject :: !Text
, _islsPayload :: !GlobalSetLabelsRequest
, _islsResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
imagesSetLabels
:: Text
-> GlobalSetLabelsRequest
-> Text
-> ImagesSetLabels
imagesSetLabels pIslsProject_ pIslsPayload_ pIslsResource_ =
ImagesSetLabels'
{ _islsProject = pIslsProject_
, _islsPayload = pIslsPayload_
, _islsResource = pIslsResource_
}
islsProject :: Lens' ImagesSetLabels Text
islsProject
= lens _islsProject (\ s a -> s{_islsProject = a})
islsPayload :: Lens' ImagesSetLabels GlobalSetLabelsRequest
islsPayload
= lens _islsPayload (\ s a -> s{_islsPayload = a})
islsResource :: Lens' ImagesSetLabels Text
islsResource
= lens _islsResource (\ s a -> s{_islsResource = a})
instance GoogleRequest ImagesSetLabels where
type Rs ImagesSetLabels = Operation
type Scopes ImagesSetLabels =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ImagesSetLabels'{..}
= go _islsProject _islsResource (Just AltJSON)
_islsPayload
computeService
where go
= buildClient
(Proxy :: Proxy ImagesSetLabelsResource)
mempty