{-# 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.Update
(
CustomersUpdateResource
, customersUpdate
, CustomersUpdate
, cuCustomerKey
, cuPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type CustomersUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customers" :>
Capture "customerKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Customer :> Put '[JSON] Customer
data CustomersUpdate = CustomersUpdate'
{ _cuCustomerKey :: !Text
, _cuPayload :: !Customer
} deriving (Eq,Show,Data,Typeable,Generic)
customersUpdate
:: Text
-> Customer
-> CustomersUpdate
customersUpdate pCuCustomerKey_ pCuPayload_ =
CustomersUpdate'
{ _cuCustomerKey = pCuCustomerKey_
, _cuPayload = pCuPayload_
}
cuCustomerKey :: Lens' CustomersUpdate Text
cuCustomerKey
= lens _cuCustomerKey
(\ s a -> s{_cuCustomerKey = a})
cuPayload :: Lens' CustomersUpdate Customer
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
instance GoogleRequest CustomersUpdate where
type Rs CustomersUpdate = Customer
type Scopes CustomersUpdate =
'["https://www.googleapis.com/auth/admin.directory.customer"]
requestClient CustomersUpdate'{..}
= go _cuCustomerKey (Just AltJSON) _cuPayload
directoryService
where go
= buildClient
(Proxy :: Proxy CustomersUpdateResource)
mempty