{-# 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.SetDefaultNetworkTier
(
ProjectsSetDefaultNetworkTierResource
, projectsSetDefaultNetworkTier
, ProjectsSetDefaultNetworkTier
, psdntRequestId
, psdntProject
, psdntPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsSetDefaultNetworkTierResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"setDefaultNetworkTier" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProjectsSetDefaultNetworkTierRequest
:> Post '[JSON] Operation
data ProjectsSetDefaultNetworkTier = ProjectsSetDefaultNetworkTier'
{ _psdntRequestId :: !(Maybe Text)
, _psdntProject :: !Text
, _psdntPayload :: !ProjectsSetDefaultNetworkTierRequest
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSetDefaultNetworkTier
:: Text
-> ProjectsSetDefaultNetworkTierRequest
-> ProjectsSetDefaultNetworkTier
projectsSetDefaultNetworkTier pPsdntProject_ pPsdntPayload_ =
ProjectsSetDefaultNetworkTier'
{ _psdntRequestId = Nothing
, _psdntProject = pPsdntProject_
, _psdntPayload = pPsdntPayload_
}
psdntRequestId :: Lens' ProjectsSetDefaultNetworkTier (Maybe Text)
psdntRequestId
= lens _psdntRequestId
(\ s a -> s{_psdntRequestId = a})
psdntProject :: Lens' ProjectsSetDefaultNetworkTier Text
psdntProject
= lens _psdntProject (\ s a -> s{_psdntProject = a})
psdntPayload :: Lens' ProjectsSetDefaultNetworkTier ProjectsSetDefaultNetworkTierRequest
psdntPayload
= lens _psdntPayload (\ s a -> s{_psdntPayload = a})
instance GoogleRequest ProjectsSetDefaultNetworkTier
where
type Rs ProjectsSetDefaultNetworkTier = Operation
type Scopes ProjectsSetDefaultNetworkTier =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ProjectsSetDefaultNetworkTier'{..}
= go _psdntProject _psdntRequestId (Just AltJSON)
_psdntPayload
computeService
where go
= buildClient
(Proxy ::
Proxy ProjectsSetDefaultNetworkTierResource)
mempty