{-# 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.AndroidDeviceProvisioning.Partners.Customers.Create
(
PartnersCustomersCreateResource
, partnersCustomersCreate
, PartnersCustomersCreate
, pccParent
, pccXgafv
, pccUploadProtocol
, pccAccessToken
, pccUploadType
, pccPayload
, pccCallback
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type PartnersCustomersCreateResource =
"v1" :>
Capture "parent" Text :>
"customers" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateCustomerRequest :>
Post '[JSON] Company
data PartnersCustomersCreate = PartnersCustomersCreate'
{ _pccParent :: !Text
, _pccXgafv :: !(Maybe Xgafv)
, _pccUploadProtocol :: !(Maybe Text)
, _pccAccessToken :: !(Maybe Text)
, _pccUploadType :: !(Maybe Text)
, _pccPayload :: !CreateCustomerRequest
, _pccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
partnersCustomersCreate
:: Text
-> CreateCustomerRequest
-> PartnersCustomersCreate
partnersCustomersCreate pPccParent_ pPccPayload_ =
PartnersCustomersCreate'
{ _pccParent = pPccParent_
, _pccXgafv = Nothing
, _pccUploadProtocol = Nothing
, _pccAccessToken = Nothing
, _pccUploadType = Nothing
, _pccPayload = pPccPayload_
, _pccCallback = Nothing
}
pccParent :: Lens' PartnersCustomersCreate Text
pccParent
= lens _pccParent (\ s a -> s{_pccParent = a})
pccXgafv :: Lens' PartnersCustomersCreate (Maybe Xgafv)
pccXgafv = lens _pccXgafv (\ s a -> s{_pccXgafv = a})
pccUploadProtocol :: Lens' PartnersCustomersCreate (Maybe Text)
pccUploadProtocol
= lens _pccUploadProtocol
(\ s a -> s{_pccUploadProtocol = a})
pccAccessToken :: Lens' PartnersCustomersCreate (Maybe Text)
pccAccessToken
= lens _pccAccessToken
(\ s a -> s{_pccAccessToken = a})
pccUploadType :: Lens' PartnersCustomersCreate (Maybe Text)
pccUploadType
= lens _pccUploadType
(\ s a -> s{_pccUploadType = a})
pccPayload :: Lens' PartnersCustomersCreate CreateCustomerRequest
pccPayload
= lens _pccPayload (\ s a -> s{_pccPayload = a})
pccCallback :: Lens' PartnersCustomersCreate (Maybe Text)
pccCallback
= lens _pccCallback (\ s a -> s{_pccCallback = a})
instance GoogleRequest PartnersCustomersCreate where
type Rs PartnersCustomersCreate = Company
type Scopes PartnersCustomersCreate = '[]
requestClient PartnersCustomersCreate'{..}
= go _pccParent _pccXgafv _pccUploadProtocol
_pccAccessToken
_pccUploadType
_pccCallback
(Just AltJSON)
_pccPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy :: Proxy PartnersCustomersCreateResource)
mempty