{-# 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.Licensing.LicenseAssignments.Get
(
LicenseAssignmentsGetResource
, licenseAssignmentsGet
, LicenseAssignmentsGet
, lagSKUId
, lagUserId
, lagProductId
) where
import Network.Google.AppsLicensing.Types
import Network.Google.Prelude
type LicenseAssignmentsGetResource =
"apps" :>
"licensing" :>
"v1" :>
"product" :>
Capture "productId" Text :>
"sku" :>
Capture "skuId" Text :>
"user" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] LicenseAssignment
data LicenseAssignmentsGet = LicenseAssignmentsGet'
{ _lagSKUId :: !Text
, _lagUserId :: !Text
, _lagProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseAssignmentsGet
:: Text
-> Text
-> Text
-> LicenseAssignmentsGet
licenseAssignmentsGet pLagSKUId_ pLagUserId_ pLagProductId_ =
LicenseAssignmentsGet'
{ _lagSKUId = pLagSKUId_
, _lagUserId = pLagUserId_
, _lagProductId = pLagProductId_
}
lagSKUId :: Lens' LicenseAssignmentsGet Text
lagSKUId = lens _lagSKUId (\ s a -> s{_lagSKUId = a})
lagUserId :: Lens' LicenseAssignmentsGet Text
lagUserId
= lens _lagUserId (\ s a -> s{_lagUserId = a})
lagProductId :: Lens' LicenseAssignmentsGet Text
lagProductId
= lens _lagProductId (\ s a -> s{_lagProductId = a})
instance GoogleRequest LicenseAssignmentsGet where
type Rs LicenseAssignmentsGet = LicenseAssignment
type Scopes LicenseAssignmentsGet =
'["https://www.googleapis.com/auth/apps.licensing"]
requestClient LicenseAssignmentsGet'{..}
= go _lagProductId _lagSKUId _lagUserId
(Just AltJSON)
appsLicensingService
where go
= buildClient
(Proxy :: Proxy LicenseAssignmentsGetResource)
mempty