{-# 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.MachineTypes.Get
(
MachineTypesGetResource
, machineTypesGet
, MachineTypesGet
, mtgProject
, mtgZone
, mtgMachineType
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type MachineTypesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"machineTypes" :>
Capture "machineType" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] MachineType
data MachineTypesGet = MachineTypesGet'
{ _mtgProject :: !Text
, _mtgZone :: !Text
, _mtgMachineType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
machineTypesGet
:: Text
-> Text
-> Text
-> MachineTypesGet
machineTypesGet pMtgProject_ pMtgZone_ pMtgMachineType_ =
MachineTypesGet'
{ _mtgProject = pMtgProject_
, _mtgZone = pMtgZone_
, _mtgMachineType = pMtgMachineType_
}
mtgProject :: Lens' MachineTypesGet Text
mtgProject
= lens _mtgProject (\ s a -> s{_mtgProject = a})
mtgZone :: Lens' MachineTypesGet Text
mtgZone = lens _mtgZone (\ s a -> s{_mtgZone = a})
mtgMachineType :: Lens' MachineTypesGet Text
mtgMachineType
= lens _mtgMachineType
(\ s a -> s{_mtgMachineType = a})
instance GoogleRequest MachineTypesGet where
type Rs MachineTypesGet = MachineType
type Scopes MachineTypesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient MachineTypesGet'{..}
= go _mtgProject _mtgZone _mtgMachineType
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy MachineTypesGetResource)
mempty