{-# 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.AndroidEnterprise.Users.SetAvailableProductSet
(
UsersSetAvailableProductSetResource
, usersSetAvailableProductSet
, UsersSetAvailableProductSet
, usapsEnterpriseId
, usapsPayload
, usapsUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersSetAvailableProductSetResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"availableProductSet" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProductSet :> Put '[JSON] ProductSet
data UsersSetAvailableProductSet = UsersSetAvailableProductSet'
{ _usapsEnterpriseId :: !Text
, _usapsPayload :: !ProductSet
, _usapsUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSetAvailableProductSet
:: Text
-> ProductSet
-> Text
-> UsersSetAvailableProductSet
usersSetAvailableProductSet pUsapsEnterpriseId_ pUsapsPayload_ pUsapsUserId_ =
UsersSetAvailableProductSet'
{ _usapsEnterpriseId = pUsapsEnterpriseId_
, _usapsPayload = pUsapsPayload_
, _usapsUserId = pUsapsUserId_
}
usapsEnterpriseId :: Lens' UsersSetAvailableProductSet Text
usapsEnterpriseId
= lens _usapsEnterpriseId
(\ s a -> s{_usapsEnterpriseId = a})
usapsPayload :: Lens' UsersSetAvailableProductSet ProductSet
usapsPayload
= lens _usapsPayload (\ s a -> s{_usapsPayload = a})
usapsUserId :: Lens' UsersSetAvailableProductSet Text
usapsUserId
= lens _usapsUserId (\ s a -> s{_usapsUserId = a})
instance GoogleRequest UsersSetAvailableProductSet
where
type Rs UsersSetAvailableProductSet = ProductSet
type Scopes UsersSetAvailableProductSet =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersSetAvailableProductSet'{..}
= go _usapsEnterpriseId _usapsUserId (Just AltJSON)
_usapsPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy UsersSetAvailableProductSetResource)
mempty