{-# 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.Licenses.Get
(
LicensesGetResource
, licensesGet
, LicensesGet
, lgProject
, lgLicense
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicensesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenses" :>
Capture "license" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] License
data LicensesGet = LicensesGet'
{ _lgProject :: !Text
, _lgLicense :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licensesGet
:: Text
-> Text
-> LicensesGet
licensesGet pLgProject_ pLgLicense_ =
LicensesGet'
{ _lgProject = pLgProject_
, _lgLicense = pLgLicense_
}
lgProject :: Lens' LicensesGet Text
lgProject
= lens _lgProject (\ s a -> s{_lgProject = a})
lgLicense :: Lens' LicensesGet Text
lgLicense
= lens _lgLicense (\ s a -> s{_lgLicense = a})
instance GoogleRequest LicensesGet where
type Rs LicensesGet = License
type Scopes LicensesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient LicensesGet'{..}
= go _lgProject _lgLicense (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy LicensesGetResource)
mempty