{-# 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.Patch
(
LicenseAssignmentsPatchResource
, licenseAssignmentsPatch
, LicenseAssignmentsPatch
, lapSKUId
, lapPayload
, lapUserId
, lapProductId
) where
import Network.Google.AppsLicensing.Types
import Network.Google.Prelude
type LicenseAssignmentsPatchResource =
"apps" :>
"licensing" :>
"v1" :>
"product" :>
Capture "productId" Text :>
"sku" :>
Capture "skuId" Text :>
"user" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LicenseAssignment :>
Patch '[JSON] LicenseAssignment
data LicenseAssignmentsPatch = LicenseAssignmentsPatch'
{ _lapSKUId :: !Text
, _lapPayload :: !LicenseAssignment
, _lapUserId :: !Text
, _lapProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseAssignmentsPatch
:: Text
-> LicenseAssignment
-> Text
-> Text
-> LicenseAssignmentsPatch
licenseAssignmentsPatch pLapSKUId_ pLapPayload_ pLapUserId_ pLapProductId_ =
LicenseAssignmentsPatch'
{ _lapSKUId = pLapSKUId_
, _lapPayload = pLapPayload_
, _lapUserId = pLapUserId_
, _lapProductId = pLapProductId_
}
lapSKUId :: Lens' LicenseAssignmentsPatch Text
lapSKUId = lens _lapSKUId (\ s a -> s{_lapSKUId = a})
lapPayload :: Lens' LicenseAssignmentsPatch LicenseAssignment
lapPayload
= lens _lapPayload (\ s a -> s{_lapPayload = a})
lapUserId :: Lens' LicenseAssignmentsPatch Text
lapUserId
= lens _lapUserId (\ s a -> s{_lapUserId = a})
lapProductId :: Lens' LicenseAssignmentsPatch Text
lapProductId
= lens _lapProductId (\ s a -> s{_lapProductId = a})
instance GoogleRequest LicenseAssignmentsPatch where
type Rs LicenseAssignmentsPatch = LicenseAssignment
type Scopes LicenseAssignmentsPatch =
'["https://www.googleapis.com/auth/apps.licensing"]
requestClient LicenseAssignmentsPatch'{..}
= go _lapProductId _lapSKUId _lapUserId
(Just AltJSON)
_lapPayload
appsLicensingService
where go
= buildClient
(Proxy :: Proxy LicenseAssignmentsPatchResource)
mempty