{-# 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.NodeGroups.SetIAMPolicy
(
NodeGroupsSetIAMPolicyResource
, nodeGroupsSetIAMPolicy
, NodeGroupsSetIAMPolicy
, ngsipProject
, ngsipZone
, ngsipPayload
, ngsipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NodeGroupsSetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"nodeGroups" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ZoneSetPolicyRequest :>
Post '[JSON] Policy
data NodeGroupsSetIAMPolicy = NodeGroupsSetIAMPolicy'
{ _ngsipProject :: !Text
, _ngsipZone :: !Text
, _ngsipPayload :: !ZoneSetPolicyRequest
, _ngsipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeGroupsSetIAMPolicy
:: Text
-> Text
-> ZoneSetPolicyRequest
-> Text
-> NodeGroupsSetIAMPolicy
nodeGroupsSetIAMPolicy pNgsipProject_ pNgsipZone_ pNgsipPayload_ pNgsipResource_ =
NodeGroupsSetIAMPolicy'
{ _ngsipProject = pNgsipProject_
, _ngsipZone = pNgsipZone_
, _ngsipPayload = pNgsipPayload_
, _ngsipResource = pNgsipResource_
}
ngsipProject :: Lens' NodeGroupsSetIAMPolicy Text
ngsipProject
= lens _ngsipProject (\ s a -> s{_ngsipProject = a})
ngsipZone :: Lens' NodeGroupsSetIAMPolicy Text
ngsipZone
= lens _ngsipZone (\ s a -> s{_ngsipZone = a})
ngsipPayload :: Lens' NodeGroupsSetIAMPolicy ZoneSetPolicyRequest
ngsipPayload
= lens _ngsipPayload (\ s a -> s{_ngsipPayload = a})
ngsipResource :: Lens' NodeGroupsSetIAMPolicy Text
ngsipResource
= lens _ngsipResource
(\ s a -> s{_ngsipResource = a})
instance GoogleRequest NodeGroupsSetIAMPolicy where
type Rs NodeGroupsSetIAMPolicy = Policy
type Scopes NodeGroupsSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NodeGroupsSetIAMPolicy'{..}
= go _ngsipProject _ngsipZone _ngsipResource
(Just AltJSON)
_ngsipPayload
computeService
where go
= buildClient
(Proxy :: Proxy NodeGroupsSetIAMPolicyResource)
mempty