{-# 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.Compute.Licenses.SetIAMPolicy
(
LicensesSetIAMPolicyResource
, licensesSetIAMPolicy
, LicensesSetIAMPolicy
, lsipProject
, lsipPayload
, lsipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicensesSetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenses" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GlobalSetPolicyRequest :>
Post '[JSON] Policy
data LicensesSetIAMPolicy = LicensesSetIAMPolicy'
{ _lsipProject :: !Text
, _lsipPayload :: !GlobalSetPolicyRequest
, _lsipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
licensesSetIAMPolicy
:: Text
-> GlobalSetPolicyRequest
-> Text
-> LicensesSetIAMPolicy
licensesSetIAMPolicy pLsipProject_ pLsipPayload_ pLsipResource_ =
LicensesSetIAMPolicy'
{ _lsipProject = pLsipProject_
, _lsipPayload = pLsipPayload_
, _lsipResource = pLsipResource_
}
lsipProject :: Lens' LicensesSetIAMPolicy Text
lsipProject
= lens _lsipProject (\ s a -> s{_lsipProject = a})
lsipPayload :: Lens' LicensesSetIAMPolicy GlobalSetPolicyRequest
lsipPayload
= lens _lsipPayload (\ s a -> s{_lsipPayload = a})
lsipResource :: Lens' LicensesSetIAMPolicy Text
lsipResource
= lens _lsipResource (\ s a -> s{_lsipResource = a})
instance GoogleRequest LicensesSetIAMPolicy where
type Rs LicensesSetIAMPolicy = Policy
type Scopes LicensesSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient LicensesSetIAMPolicy'{..}
= go _lsipProject _lsipResource (Just AltJSON)
_lsipPayload
computeService
where go
= buildClient
(Proxy :: Proxy LicensesSetIAMPolicyResource)
mempty