{-# 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.IAM.Organizations.Roles.Patch
(
OrganizationsRolesPatchResource
, organizationsRolesPatch
, OrganizationsRolesPatch
, orpXgafv
, orpUploadProtocol
, orpUpdateMask
, orpAccessToken
, orpUploadType
, orpPayload
, orpName
, orpCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type OrganizationsRolesPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Role :> Patch '[JSON] Role
data OrganizationsRolesPatch = OrganizationsRolesPatch'
{ _orpXgafv :: !(Maybe Xgafv)
, _orpUploadProtocol :: !(Maybe Text)
, _orpUpdateMask :: !(Maybe GFieldMask)
, _orpAccessToken :: !(Maybe Text)
, _orpUploadType :: !(Maybe Text)
, _orpPayload :: !Role
, _orpName :: !Text
, _orpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsRolesPatch
:: Role
-> Text
-> OrganizationsRolesPatch
organizationsRolesPatch pOrpPayload_ pOrpName_ =
OrganizationsRolesPatch'
{ _orpXgafv = Nothing
, _orpUploadProtocol = Nothing
, _orpUpdateMask = Nothing
, _orpAccessToken = Nothing
, _orpUploadType = Nothing
, _orpPayload = pOrpPayload_
, _orpName = pOrpName_
, _orpCallback = Nothing
}
orpXgafv :: Lens' OrganizationsRolesPatch (Maybe Xgafv)
orpXgafv = lens _orpXgafv (\ s a -> s{_orpXgafv = a})
orpUploadProtocol :: Lens' OrganizationsRolesPatch (Maybe Text)
orpUploadProtocol
= lens _orpUploadProtocol
(\ s a -> s{_orpUploadProtocol = a})
orpUpdateMask :: Lens' OrganizationsRolesPatch (Maybe GFieldMask)
orpUpdateMask
= lens _orpUpdateMask
(\ s a -> s{_orpUpdateMask = a})
orpAccessToken :: Lens' OrganizationsRolesPatch (Maybe Text)
orpAccessToken
= lens _orpAccessToken
(\ s a -> s{_orpAccessToken = a})
orpUploadType :: Lens' OrganizationsRolesPatch (Maybe Text)
orpUploadType
= lens _orpUploadType
(\ s a -> s{_orpUploadType = a})
orpPayload :: Lens' OrganizationsRolesPatch Role
orpPayload
= lens _orpPayload (\ s a -> s{_orpPayload = a})
orpName :: Lens' OrganizationsRolesPatch Text
orpName = lens _orpName (\ s a -> s{_orpName = a})
orpCallback :: Lens' OrganizationsRolesPatch (Maybe Text)
orpCallback
= lens _orpCallback (\ s a -> s{_orpCallback = a})
instance GoogleRequest OrganizationsRolesPatch where
type Rs OrganizationsRolesPatch = Role
type Scopes OrganizationsRolesPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OrganizationsRolesPatch'{..}
= go _orpName _orpXgafv _orpUploadProtocol
_orpUpdateMask
_orpAccessToken
_orpUploadType
_orpCallback
(Just AltJSON)
_orpPayload
iAMService
where go
= buildClient
(Proxy :: Proxy OrganizationsRolesPatchResource)
mempty