{-# 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.Ml.Projects.Jobs.SetIAMPolicy
(
ProjectsJobsSetIAMPolicyResource
, projectsJobsSetIAMPolicy
, ProjectsJobsSetIAMPolicy
, pjsipXgafv
, pjsipUploadProtocol
, pjsipAccessToken
, pjsipUploadType
, pjsipPayload
, pjsipResource
, pjsipCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsJobsSetIAMPolicyResource =
"v1" :>
CaptureMode "resource" "setIamPolicy" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleIAMV1__SetIAMPolicyRequest :>
Post '[JSON] GoogleIAMV1__Policy
data ProjectsJobsSetIAMPolicy = ProjectsJobsSetIAMPolicy'
{ _pjsipXgafv :: !(Maybe Xgafv)
, _pjsipUploadProtocol :: !(Maybe Text)
, _pjsipAccessToken :: !(Maybe Text)
, _pjsipUploadType :: !(Maybe Text)
, _pjsipPayload :: !GoogleIAMV1__SetIAMPolicyRequest
, _pjsipResource :: !Text
, _pjsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsSetIAMPolicy
:: GoogleIAMV1__SetIAMPolicyRequest
-> Text
-> ProjectsJobsSetIAMPolicy
projectsJobsSetIAMPolicy pPjsipPayload_ pPjsipResource_ =
ProjectsJobsSetIAMPolicy'
{ _pjsipXgafv = Nothing
, _pjsipUploadProtocol = Nothing
, _pjsipAccessToken = Nothing
, _pjsipUploadType = Nothing
, _pjsipPayload = pPjsipPayload_
, _pjsipResource = pPjsipResource_
, _pjsipCallback = Nothing
}
pjsipXgafv :: Lens' ProjectsJobsSetIAMPolicy (Maybe Xgafv)
pjsipXgafv
= lens _pjsipXgafv (\ s a -> s{_pjsipXgafv = a})
pjsipUploadProtocol :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text)
pjsipUploadProtocol
= lens _pjsipUploadProtocol
(\ s a -> s{_pjsipUploadProtocol = a})
pjsipAccessToken :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text)
pjsipAccessToken
= lens _pjsipAccessToken
(\ s a -> s{_pjsipAccessToken = a})
pjsipUploadType :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text)
pjsipUploadType
= lens _pjsipUploadType
(\ s a -> s{_pjsipUploadType = a})
pjsipPayload :: Lens' ProjectsJobsSetIAMPolicy GoogleIAMV1__SetIAMPolicyRequest
pjsipPayload
= lens _pjsipPayload (\ s a -> s{_pjsipPayload = a})
pjsipResource :: Lens' ProjectsJobsSetIAMPolicy Text
pjsipResource
= lens _pjsipResource
(\ s a -> s{_pjsipResource = a})
pjsipCallback :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text)
pjsipCallback
= lens _pjsipCallback
(\ s a -> s{_pjsipCallback = a})
instance GoogleRequest ProjectsJobsSetIAMPolicy where
type Rs ProjectsJobsSetIAMPolicy =
GoogleIAMV1__Policy
type Scopes ProjectsJobsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsJobsSetIAMPolicy'{..}
= go _pjsipResource _pjsipXgafv _pjsipUploadProtocol
_pjsipAccessToken
_pjsipUploadType
_pjsipCallback
(Just AltJSON)
_pjsipPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsSetIAMPolicyResource)
mempty