{-# 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.SetMetadata
(
InstancesSetMetadataResource
, instancesSetMetadata
, InstancesSetMetadata
, ismRequestId
, ismProject
, ismZone
, ismPayload
, ismInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetMetadataResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setMetadata" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Metadata :> Post '[JSON] Operation
data InstancesSetMetadata = InstancesSetMetadata'
{ _ismRequestId :: !(Maybe Text)
, _ismProject :: !Text
, _ismZone :: !Text
, _ismPayload :: !Metadata
, _ismInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetMetadata
:: Text
-> Text
-> Metadata
-> Text
-> InstancesSetMetadata
instancesSetMetadata pIsmProject_ pIsmZone_ pIsmPayload_ pIsmInstance_ =
InstancesSetMetadata'
{ _ismRequestId = Nothing
, _ismProject = pIsmProject_
, _ismZone = pIsmZone_
, _ismPayload = pIsmPayload_
, _ismInstance = pIsmInstance_
}
ismRequestId :: Lens' InstancesSetMetadata (Maybe Text)
ismRequestId
= lens _ismRequestId (\ s a -> s{_ismRequestId = a})
ismProject :: Lens' InstancesSetMetadata Text
ismProject
= lens _ismProject (\ s a -> s{_ismProject = a})
ismZone :: Lens' InstancesSetMetadata Text
ismZone = lens _ismZone (\ s a -> s{_ismZone = a})
ismPayload :: Lens' InstancesSetMetadata Metadata
ismPayload
= lens _ismPayload (\ s a -> s{_ismPayload = a})
ismInstance :: Lens' InstancesSetMetadata Text
ismInstance
= lens _ismInstance (\ s a -> s{_ismInstance = a})
instance GoogleRequest InstancesSetMetadata where
type Rs InstancesSetMetadata = Operation
type Scopes InstancesSetMetadata =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetMetadata'{..}
= go _ismProject _ismZone _ismInstance _ismRequestId
(Just AltJSON)
_ismPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetMetadataResource)
mempty