{-# 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.Directory.Roles.Update
(
RolesUpdateResource
, rolesUpdate
, RolesUpdate
, ruPayload
, ruRoleId
, ruCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RolesUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roles" :>
Capture "roleId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Role :> Put '[JSON] Role
data RolesUpdate = RolesUpdate'
{ _ruPayload :: !Role
, _ruRoleId :: !Text
, _ruCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
rolesUpdate
:: Role
-> Text
-> Text
-> RolesUpdate
rolesUpdate pRuPayload_ pRuRoleId_ pRuCustomer_ =
RolesUpdate'
{ _ruPayload = pRuPayload_
, _ruRoleId = pRuRoleId_
, _ruCustomer = pRuCustomer_
}
ruPayload :: Lens' RolesUpdate Role
ruPayload
= lens _ruPayload (\ s a -> s{_ruPayload = a})
ruRoleId :: Lens' RolesUpdate Text
ruRoleId = lens _ruRoleId (\ s a -> s{_ruRoleId = a})
ruCustomer :: Lens' RolesUpdate Text
ruCustomer
= lens _ruCustomer (\ s a -> s{_ruCustomer = a})
instance GoogleRequest RolesUpdate where
type Rs RolesUpdate = Role
type Scopes RolesUpdate =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement"]
requestClient RolesUpdate'{..}
= go _ruCustomer _ruRoleId (Just AltJSON) _ruPayload
directoryService
where go
= buildClient (Proxy :: Proxy RolesUpdateResource)
mempty