{-# 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.Update
(
LicenseAssignmentsUpdateResource
, licenseAssignmentsUpdate
, LicenseAssignmentsUpdate
, lauSKUId
, lauPayload
, lauUserId
, lauProductId
) where
import Network.Google.AppsLicensing.Types
import Network.Google.Prelude
type LicenseAssignmentsUpdateResource =
"apps" :>
"licensing" :>
"v1" :>
"product" :>
Capture "productId" Text :>
"sku" :>
Capture "skuId" Text :>
"user" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LicenseAssignment :>
Put '[JSON] LicenseAssignment
data LicenseAssignmentsUpdate = LicenseAssignmentsUpdate'
{ _lauSKUId :: !Text
, _lauPayload :: !LicenseAssignment
, _lauUserId :: !Text
, _lauProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseAssignmentsUpdate
:: Text
-> LicenseAssignment
-> Text
-> Text
-> LicenseAssignmentsUpdate
licenseAssignmentsUpdate pLauSKUId_ pLauPayload_ pLauUserId_ pLauProductId_ =
LicenseAssignmentsUpdate'
{ _lauSKUId = pLauSKUId_
, _lauPayload = pLauPayload_
, _lauUserId = pLauUserId_
, _lauProductId = pLauProductId_
}
lauSKUId :: Lens' LicenseAssignmentsUpdate Text
lauSKUId = lens _lauSKUId (\ s a -> s{_lauSKUId = a})
lauPayload :: Lens' LicenseAssignmentsUpdate LicenseAssignment
lauPayload
= lens _lauPayload (\ s a -> s{_lauPayload = a})
lauUserId :: Lens' LicenseAssignmentsUpdate Text
lauUserId
= lens _lauUserId (\ s a -> s{_lauUserId = a})
lauProductId :: Lens' LicenseAssignmentsUpdate Text
lauProductId
= lens _lauProductId (\ s a -> s{_lauProductId = a})
instance GoogleRequest LicenseAssignmentsUpdate where
type Rs LicenseAssignmentsUpdate = LicenseAssignment
type Scopes LicenseAssignmentsUpdate =
'["https://www.googleapis.com/auth/apps.licensing"]
requestClient LicenseAssignmentsUpdate'{..}
= go _lauProductId _lauSKUId _lauUserId
(Just AltJSON)
_lauPayload
appsLicensingService
where go
= buildClient
(Proxy :: Proxy LicenseAssignmentsUpdateResource)
mempty