{-# 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.Customers.Get
(
CustomersGetResource
, customersGet
, CustomersGet
, cgCustomerKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type CustomersGetResource =
"admin" :>
"directory" :>
"v1" :>
"customers" :>
Capture "customerKey" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Customer
newtype CustomersGet = CustomersGet'
{ _cgCustomerKey :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
customersGet
:: Text
-> CustomersGet
customersGet pCgCustomerKey_ =
CustomersGet'
{ _cgCustomerKey = pCgCustomerKey_
}
cgCustomerKey :: Lens' CustomersGet Text
cgCustomerKey
= lens _cgCustomerKey
(\ s a -> s{_cgCustomerKey = a})
instance GoogleRequest CustomersGet where
type Rs CustomersGet = Customer
type Scopes CustomersGet =
'["https://www.googleapis.com/auth/admin.directory.customer",
"https://www.googleapis.com/auth/admin.directory.customer.readonly"]
requestClient CustomersGet'{..}
= go _cgCustomerKey (Just AltJSON) directoryService
where go
= buildClient (Proxy :: Proxy CustomersGetResource)
mempty