{-# 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.RegionDisks.Get
(
RegionDisksGetResource
, regionDisksGet
, RegionDisksGet
, rdgProject
, rdgDisk
, rdgRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionDisksGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"disks" :>
Capture "disk" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Disk
data RegionDisksGet = RegionDisksGet'
{ _rdgProject :: !Text
, _rdgDisk :: !Text
, _rdgRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionDisksGet
:: Text
-> Text
-> Text
-> RegionDisksGet
regionDisksGet pRdgProject_ pRdgDisk_ pRdgRegion_ =
RegionDisksGet'
{ _rdgProject = pRdgProject_
, _rdgDisk = pRdgDisk_
, _rdgRegion = pRdgRegion_
}
rdgProject :: Lens' RegionDisksGet Text
rdgProject
= lens _rdgProject (\ s a -> s{_rdgProject = a})
rdgDisk :: Lens' RegionDisksGet Text
rdgDisk = lens _rdgDisk (\ s a -> s{_rdgDisk = a})
rdgRegion :: Lens' RegionDisksGet Text
rdgRegion
= lens _rdgRegion (\ s a -> s{_rdgRegion = a})
instance GoogleRequest RegionDisksGet where
type Rs RegionDisksGet = Disk
type Scopes RegionDisksGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient RegionDisksGet'{..}
= go _rdgProject _rdgRegion _rdgDisk (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy RegionDisksGetResource)
mempty