{-# 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.Disks.SetIAMPolicy
(
DisksSetIAMPolicyResource
, disksSetIAMPolicy
, DisksSetIAMPolicy
, dsipProject
, dsipZone
, dsipPayload
, dsipResource
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DisksSetIAMPolicyResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"disks" :>
Capture "resource" Text :>
"setIamPolicy" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ZoneSetPolicyRequest :>
Post '[JSON] Policy
data DisksSetIAMPolicy = DisksSetIAMPolicy'
{ _dsipProject :: !Text
, _dsipZone :: !Text
, _dsipPayload :: !ZoneSetPolicyRequest
, _dsipResource :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
disksSetIAMPolicy
:: Text
-> Text
-> ZoneSetPolicyRequest
-> Text
-> DisksSetIAMPolicy
disksSetIAMPolicy pDsipProject_ pDsipZone_ pDsipPayload_ pDsipResource_ =
DisksSetIAMPolicy'
{ _dsipProject = pDsipProject_
, _dsipZone = pDsipZone_
, _dsipPayload = pDsipPayload_
, _dsipResource = pDsipResource_
}
dsipProject :: Lens' DisksSetIAMPolicy Text
dsipProject
= lens _dsipProject (\ s a -> s{_dsipProject = a})
dsipZone :: Lens' DisksSetIAMPolicy Text
dsipZone = lens _dsipZone (\ s a -> s{_dsipZone = a})
dsipPayload :: Lens' DisksSetIAMPolicy ZoneSetPolicyRequest
dsipPayload
= lens _dsipPayload (\ s a -> s{_dsipPayload = a})
dsipResource :: Lens' DisksSetIAMPolicy Text
dsipResource
= lens _dsipResource (\ s a -> s{_dsipResource = a})
instance GoogleRequest DisksSetIAMPolicy where
type Rs DisksSetIAMPolicy = Policy
type Scopes DisksSetIAMPolicy =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient DisksSetIAMPolicy'{..}
= go _dsipProject _dsipZone _dsipResource
(Just AltJSON)
_dsipPayload
computeService
where go
= buildClient
(Proxy :: Proxy DisksSetIAMPolicyResource)
mempty