{-# 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.DNS.ManagedZones.Update
(
ManagedZonesUpdateResource
, managedZonesUpdate
, ManagedZonesUpdate
, mzuProject
, mzuPayload
, mzuManagedZone
, mzuClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ManagedZonesUpdateResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ManagedZone :> Put '[JSON] Operation
data ManagedZonesUpdate = ManagedZonesUpdate'
{ _mzuProject :: !Text
, _mzuPayload :: !ManagedZone
, _mzuManagedZone :: !Text
, _mzuClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedZonesUpdate
:: Text
-> ManagedZone
-> Text
-> ManagedZonesUpdate
managedZonesUpdate pMzuProject_ pMzuPayload_ pMzuManagedZone_ =
ManagedZonesUpdate'
{ _mzuProject = pMzuProject_
, _mzuPayload = pMzuPayload_
, _mzuManagedZone = pMzuManagedZone_
, _mzuClientOperationId = Nothing
}
mzuProject :: Lens' ManagedZonesUpdate Text
mzuProject
= lens _mzuProject (\ s a -> s{_mzuProject = a})
mzuPayload :: Lens' ManagedZonesUpdate ManagedZone
mzuPayload
= lens _mzuPayload (\ s a -> s{_mzuPayload = a})
mzuManagedZone :: Lens' ManagedZonesUpdate Text
mzuManagedZone
= lens _mzuManagedZone
(\ s a -> s{_mzuManagedZone = a})
mzuClientOperationId :: Lens' ManagedZonesUpdate (Maybe Text)
mzuClientOperationId
= lens _mzuClientOperationId
(\ s a -> s{_mzuClientOperationId = a})
instance GoogleRequest ManagedZonesUpdate where
type Rs ManagedZonesUpdate = Operation
type Scopes ManagedZonesUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ManagedZonesUpdate'{..}
= go _mzuProject _mzuManagedZone
_mzuClientOperationId
(Just AltJSON)
_mzuPayload
dNSService
where go
= buildClient
(Proxy :: Proxy ManagedZonesUpdateResource)
mempty