{-# 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.RegionCommitments.Get
(
RegionCommitmentsGetResource
, regionCommitmentsGet
, RegionCommitmentsGet
, rcgProject
, rcgRegion
, rcgCommitment
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionCommitmentsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"commitments" :>
Capture "commitment" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Commitment
data RegionCommitmentsGet = RegionCommitmentsGet'
{ _rcgProject :: !Text
, _rcgRegion :: !Text
, _rcgCommitment :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionCommitmentsGet
:: Text
-> Text
-> Text
-> RegionCommitmentsGet
regionCommitmentsGet pRcgProject_ pRcgRegion_ pRcgCommitment_ =
RegionCommitmentsGet'
{ _rcgProject = pRcgProject_
, _rcgRegion = pRcgRegion_
, _rcgCommitment = pRcgCommitment_
}
rcgProject :: Lens' RegionCommitmentsGet Text
rcgProject
= lens _rcgProject (\ s a -> s{_rcgProject = a})
rcgRegion :: Lens' RegionCommitmentsGet Text
rcgRegion
= lens _rcgRegion (\ s a -> s{_rcgRegion = a})
rcgCommitment :: Lens' RegionCommitmentsGet Text
rcgCommitment
= lens _rcgCommitment
(\ s a -> s{_rcgCommitment = a})
instance GoogleRequest RegionCommitmentsGet where
type Rs RegionCommitmentsGet = Commitment
type Scopes RegionCommitmentsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionCommitmentsGet'{..}
= go _rcgProject _rcgRegion _rcgCommitment
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy RegionCommitmentsGetResource)
mempty