{-# 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.Patch
(
CustomersPatchResource
, customersPatch
, CustomersPatch
, cpCustomerKey
, cpPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type CustomersPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customers" :>
Capture "customerKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Customer :> Patch '[JSON] Customer
data CustomersPatch = CustomersPatch'
{ _cpCustomerKey :: !Text
, _cpPayload :: !Customer
} deriving (Eq,Show,Data,Typeable,Generic)
customersPatch
:: Text
-> Customer
-> CustomersPatch
customersPatch pCpCustomerKey_ pCpPayload_ =
CustomersPatch'
{ _cpCustomerKey = pCpCustomerKey_
, _cpPayload = pCpPayload_
}
cpCustomerKey :: Lens' CustomersPatch Text
cpCustomerKey
= lens _cpCustomerKey
(\ s a -> s{_cpCustomerKey = a})
cpPayload :: Lens' CustomersPatch Customer
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
instance GoogleRequest CustomersPatch where
type Rs CustomersPatch = Customer
type Scopes CustomersPatch =
'["https://www.googleapis.com/auth/admin.directory.customer"]
requestClient CustomersPatch'{..}
= go _cpCustomerKey (Just AltJSON) _cpPayload
directoryService
where go
= buildClient (Proxy :: Proxy CustomersPatchResource)
mempty