{-# 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.Patch
(
RolesPatchResource
, rolesPatch
, RolesPatch
, rpPayload
, rpRoleId
, rpCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type RolesPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"roles" :>
Capture "roleId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Role :> Patch '[JSON] Role
data RolesPatch = RolesPatch'
{ _rpPayload :: !Role
, _rpRoleId :: !Text
, _rpCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
rolesPatch
:: Role
-> Text
-> Text
-> RolesPatch
rolesPatch pRpPayload_ pRpRoleId_ pRpCustomer_ =
RolesPatch'
{ _rpPayload = pRpPayload_
, _rpRoleId = pRpRoleId_
, _rpCustomer = pRpCustomer_
}
rpPayload :: Lens' RolesPatch Role
rpPayload
= lens _rpPayload (\ s a -> s{_rpPayload = a})
rpRoleId :: Lens' RolesPatch Text
rpRoleId = lens _rpRoleId (\ s a -> s{_rpRoleId = a})
rpCustomer :: Lens' RolesPatch Text
rpCustomer
= lens _rpCustomer (\ s a -> s{_rpCustomer = a})
instance GoogleRequest RolesPatch where
type Rs RolesPatch = Role
type Scopes RolesPatch =
'["https://www.googleapis.com/auth/admin.directory.rolemanagement"]
requestClient RolesPatch'{..}
= go _rpCustomer _rpRoleId (Just AltJSON) _rpPayload
directoryService
where go
= buildClient (Proxy :: Proxy RolesPatchResource)
mempty