{-# 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.Get
(
DomainAliasesGetResource
, domainAliasesGet
, DomainAliasesGet
, dagDomainAliasName
, dagCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type DomainAliasesGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"domainaliases" :>
Capture "domainAliasName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DomainAlias
data DomainAliasesGet = DomainAliasesGet'
{ _dagDomainAliasName :: !Text
, _dagCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
domainAliasesGet
:: Text
-> Text
-> DomainAliasesGet
domainAliasesGet pDagDomainAliasName_ pDagCustomer_ =
DomainAliasesGet'
{ _dagDomainAliasName = pDagDomainAliasName_
, _dagCustomer = pDagCustomer_
}
dagDomainAliasName :: Lens' DomainAliasesGet Text
dagDomainAliasName
= lens _dagDomainAliasName
(\ s a -> s{_dagDomainAliasName = a})
dagCustomer :: Lens' DomainAliasesGet Text
dagCustomer
= lens _dagCustomer (\ s a -> s{_dagCustomer = a})
instance GoogleRequest DomainAliasesGet where
type Rs DomainAliasesGet = DomainAlias
type Scopes DomainAliasesGet =
'["https://www.googleapis.com/auth/admin.directory.domain",
"https://www.googleapis.com/auth/admin.directory.domain.readonly"]
requestClient DomainAliasesGet'{..}
= go _dagCustomer _dagDomainAliasName (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy DomainAliasesGetResource)
mempty