{-# 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.Domains.Get
(
DomainsGetResource
, domainsGet
, DomainsGet
, dgCustomer
, dgDomainName
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type DomainsGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"domains" :>
Capture "domainName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Domains
data DomainsGet = DomainsGet'
{ _dgCustomer :: !Text
, _dgDomainName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
domainsGet
:: Text
-> Text
-> DomainsGet
domainsGet pDgCustomer_ pDgDomainName_ =
DomainsGet'
{ _dgCustomer = pDgCustomer_
, _dgDomainName = pDgDomainName_
}
dgCustomer :: Lens' DomainsGet Text
dgCustomer
= lens _dgCustomer (\ s a -> s{_dgCustomer = a})
dgDomainName :: Lens' DomainsGet Text
dgDomainName
= lens _dgDomainName (\ s a -> s{_dgDomainName = a})
instance GoogleRequest DomainsGet where
type Rs DomainsGet = Domains
type Scopes DomainsGet =
'["https://www.googleapis.com/auth/admin.directory.domain",
"https://www.googleapis.com/auth/admin.directory.domain.readonly"]
requestClient DomainsGet'{..}
= go _dgCustomer _dgDomainName (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy DomainsGetResource)
mempty