{-# 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.Snapshots.SetLabels
(
SnapshotsSetLabelsResource
, snapshotsSetLabels
, SnapshotsSetLabels
, sslProject
, sslPayload
, sslResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SnapshotsSetLabelsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"snapshots" :>
Capture "resource" Text :>
"setLabels" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GlobalSetLabelsRequest :>
Post '[JSON] Operation
data SnapshotsSetLabels = SnapshotsSetLabels'
{ _sslProject :: !Text
, _sslPayload :: !GlobalSetLabelsRequest
, _sslResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
snapshotsSetLabels
:: Text
-> GlobalSetLabelsRequest
-> Text
-> SnapshotsSetLabels
snapshotsSetLabels pSslProject_ pSslPayload_ pSslResource_ =
SnapshotsSetLabels'
{ _sslProject = pSslProject_
, _sslPayload = pSslPayload_
, _sslResource = pSslResource_
}
sslProject :: Lens' SnapshotsSetLabels Text
sslProject
= lens _sslProject (\ s a -> s{_sslProject = a})
sslPayload :: Lens' SnapshotsSetLabels GlobalSetLabelsRequest
sslPayload
= lens _sslPayload (\ s a -> s{_sslPayload = a})
sslResource :: Lens' SnapshotsSetLabels Text
sslResource
= lens _sslResource (\ s a -> s{_sslResource = a})
instance GoogleRequest SnapshotsSetLabels where
type Rs SnapshotsSetLabels = Operation
type Scopes SnapshotsSetLabels =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SnapshotsSetLabels'{..}
= go _sslProject _sslResource (Just AltJSON)
_sslPayload
computeService
where go
= buildClient
(Proxy :: Proxy SnapshotsSetLabelsResource)
mempty