{-# 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.Unclaim
(
PartnersDevicesUnclaimResource
, partnersDevicesUnclaim
, PartnersDevicesUnclaim
, pduXgafv
, pduUploadProtocol
, pduAccessToken
, pduPartnerId
, pduUploadType
, pduPayload
, pduCallback
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type PartnersDevicesUnclaimResource =
"v1" :>
"partners" :>
Capture "partnerId" (Textual Int64) :>
"devices:unclaim" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UnclaimDeviceRequest :>
Post '[JSON] Empty
data PartnersDevicesUnclaim = PartnersDevicesUnclaim'
{ _pduXgafv :: !(Maybe Xgafv)
, _pduUploadProtocol :: !(Maybe Text)
, _pduAccessToken :: !(Maybe Text)
, _pduPartnerId :: !(Textual Int64)
, _pduUploadType :: !(Maybe Text)
, _pduPayload :: !UnclaimDeviceRequest
, _pduCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
partnersDevicesUnclaim
:: Int64
-> UnclaimDeviceRequest
-> PartnersDevicesUnclaim
partnersDevicesUnclaim pPduPartnerId_ pPduPayload_ =
PartnersDevicesUnclaim'
{ _pduXgafv = Nothing
, _pduUploadProtocol = Nothing
, _pduAccessToken = Nothing
, _pduPartnerId = _Coerce # pPduPartnerId_
, _pduUploadType = Nothing
, _pduPayload = pPduPayload_
, _pduCallback = Nothing
}
pduXgafv :: Lens' PartnersDevicesUnclaim (Maybe Xgafv)
pduXgafv = lens _pduXgafv (\ s a -> s{_pduXgafv = a})
pduUploadProtocol :: Lens' PartnersDevicesUnclaim (Maybe Text)
pduUploadProtocol
= lens _pduUploadProtocol
(\ s a -> s{_pduUploadProtocol = a})
pduAccessToken :: Lens' PartnersDevicesUnclaim (Maybe Text)
pduAccessToken
= lens _pduAccessToken
(\ s a -> s{_pduAccessToken = a})
pduPartnerId :: Lens' PartnersDevicesUnclaim Int64
pduPartnerId
= lens _pduPartnerId (\ s a -> s{_pduPartnerId = a})
. _Coerce
pduUploadType :: Lens' PartnersDevicesUnclaim (Maybe Text)
pduUploadType
= lens _pduUploadType
(\ s a -> s{_pduUploadType = a})
pduPayload :: Lens' PartnersDevicesUnclaim UnclaimDeviceRequest
pduPayload
= lens _pduPayload (\ s a -> s{_pduPayload = a})
pduCallback :: Lens' PartnersDevicesUnclaim (Maybe Text)
pduCallback
= lens _pduCallback (\ s a -> s{_pduCallback = a})
instance GoogleRequest PartnersDevicesUnclaim where
type Rs PartnersDevicesUnclaim = Empty
type Scopes PartnersDevicesUnclaim = '[]
requestClient PartnersDevicesUnclaim'{..}
= go _pduPartnerId _pduXgafv _pduUploadProtocol
_pduAccessToken
_pduUploadType
_pduCallback
(Just AltJSON)
_pduPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy :: Proxy PartnersDevicesUnclaimResource)
mempty