{-# 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.Metadata
(
PartnersDevicesMetadataResource
, partnersDevicesMetadata
, PartnersDevicesMetadata
, pdmXgafv
, pdmUploadProtocol
, pdmAccessToken
, pdmUploadType
, pdmPayload
, pdmDeviceId
, pdmCallback
, pdmMetadataOwnerId
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type PartnersDevicesMetadataResource =
"v1" :>
"partners" :>
Capture "metadataOwnerId" (Textual Int64) :>
"devices" :>
Capture "deviceId" (Textual Int64) :>
"metadata" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateDeviceMetadataRequest :>
Post '[JSON] DeviceMetadata
data PartnersDevicesMetadata = PartnersDevicesMetadata'
{ _pdmXgafv :: !(Maybe Xgafv)
, _pdmUploadProtocol :: !(Maybe Text)
, _pdmAccessToken :: !(Maybe Text)
, _pdmUploadType :: !(Maybe Text)
, _pdmPayload :: !UpdateDeviceMetadataRequest
, _pdmDeviceId :: !(Textual Int64)
, _pdmCallback :: !(Maybe Text)
, _pdmMetadataOwnerId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
partnersDevicesMetadata
:: UpdateDeviceMetadataRequest
-> Int64
-> Int64
-> PartnersDevicesMetadata
partnersDevicesMetadata pPdmPayload_ pPdmDeviceId_ pPdmMetadataOwnerId_ =
PartnersDevicesMetadata'
{ _pdmXgafv = Nothing
, _pdmUploadProtocol = Nothing
, _pdmAccessToken = Nothing
, _pdmUploadType = Nothing
, _pdmPayload = pPdmPayload_
, _pdmDeviceId = _Coerce # pPdmDeviceId_
, _pdmCallback = Nothing
, _pdmMetadataOwnerId = _Coerce # pPdmMetadataOwnerId_
}
pdmXgafv :: Lens' PartnersDevicesMetadata (Maybe Xgafv)
pdmXgafv = lens _pdmXgafv (\ s a -> s{_pdmXgafv = a})
pdmUploadProtocol :: Lens' PartnersDevicesMetadata (Maybe Text)
pdmUploadProtocol
= lens _pdmUploadProtocol
(\ s a -> s{_pdmUploadProtocol = a})
pdmAccessToken :: Lens' PartnersDevicesMetadata (Maybe Text)
pdmAccessToken
= lens _pdmAccessToken
(\ s a -> s{_pdmAccessToken = a})
pdmUploadType :: Lens' PartnersDevicesMetadata (Maybe Text)
pdmUploadType
= lens _pdmUploadType
(\ s a -> s{_pdmUploadType = a})
pdmPayload :: Lens' PartnersDevicesMetadata UpdateDeviceMetadataRequest
pdmPayload
= lens _pdmPayload (\ s a -> s{_pdmPayload = a})
pdmDeviceId :: Lens' PartnersDevicesMetadata Int64
pdmDeviceId
= lens _pdmDeviceId (\ s a -> s{_pdmDeviceId = a}) .
_Coerce
pdmCallback :: Lens' PartnersDevicesMetadata (Maybe Text)
pdmCallback
= lens _pdmCallback (\ s a -> s{_pdmCallback = a})
pdmMetadataOwnerId :: Lens' PartnersDevicesMetadata Int64
pdmMetadataOwnerId
= lens _pdmMetadataOwnerId
(\ s a -> s{_pdmMetadataOwnerId = a})
. _Coerce
instance GoogleRequest PartnersDevicesMetadata where
type Rs PartnersDevicesMetadata = DeviceMetadata
type Scopes PartnersDevicesMetadata = '[]
requestClient PartnersDevicesMetadata'{..}
= go _pdmMetadataOwnerId _pdmDeviceId _pdmXgafv
_pdmUploadProtocol
_pdmAccessToken
_pdmUploadType
_pdmCallback
(Just AltJSON)
_pdmPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy :: Proxy PartnersDevicesMetadataResource)
mempty