{-# 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.DiskTypes.Get
(
DiskTypesGetResource
, diskTypesGet
, DiskTypesGet
, dtgProject
, dtgZone
, dtgDiskType
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DiskTypesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"diskTypes" :>
Capture "diskType" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DiskType
data DiskTypesGet = DiskTypesGet'
{ _dtgProject :: !Text
, _dtgZone :: !Text
, _dtgDiskType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
diskTypesGet
:: Text
-> Text
-> Text
-> DiskTypesGet
diskTypesGet pDtgProject_ pDtgZone_ pDtgDiskType_ =
DiskTypesGet'
{ _dtgProject = pDtgProject_
, _dtgZone = pDtgZone_
, _dtgDiskType = pDtgDiskType_
}
dtgProject :: Lens' DiskTypesGet Text
dtgProject
= lens _dtgProject (\ s a -> s{_dtgProject = a})
dtgZone :: Lens' DiskTypesGet Text
dtgZone = lens _dtgZone (\ s a -> s{_dtgZone = a})
dtgDiskType :: Lens' DiskTypesGet Text
dtgDiskType
= lens _dtgDiskType (\ s a -> s{_dtgDiskType = a})
instance GoogleRequest DiskTypesGet where
type Rs DiskTypesGet = DiskType
type Scopes DiskTypesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient DiskTypesGet'{..}
= go _dtgProject _dtgZone _dtgDiskType (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy DiskTypesGetResource)
mempty