{-# 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.Create
(
ManagedZonesCreateResource
, managedZonesCreate
, ManagedZonesCreate
, mzcProject
, mzcPayload
, mzcClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ManagedZonesCreateResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ManagedZone :>
Post '[JSON] ManagedZone
data ManagedZonesCreate = ManagedZonesCreate'
{ _mzcProject :: !Text
, _mzcPayload :: !ManagedZone
, _mzcClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedZonesCreate
:: Text
-> ManagedZone
-> ManagedZonesCreate
managedZonesCreate pMzcProject_ pMzcPayload_ =
ManagedZonesCreate'
{ _mzcProject = pMzcProject_
, _mzcPayload = pMzcPayload_
, _mzcClientOperationId = Nothing
}
mzcProject :: Lens' ManagedZonesCreate Text
mzcProject
= lens _mzcProject (\ s a -> s{_mzcProject = a})
mzcPayload :: Lens' ManagedZonesCreate ManagedZone
mzcPayload
= lens _mzcPayload (\ s a -> s{_mzcPayload = a})
mzcClientOperationId :: Lens' ManagedZonesCreate (Maybe Text)
mzcClientOperationId
= lens _mzcClientOperationId
(\ s a -> s{_mzcClientOperationId = a})
instance GoogleRequest ManagedZonesCreate where
type Rs ManagedZonesCreate = ManagedZone
type Scopes ManagedZonesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ManagedZonesCreate'{..}
= go _mzcProject _mzcClientOperationId (Just AltJSON)
_mzcPayload
dNSService
where go
= buildClient
(Proxy :: Proxy ManagedZonesCreateResource)
mempty