{-# 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.List
(
ChangesListResource
, changesList
, ChangesList
, clProject
, clSortOrder
, clPageToken
, clManagedZone
, clMaxResults
, clSortBy
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ChangesListResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
"changes" :>
QueryParam "sortOrder" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "sortBy" ChangesListSortBy :>
QueryParam "alt" AltJSON :>
Get '[JSON] ChangesListResponse
data ChangesList = ChangesList'
{ _clProject :: !Text
, _clSortOrder :: !(Maybe Text)
, _clPageToken :: !(Maybe Text)
, _clManagedZone :: !Text
, _clMaxResults :: !(Maybe (Textual Int32))
, _clSortBy :: !ChangesListSortBy
} deriving (Eq,Show,Data,Typeable,Generic)
changesList
:: Text
-> Text
-> ChangesList
changesList pClProject_ pClManagedZone_ =
ChangesList'
{ _clProject = pClProject_
, _clSortOrder = Nothing
, _clPageToken = Nothing
, _clManagedZone = pClManagedZone_
, _clMaxResults = Nothing
, _clSortBy = ChangeSequence
}
clProject :: Lens' ChangesList Text
clProject
= lens _clProject (\ s a -> s{_clProject = a})
clSortOrder :: Lens' ChangesList (Maybe Text)
clSortOrder
= lens _clSortOrder (\ s a -> s{_clSortOrder = a})
clPageToken :: Lens' ChangesList (Maybe Text)
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clManagedZone :: Lens' ChangesList Text
clManagedZone
= lens _clManagedZone
(\ s a -> s{_clManagedZone = a})
clMaxResults :: Lens' ChangesList (Maybe Int32)
clMaxResults
= lens _clMaxResults (\ s a -> s{_clMaxResults = a})
. mapping _Coerce
clSortBy :: Lens' ChangesList ChangesListSortBy
clSortBy = lens _clSortBy (\ s a -> s{_clSortBy = a})
instance GoogleRequest ChangesList where
type Rs ChangesList = ChangesListResponse
type Scopes ChangesList =
'["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 ChangesList'{..}
= go _clProject _clManagedZone _clSortOrder
_clPageToken
_clMaxResults
(Just _clSortBy)
(Just AltJSON)
dNSService
where go
= buildClient (Proxy :: Proxy ChangesListResource)
mempty