{-# 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.Models.SetIAMPolicy
(
ProjectsModelsSetIAMPolicyResource
, projectsModelsSetIAMPolicy
, ProjectsModelsSetIAMPolicy
, pmsipXgafv
, pmsipUploadProtocol
, pmsipAccessToken
, pmsipUploadType
, pmsipPayload
, pmsipResource
, pmsipCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsModelsSetIAMPolicyResource =
"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 ProjectsModelsSetIAMPolicy = ProjectsModelsSetIAMPolicy'
{ _pmsipXgafv :: !(Maybe Xgafv)
, _pmsipUploadProtocol :: !(Maybe Text)
, _pmsipAccessToken :: !(Maybe Text)
, _pmsipUploadType :: !(Maybe Text)
, _pmsipPayload :: !GoogleIAMV1__SetIAMPolicyRequest
, _pmsipResource :: !Text
, _pmsipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsModelsSetIAMPolicy
:: GoogleIAMV1__SetIAMPolicyRequest
-> Text
-> ProjectsModelsSetIAMPolicy
projectsModelsSetIAMPolicy pPmsipPayload_ pPmsipResource_ =
ProjectsModelsSetIAMPolicy'
{ _pmsipXgafv = Nothing
, _pmsipUploadProtocol = Nothing
, _pmsipAccessToken = Nothing
, _pmsipUploadType = Nothing
, _pmsipPayload = pPmsipPayload_
, _pmsipResource = pPmsipResource_
, _pmsipCallback = Nothing
}
pmsipXgafv :: Lens' ProjectsModelsSetIAMPolicy (Maybe Xgafv)
pmsipXgafv
= lens _pmsipXgafv (\ s a -> s{_pmsipXgafv = a})
pmsipUploadProtocol :: Lens' ProjectsModelsSetIAMPolicy (Maybe Text)
pmsipUploadProtocol
= lens _pmsipUploadProtocol
(\ s a -> s{_pmsipUploadProtocol = a})
pmsipAccessToken :: Lens' ProjectsModelsSetIAMPolicy (Maybe Text)
pmsipAccessToken
= lens _pmsipAccessToken
(\ s a -> s{_pmsipAccessToken = a})
pmsipUploadType :: Lens' ProjectsModelsSetIAMPolicy (Maybe Text)
pmsipUploadType
= lens _pmsipUploadType
(\ s a -> s{_pmsipUploadType = a})
pmsipPayload :: Lens' ProjectsModelsSetIAMPolicy GoogleIAMV1__SetIAMPolicyRequest
pmsipPayload
= lens _pmsipPayload (\ s a -> s{_pmsipPayload = a})
pmsipResource :: Lens' ProjectsModelsSetIAMPolicy Text
pmsipResource
= lens _pmsipResource
(\ s a -> s{_pmsipResource = a})
pmsipCallback :: Lens' ProjectsModelsSetIAMPolicy (Maybe Text)
pmsipCallback
= lens _pmsipCallback
(\ s a -> s{_pmsipCallback = a})
instance GoogleRequest ProjectsModelsSetIAMPolicy
where
type Rs ProjectsModelsSetIAMPolicy =
GoogleIAMV1__Policy
type Scopes ProjectsModelsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsModelsSetIAMPolicy'{..}
= go _pmsipResource _pmsipXgafv _pmsipUploadProtocol
_pmsipAccessToken
_pmsipUploadType
_pmsipCallback
(Just AltJSON)
_pmsipPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsModelsSetIAMPolicyResource)
mempty