{-# 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.Projects.Roles.Undelete
(
ProjectsRolesUndeleteResource
, projectsRolesUndelete
, ProjectsRolesUndelete
, pruXgafv
, pruUploadProtocol
, pruAccessToken
, pruUploadType
, pruPayload
, pruName
, pruCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type ProjectsRolesUndeleteResource =
"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 ProjectsRolesUndelete = ProjectsRolesUndelete'
{ _pruXgafv :: !(Maybe Xgafv)
, _pruUploadProtocol :: !(Maybe Text)
, _pruAccessToken :: !(Maybe Text)
, _pruUploadType :: !(Maybe Text)
, _pruPayload :: !UndeleteRoleRequest
, _pruName :: !Text
, _pruCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsRolesUndelete
:: UndeleteRoleRequest
-> Text
-> ProjectsRolesUndelete
projectsRolesUndelete pPruPayload_ pPruName_ =
ProjectsRolesUndelete'
{ _pruXgafv = Nothing
, _pruUploadProtocol = Nothing
, _pruAccessToken = Nothing
, _pruUploadType = Nothing
, _pruPayload = pPruPayload_
, _pruName = pPruName_
, _pruCallback = Nothing
}
pruXgafv :: Lens' ProjectsRolesUndelete (Maybe Xgafv)
pruXgafv = lens _pruXgafv (\ s a -> s{_pruXgafv = a})
pruUploadProtocol :: Lens' ProjectsRolesUndelete (Maybe Text)
pruUploadProtocol
= lens _pruUploadProtocol
(\ s a -> s{_pruUploadProtocol = a})
pruAccessToken :: Lens' ProjectsRolesUndelete (Maybe Text)
pruAccessToken
= lens _pruAccessToken
(\ s a -> s{_pruAccessToken = a})
pruUploadType :: Lens' ProjectsRolesUndelete (Maybe Text)
pruUploadType
= lens _pruUploadType
(\ s a -> s{_pruUploadType = a})
pruPayload :: Lens' ProjectsRolesUndelete UndeleteRoleRequest
pruPayload
= lens _pruPayload (\ s a -> s{_pruPayload = a})
pruName :: Lens' ProjectsRolesUndelete Text
pruName = lens _pruName (\ s a -> s{_pruName = a})
pruCallback :: Lens' ProjectsRolesUndelete (Maybe Text)
pruCallback
= lens _pruCallback (\ s a -> s{_pruCallback = a})
instance GoogleRequest ProjectsRolesUndelete where
type Rs ProjectsRolesUndelete = Role
type Scopes ProjectsRolesUndelete =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsRolesUndelete'{..}
= go _pruName _pruXgafv _pruUploadProtocol
_pruAccessToken
_pruUploadType
_pruCallback
(Just AltJSON)
_pruPayload
iAMService
where go
= buildClient
(Proxy :: Proxy ProjectsRolesUndeleteResource)
mempty