{-# 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.Directory.DomainAliases.List
(
DomainAliasesListResource
, domainAliasesList
, DomainAliasesList
, dalCustomer
, dalParentDomainName
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type DomainAliasesListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"domainaliases" :>
QueryParam "parentDomainName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DomainAliases
data DomainAliasesList = DomainAliasesList'
{ _dalCustomer :: !Text
, _dalParentDomainName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
domainAliasesList
:: Text
-> DomainAliasesList
domainAliasesList pDalCustomer_ =
DomainAliasesList'
{ _dalCustomer = pDalCustomer_
, _dalParentDomainName = Nothing
}
dalCustomer :: Lens' DomainAliasesList Text
dalCustomer
= lens _dalCustomer (\ s a -> s{_dalCustomer = a})
dalParentDomainName :: Lens' DomainAliasesList (Maybe Text)
dalParentDomainName
= lens _dalParentDomainName
(\ s a -> s{_dalParentDomainName = a})
instance GoogleRequest DomainAliasesList where
type Rs DomainAliasesList = DomainAliases
type Scopes DomainAliasesList =
'["https://www.googleapis.com/auth/admin.directory.domain",
"https://www.googleapis.com/auth/admin.directory.domain.readonly"]
requestClient DomainAliasesList'{..}
= go _dalCustomer _dalParentDomainName (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy DomainAliasesListResource)
mempty