{-# 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.Projects.SetCommonInstanceMetadata
(
ProjectsSetCommonInstanceMetadataResource
, projectsSetCommonInstanceMetadata
, ProjectsSetCommonInstanceMetadata
, pscimRequestId
, pscimProject
, pscimPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsSetCommonInstanceMetadataResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"setCommonInstanceMetadata" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Metadata :> Post '[JSON] Operation
data ProjectsSetCommonInstanceMetadata = ProjectsSetCommonInstanceMetadata'
{ _pscimRequestId :: !(Maybe Text)
, _pscimProject :: !Text
, _pscimPayload :: !Metadata
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSetCommonInstanceMetadata
:: Text
-> Metadata
-> ProjectsSetCommonInstanceMetadata
projectsSetCommonInstanceMetadata pPscimProject_ pPscimPayload_ =
ProjectsSetCommonInstanceMetadata'
{ _pscimRequestId = Nothing
, _pscimProject = pPscimProject_
, _pscimPayload = pPscimPayload_
}
pscimRequestId :: Lens' ProjectsSetCommonInstanceMetadata (Maybe Text)
pscimRequestId
= lens _pscimRequestId
(\ s a -> s{_pscimRequestId = a})
pscimProject :: Lens' ProjectsSetCommonInstanceMetadata Text
pscimProject
= lens _pscimProject (\ s a -> s{_pscimProject = a})
pscimPayload :: Lens' ProjectsSetCommonInstanceMetadata Metadata
pscimPayload
= lens _pscimPayload (\ s a -> s{_pscimPayload = a})
instance GoogleRequest
ProjectsSetCommonInstanceMetadata where
type Rs ProjectsSetCommonInstanceMetadata = Operation
type Scopes ProjectsSetCommonInstanceMetadata =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ProjectsSetCommonInstanceMetadata'{..}
= go _pscimProject _pscimRequestId (Just AltJSON)
_pscimPayload
computeService
where go
= buildClient
(Proxy ::
Proxy ProjectsSetCommonInstanceMetadataResource)
mempty