{-# 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.List
(
ManagedZonesListResource
, managedZonesList
, ManagedZonesList
, mzlProject
, mzlPageToken
, mzlDNSName
, mzlMaxResults
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ManagedZonesListResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
QueryParam "pageToken" Text :>
QueryParam "dnsName" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ManagedZonesListResponse
data ManagedZonesList = ManagedZonesList'
{ _mzlProject :: !Text
, _mzlPageToken :: !(Maybe Text)
, _mzlDNSName :: !(Maybe Text)
, _mzlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managedZonesList
:: Text
-> ManagedZonesList
managedZonesList pMzlProject_ =
ManagedZonesList'
{ _mzlProject = pMzlProject_
, _mzlPageToken = Nothing
, _mzlDNSName = Nothing
, _mzlMaxResults = Nothing
}
mzlProject :: Lens' ManagedZonesList Text
mzlProject
= lens _mzlProject (\ s a -> s{_mzlProject = a})
mzlPageToken :: Lens' ManagedZonesList (Maybe Text)
mzlPageToken
= lens _mzlPageToken (\ s a -> s{_mzlPageToken = a})
mzlDNSName :: Lens' ManagedZonesList (Maybe Text)
mzlDNSName
= lens _mzlDNSName (\ s a -> s{_mzlDNSName = a})
mzlMaxResults :: Lens' ManagedZonesList (Maybe Int32)
mzlMaxResults
= lens _mzlMaxResults
(\ s a -> s{_mzlMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagedZonesList where
type Rs ManagedZonesList = ManagedZonesListResponse
type Scopes ManagedZonesList =
'["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 ManagedZonesList'{..}
= go _mzlProject _mzlPageToken _mzlDNSName
_mzlMaxResults
(Just AltJSON)
dNSService
where go
= buildClient
(Proxy :: Proxy ManagedZonesListResource)
mempty