{-# 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.Reseller.Customers.Patch
(
CustomersPatchResource
, customersPatch
, CustomersPatch
, cpPayload
, cpCustomerId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type CustomersPatchResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Customer :> Patch '[JSON] Customer
data CustomersPatch = CustomersPatch'
{ _cpPayload :: !Customer
, _cpCustomerId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customersPatch
:: Customer
-> Text
-> CustomersPatch
customersPatch pCpPayload_ pCpCustomerId_ =
CustomersPatch'
{ _cpPayload = pCpPayload_
, _cpCustomerId = pCpCustomerId_
}
cpPayload :: Lens' CustomersPatch Customer
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
cpCustomerId :: Lens' CustomersPatch Text
cpCustomerId
= lens _cpCustomerId (\ s a -> s{_cpCustomerId = a})
instance GoogleRequest CustomersPatch where
type Rs CustomersPatch = Customer
type Scopes CustomersPatch =
'["https://www.googleapis.com/auth/apps.order"]
requestClient CustomersPatch'{..}
= go _cpCustomerId (Just AltJSON) _cpPayload
appsResellerService
where go
= buildClient (Proxy :: Proxy CustomersPatchResource)
mempty