{-# 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.Undelete
(
OrganizationsRolesUndeleteResource
, organizationsRolesUndelete
, OrganizationsRolesUndelete
, oruXgafv
, oruUploadProtocol
, oruAccessToken
, oruUploadType
, oruPayload
, oruName
, oruCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type OrganizationsRolesUndeleteResource =
"v1" :>
CaptureMode "name" "undelete" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UndeleteRoleRequest :>
Post '[JSON] Role
data OrganizationsRolesUndelete = OrganizationsRolesUndelete'
{ _oruXgafv :: !(Maybe Xgafv)
, _oruUploadProtocol :: !(Maybe Text)
, _oruAccessToken :: !(Maybe Text)
, _oruUploadType :: !(Maybe Text)
, _oruPayload :: !UndeleteRoleRequest
, _oruName :: !Text
, _oruCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsRolesUndelete
:: UndeleteRoleRequest
-> Text
-> OrganizationsRolesUndelete
organizationsRolesUndelete pOruPayload_ pOruName_ =
OrganizationsRolesUndelete'
{ _oruXgafv = Nothing
, _oruUploadProtocol = Nothing
, _oruAccessToken = Nothing
, _oruUploadType = Nothing
, _oruPayload = pOruPayload_
, _oruName = pOruName_
, _oruCallback = Nothing
}
oruXgafv :: Lens' OrganizationsRolesUndelete (Maybe Xgafv)
oruXgafv = lens _oruXgafv (\ s a -> s{_oruXgafv = a})
oruUploadProtocol :: Lens' OrganizationsRolesUndelete (Maybe Text)
oruUploadProtocol
= lens _oruUploadProtocol
(\ s a -> s{_oruUploadProtocol = a})
oruAccessToken :: Lens' OrganizationsRolesUndelete (Maybe Text)
oruAccessToken
= lens _oruAccessToken
(\ s a -> s{_oruAccessToken = a})
oruUploadType :: Lens' OrganizationsRolesUndelete (Maybe Text)
oruUploadType
= lens _oruUploadType
(\ s a -> s{_oruUploadType = a})
oruPayload :: Lens' OrganizationsRolesUndelete UndeleteRoleRequest
oruPayload
= lens _oruPayload (\ s a -> s{_oruPayload = a})
oruName :: Lens' OrganizationsRolesUndelete Text
oruName = lens _oruName (\ s a -> s{_oruName = a})
oruCallback :: Lens' OrganizationsRolesUndelete (Maybe Text)
oruCallback
= lens _oruCallback (\ s a -> s{_oruCallback = a})
instance GoogleRequest OrganizationsRolesUndelete
where
type Rs OrganizationsRolesUndelete = Role
type Scopes OrganizationsRolesUndelete =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OrganizationsRolesUndelete'{..}
= go _oruName _oruXgafv _oruUploadProtocol
_oruAccessToken
_oruUploadType
_oruCallback
(Just AltJSON)
_oruPayload
iAMService
where go
= buildClient
(Proxy :: Proxy OrganizationsRolesUndeleteResource)
mempty