{-# 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.Disks.Get
(
DisksGetResource
, disksGet
, DisksGet
, dgProject
, dgDisk
, dgZone
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DisksGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"disks" :>
Capture "disk" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Disk
data DisksGet = DisksGet'
{ _dgProject :: !Text
, _dgDisk :: !Text
, _dgZone :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
disksGet
:: Text
-> Text
-> Text
-> DisksGet
disksGet pDgProject_ pDgDisk_ pDgZone_ =
DisksGet'
{ _dgProject = pDgProject_
, _dgDisk = pDgDisk_
, _dgZone = pDgZone_
}
dgProject :: Lens' DisksGet Text
dgProject
= lens _dgProject (\ s a -> s{_dgProject = a})
dgDisk :: Lens' DisksGet Text
dgDisk = lens _dgDisk (\ s a -> s{_dgDisk = a})
dgZone :: Lens' DisksGet Text
dgZone = lens _dgZone (\ s a -> s{_dgZone = a})
instance GoogleRequest DisksGet where
type Rs DisksGet = Disk
type Scopes DisksGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient DisksGet'{..}
= go _dgProject _dgZone _dgDisk (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy DisksGetResource)
mempty