{-# 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.Insert
(
LicenseAssignmentsInsertResource
, licenseAssignmentsInsert
, LicenseAssignmentsInsert
, laiSKUId
, laiPayload
, laiProductId
) where
import Network.Google.AppsLicensing.Types
import Network.Google.Prelude
type LicenseAssignmentsInsertResource =
"apps" :>
"licensing" :>
"v1" :>
"product" :>
Capture "productId" Text :>
"sku" :>
Capture "skuId" Text :>
"user" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LicenseAssignmentInsert :>
Post '[JSON] LicenseAssignment
data LicenseAssignmentsInsert = LicenseAssignmentsInsert'
{ _laiSKUId :: !Text
, _laiPayload :: !LicenseAssignmentInsert
, _laiProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licenseAssignmentsInsert
:: Text
-> LicenseAssignmentInsert
-> Text
-> LicenseAssignmentsInsert
licenseAssignmentsInsert pLaiSKUId_ pLaiPayload_ pLaiProductId_ =
LicenseAssignmentsInsert'
{ _laiSKUId = pLaiSKUId_
, _laiPayload = pLaiPayload_
, _laiProductId = pLaiProductId_
}
laiSKUId :: Lens' LicenseAssignmentsInsert Text
laiSKUId = lens _laiSKUId (\ s a -> s{_laiSKUId = a})
laiPayload :: Lens' LicenseAssignmentsInsert LicenseAssignmentInsert
laiPayload
= lens _laiPayload (\ s a -> s{_laiPayload = a})
laiProductId :: Lens' LicenseAssignmentsInsert Text
laiProductId
= lens _laiProductId (\ s a -> s{_laiProductId = a})
instance GoogleRequest LicenseAssignmentsInsert where
type Rs LicenseAssignmentsInsert = LicenseAssignment
type Scopes LicenseAssignmentsInsert =
'["https://www.googleapis.com/auth/apps.licensing"]
requestClient LicenseAssignmentsInsert'{..}
= go _laiProductId _laiSKUId (Just AltJSON)
_laiPayload
appsLicensingService
where go
= buildClient
(Proxy :: Proxy LicenseAssignmentsInsertResource)
mempty