{-# 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.Changes.Create
(
ChangesCreateResource
, changesCreate
, ChangesCreate
, ccProject
, ccPayload
, ccManagedZone
, ccClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ChangesCreateResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
"changes" :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Change :> Post '[JSON] Change
data ChangesCreate = ChangesCreate'
{ _ccProject :: !Text
, _ccPayload :: !Change
, _ccManagedZone :: !Text
, _ccClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
changesCreate
:: Text
-> Change
-> Text
-> ChangesCreate
changesCreate pCcProject_ pCcPayload_ pCcManagedZone_ =
ChangesCreate'
{ _ccProject = pCcProject_
, _ccPayload = pCcPayload_
, _ccManagedZone = pCcManagedZone_
, _ccClientOperationId = Nothing
}
ccProject :: Lens' ChangesCreate Text
ccProject
= lens _ccProject (\ s a -> s{_ccProject = a})
ccPayload :: Lens' ChangesCreate Change
ccPayload
= lens _ccPayload (\ s a -> s{_ccPayload = a})
ccManagedZone :: Lens' ChangesCreate Text
ccManagedZone
= lens _ccManagedZone
(\ s a -> s{_ccManagedZone = a})
ccClientOperationId :: Lens' ChangesCreate (Maybe Text)
ccClientOperationId
= lens _ccClientOperationId
(\ s a -> s{_ccClientOperationId = a})
instance GoogleRequest ChangesCreate where
type Rs ChangesCreate = Change
type Scopes ChangesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ChangesCreate'{..}
= go _ccProject _ccManagedZone _ccClientOperationId
(Just AltJSON)
_ccPayload
dNSService
where go
= buildClient (Proxy :: Proxy ChangesCreateResource)
mempty