{-# 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.EnableXpnResource
(
ProjectsEnableXpnResourceResource
, projectsEnableXpnResource
, ProjectsEnableXpnResource
, pexrRequestId
, pexrProject
, pexrPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsEnableXpnResourceResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"enableXpnResource" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProjectsEnableXpnResourceRequest :>
Post '[JSON] Operation
data ProjectsEnableXpnResource = ProjectsEnableXpnResource'
{ _pexrRequestId :: !(Maybe Text)
, _pexrProject :: !Text
, _pexrPayload :: !ProjectsEnableXpnResourceRequest
} deriving (Eq,Show,Data,Typeable,Generic)
projectsEnableXpnResource
:: Text
-> ProjectsEnableXpnResourceRequest
-> ProjectsEnableXpnResource
projectsEnableXpnResource pPexrProject_ pPexrPayload_ =
ProjectsEnableXpnResource'
{ _pexrRequestId = Nothing
, _pexrProject = pPexrProject_
, _pexrPayload = pPexrPayload_
}
pexrRequestId :: Lens' ProjectsEnableXpnResource (Maybe Text)
pexrRequestId
= lens _pexrRequestId
(\ s a -> s{_pexrRequestId = a})
pexrProject :: Lens' ProjectsEnableXpnResource Text
pexrProject
= lens _pexrProject (\ s a -> s{_pexrProject = a})
pexrPayload :: Lens' ProjectsEnableXpnResource ProjectsEnableXpnResourceRequest
pexrPayload
= lens _pexrPayload (\ s a -> s{_pexrPayload = a})
instance GoogleRequest ProjectsEnableXpnResource
where
type Rs ProjectsEnableXpnResource = Operation
type Scopes ProjectsEnableXpnResource =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ProjectsEnableXpnResource'{..}
= go _pexrProject _pexrRequestId (Just AltJSON)
_pexrPayload
computeService
where go
= buildClient
(Proxy :: Proxy ProjectsEnableXpnResourceResource)
mempty