{-# 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.Insert
(
UsersInsertResource
, usersInsert
, UsersInsert
, uiEnterpriseId
, uiPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersInsertResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] User :> Post '[JSON] User
data UsersInsert = UsersInsert'
{ _uiEnterpriseId :: !Text
, _uiPayload :: !User
} deriving (Eq,Show,Data,Typeable,Generic)
usersInsert
:: Text
-> User
-> UsersInsert
usersInsert pUiEnterpriseId_ pUiPayload_ =
UsersInsert'
{ _uiEnterpriseId = pUiEnterpriseId_
, _uiPayload = pUiPayload_
}
uiEnterpriseId :: Lens' UsersInsert Text
uiEnterpriseId
= lens _uiEnterpriseId
(\ s a -> s{_uiEnterpriseId = a})
uiPayload :: Lens' UsersInsert User
uiPayload
= lens _uiPayload (\ s a -> s{_uiPayload = a})
instance GoogleRequest UsersInsert where
type Rs UsersInsert = User
type Scopes UsersInsert =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersInsert'{..}
= go _uiEnterpriseId (Just AltJSON) _uiPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy UsersInsertResource)
mempty