{-# 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.Get
(
ChangesGetResource
, changesGet
, ChangesGet
, cgProject
, cgChangeId
, cgManagedZone
, cgClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ChangesGetResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
"changes" :>
Capture "changeId" Text :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Change
data ChangesGet = ChangesGet'
{ _cgProject :: !Text
, _cgChangeId :: !Text
, _cgManagedZone :: !Text
, _cgClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
changesGet
:: Text
-> Text
-> Text
-> ChangesGet
changesGet pCgProject_ pCgChangeId_ pCgManagedZone_ =
ChangesGet'
{ _cgProject = pCgProject_
, _cgChangeId = pCgChangeId_
, _cgManagedZone = pCgManagedZone_
, _cgClientOperationId = Nothing
}
cgProject :: Lens' ChangesGet Text
cgProject
= lens _cgProject (\ s a -> s{_cgProject = a})
cgChangeId :: Lens' ChangesGet Text
cgChangeId
= lens _cgChangeId (\ s a -> s{_cgChangeId = a})
cgManagedZone :: Lens' ChangesGet Text
cgManagedZone
= lens _cgManagedZone
(\ s a -> s{_cgManagedZone = a})
cgClientOperationId :: Lens' ChangesGet (Maybe Text)
cgClientOperationId
= lens _cgClientOperationId
(\ s a -> s{_cgClientOperationId = a})
instance GoogleRequest ChangesGet where
type Rs ChangesGet = Change
type Scopes ChangesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/ndev.clouddns.readonly",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ChangesGet'{..}
= go _cgProject _cgManagedZone _cgChangeId
_cgClientOperationId
(Just AltJSON)
dNSService
where go
= buildClient (Proxy :: Proxy ChangesGetResource)
mempty