{-# 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.SetTags
(
InstancesSetTagsResource
, instancesSetTags
, InstancesSetTags
, istRequestId
, istProject
, istZone
, istPayload
, istInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetTagsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setTags" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Tags :> Post '[JSON] Operation
data InstancesSetTags =
InstancesSetTags'
{ _istRequestId :: !(Maybe Text)
, _istProject :: !Text
, _istZone :: !Text
, _istPayload :: !Tags
, _istInstance :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
instancesSetTags
:: Text
-> Text
-> Tags
-> Text
-> InstancesSetTags
instancesSetTags pIstProject_ pIstZone_ pIstPayload_ pIstInstance_ =
InstancesSetTags'
{ _istRequestId = Nothing
, _istProject = pIstProject_
, _istZone = pIstZone_
, _istPayload = pIstPayload_
, _istInstance = pIstInstance_
}
istRequestId :: Lens' InstancesSetTags (Maybe Text)
istRequestId
= lens _istRequestId (\ s a -> s{_istRequestId = a})
istProject :: Lens' InstancesSetTags Text
istProject
= lens _istProject (\ s a -> s{_istProject = a})
istZone :: Lens' InstancesSetTags Text
istZone = lens _istZone (\ s a -> s{_istZone = a})
istPayload :: Lens' InstancesSetTags Tags
istPayload
= lens _istPayload (\ s a -> s{_istPayload = a})
istInstance :: Lens' InstancesSetTags Text
istInstance
= lens _istInstance (\ s a -> s{_istInstance = a})
instance GoogleRequest InstancesSetTags where
type Rs InstancesSetTags = Operation
type Scopes InstancesSetTags =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetTags'{..}
= go _istProject _istZone _istInstance _istRequestId
(Just AltJSON)
_istPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetTagsResource)
mempty