{-# 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.Claim
(
PartnersDevicesClaimResource
, partnersDevicesClaim
, PartnersDevicesClaim
, pdcXgafv
, pdcUploadProtocol
, pdcAccessToken
, pdcPartnerId
, pdcUploadType
, pdcPayload
, pdcCallback
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type PartnersDevicesClaimResource =
"v1" :>
"partners" :>
Capture "partnerId" (Textual Int64) :>
"devices:claim" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ClaimDeviceRequest :>
Post '[JSON] ClaimDeviceResponse
data PartnersDevicesClaim = PartnersDevicesClaim'
{ _pdcXgafv :: !(Maybe Xgafv)
, _pdcUploadProtocol :: !(Maybe Text)
, _pdcAccessToken :: !(Maybe Text)
, _pdcPartnerId :: !(Textual Int64)
, _pdcUploadType :: !(Maybe Text)
, _pdcPayload :: !ClaimDeviceRequest
, _pdcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
partnersDevicesClaim
:: Int64
-> ClaimDeviceRequest
-> PartnersDevicesClaim
partnersDevicesClaim pPdcPartnerId_ pPdcPayload_ =
PartnersDevicesClaim'
{ _pdcXgafv = Nothing
, _pdcUploadProtocol = Nothing
, _pdcAccessToken = Nothing
, _pdcPartnerId = _Coerce # pPdcPartnerId_
, _pdcUploadType = Nothing
, _pdcPayload = pPdcPayload_
, _pdcCallback = Nothing
}
pdcXgafv :: Lens' PartnersDevicesClaim (Maybe Xgafv)
pdcXgafv = lens _pdcXgafv (\ s a -> s{_pdcXgafv = a})
pdcUploadProtocol :: Lens' PartnersDevicesClaim (Maybe Text)
pdcUploadProtocol
= lens _pdcUploadProtocol
(\ s a -> s{_pdcUploadProtocol = a})
pdcAccessToken :: Lens' PartnersDevicesClaim (Maybe Text)
pdcAccessToken
= lens _pdcAccessToken
(\ s a -> s{_pdcAccessToken = a})
pdcPartnerId :: Lens' PartnersDevicesClaim Int64
pdcPartnerId
= lens _pdcPartnerId (\ s a -> s{_pdcPartnerId = a})
. _Coerce
pdcUploadType :: Lens' PartnersDevicesClaim (Maybe Text)
pdcUploadType
= lens _pdcUploadType
(\ s a -> s{_pdcUploadType = a})
pdcPayload :: Lens' PartnersDevicesClaim ClaimDeviceRequest
pdcPayload
= lens _pdcPayload (\ s a -> s{_pdcPayload = a})
pdcCallback :: Lens' PartnersDevicesClaim (Maybe Text)
pdcCallback
= lens _pdcCallback (\ s a -> s{_pdcCallback = a})
instance GoogleRequest PartnersDevicesClaim where
type Rs PartnersDevicesClaim = ClaimDeviceResponse
type Scopes PartnersDevicesClaim = '[]
requestClient PartnersDevicesClaim'{..}
= go _pdcPartnerId _pdcXgafv _pdcUploadProtocol
_pdcAccessToken
_pdcUploadType
_pdcCallback
(Just AltJSON)
_pdcPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy :: Proxy PartnersDevicesClaimResource)
mempty