{-# 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.Patch
(
ManagedZonesPatchResource
, managedZonesPatch
, ManagedZonesPatch
, mzpProject
, mzpPayload
, mzpManagedZone
, mzpClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ManagedZonesPatchResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ManagedZone :>
Patch '[JSON] Operation
data ManagedZonesPatch = ManagedZonesPatch'
{ _mzpProject :: !Text
, _mzpPayload :: !ManagedZone
, _mzpManagedZone :: !Text
, _mzpClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedZonesPatch
:: Text
-> ManagedZone
-> Text
-> ManagedZonesPatch
managedZonesPatch pMzpProject_ pMzpPayload_ pMzpManagedZone_ =
ManagedZonesPatch'
{ _mzpProject = pMzpProject_
, _mzpPayload = pMzpPayload_
, _mzpManagedZone = pMzpManagedZone_
, _mzpClientOperationId = Nothing
}
mzpProject :: Lens' ManagedZonesPatch Text
mzpProject
= lens _mzpProject (\ s a -> s{_mzpProject = a})
mzpPayload :: Lens' ManagedZonesPatch ManagedZone
mzpPayload
= lens _mzpPayload (\ s a -> s{_mzpPayload = a})
mzpManagedZone :: Lens' ManagedZonesPatch Text
mzpManagedZone
= lens _mzpManagedZone
(\ s a -> s{_mzpManagedZone = a})
mzpClientOperationId :: Lens' ManagedZonesPatch (Maybe Text)
mzpClientOperationId
= lens _mzpClientOperationId
(\ s a -> s{_mzpClientOperationId = a})
instance GoogleRequest ManagedZonesPatch where
type Rs ManagedZonesPatch = Operation
type Scopes ManagedZonesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ManagedZonesPatch'{..}
= go _mzpProject _mzpManagedZone
_mzpClientOperationId
(Just AltJSON)
_mzpPayload
dNSService
where go
= buildClient
(Proxy :: Proxy ManagedZonesPatchResource)
mempty