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