{-# 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.Devices.ClaimAsync
(
PartnersDevicesClaimAsyncResource
, partnersDevicesClaimAsync
, PartnersDevicesClaimAsync
, pdcaXgafv
, pdcaUploadProtocol
, pdcaAccessToken
, pdcaPartnerId
, pdcaUploadType
, pdcaPayload
, pdcaCallback
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type PartnersDevicesClaimAsyncResource =
"v1" :>
"partners" :>
Capture "partnerId" (Textual Int64) :>
"devices:claimAsync" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ClaimDevicesRequest :>
Post '[JSON] Operation
data PartnersDevicesClaimAsync = PartnersDevicesClaimAsync'
{ _pdcaXgafv :: !(Maybe Xgafv)
, _pdcaUploadProtocol :: !(Maybe Text)
, _pdcaAccessToken :: !(Maybe Text)
, _pdcaPartnerId :: !(Textual Int64)
, _pdcaUploadType :: !(Maybe Text)
, _pdcaPayload :: !ClaimDevicesRequest
, _pdcaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
partnersDevicesClaimAsync
:: Int64
-> ClaimDevicesRequest
-> PartnersDevicesClaimAsync
partnersDevicesClaimAsync pPdcaPartnerId_ pPdcaPayload_ =
PartnersDevicesClaimAsync'
{ _pdcaXgafv = Nothing
, _pdcaUploadProtocol = Nothing
, _pdcaAccessToken = Nothing
, _pdcaPartnerId = _Coerce # pPdcaPartnerId_
, _pdcaUploadType = Nothing
, _pdcaPayload = pPdcaPayload_
, _pdcaCallback = Nothing
}
pdcaXgafv :: Lens' PartnersDevicesClaimAsync (Maybe Xgafv)
pdcaXgafv
= lens _pdcaXgafv (\ s a -> s{_pdcaXgafv = a})
pdcaUploadProtocol :: Lens' PartnersDevicesClaimAsync (Maybe Text)
pdcaUploadProtocol
= lens _pdcaUploadProtocol
(\ s a -> s{_pdcaUploadProtocol = a})
pdcaAccessToken :: Lens' PartnersDevicesClaimAsync (Maybe Text)
pdcaAccessToken
= lens _pdcaAccessToken
(\ s a -> s{_pdcaAccessToken = a})
pdcaPartnerId :: Lens' PartnersDevicesClaimAsync Int64
pdcaPartnerId
= lens _pdcaPartnerId
(\ s a -> s{_pdcaPartnerId = a})
. _Coerce
pdcaUploadType :: Lens' PartnersDevicesClaimAsync (Maybe Text)
pdcaUploadType
= lens _pdcaUploadType
(\ s a -> s{_pdcaUploadType = a})
pdcaPayload :: Lens' PartnersDevicesClaimAsync ClaimDevicesRequest
pdcaPayload
= lens _pdcaPayload (\ s a -> s{_pdcaPayload = a})
pdcaCallback :: Lens' PartnersDevicesClaimAsync (Maybe Text)
pdcaCallback
= lens _pdcaCallback (\ s a -> s{_pdcaCallback = a})
instance GoogleRequest PartnersDevicesClaimAsync
where
type Rs PartnersDevicesClaimAsync = Operation
type Scopes PartnersDevicesClaimAsync = '[]
requestClient PartnersDevicesClaimAsync'{..}
= go _pdcaPartnerId _pdcaXgafv _pdcaUploadProtocol
_pdcaAccessToken
_pdcaUploadType
_pdcaCallback
(Just AltJSON)
_pdcaPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy :: Proxy PartnersDevicesClaimAsyncResource)
mempty