{-# 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.LicenseCodes.Get
(
LicenseCodesGetResource
, licenseCodesGet
, LicenseCodesGet
, lcgProject
, lcgLicenseCode
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicenseCodesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenseCodes" :>
Capture "licenseCode" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] LicenseCode
data LicenseCodesGet = LicenseCodesGet'
{ _lcgProject :: !Text
, _lcgLicenseCode :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseCodesGet
:: Text
-> Text
-> LicenseCodesGet
licenseCodesGet pLcgProject_ pLcgLicenseCode_ =
LicenseCodesGet'
{ _lcgProject = pLcgProject_
, _lcgLicenseCode = pLcgLicenseCode_
}
lcgProject :: Lens' LicenseCodesGet Text
lcgProject
= lens _lcgProject (\ s a -> s{_lcgProject = a})
lcgLicenseCode :: Lens' LicenseCodesGet Text
lcgLicenseCode
= lens _lcgLicenseCode
(\ s a -> s{_lcgLicenseCode = a})
instance GoogleRequest LicenseCodesGet where
type Rs LicenseCodesGet = LicenseCode
type Scopes LicenseCodesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient LicenseCodesGet'{..}
= go _lcgProject _lcgLicenseCode (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy LicenseCodesGetResource)
mempty