{-# 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.ProximityBeacon.Beacons.Attachments.Create
(
BeaconsAttachmentsCreateResource
, beaconsAttachmentsCreate
, BeaconsAttachmentsCreate
, bacXgafv
, bacUploadProtocol
, bacAccessToken
, bacBeaconName
, bacUploadType
, bacPayload
, bacProjectId
, bacCallback
) where
import Network.Google.Prelude
import Network.Google.ProximityBeacon.Types
type BeaconsAttachmentsCreateResource =
"v1beta1" :>
Capture "beaconName" Text :>
"attachments" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "projectId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BeaconAttachment :>
Post '[JSON] BeaconAttachment
data BeaconsAttachmentsCreate = BeaconsAttachmentsCreate'
{ _bacXgafv :: !(Maybe Xgafv)
, _bacUploadProtocol :: !(Maybe Text)
, _bacAccessToken :: !(Maybe Text)
, _bacBeaconName :: !Text
, _bacUploadType :: !(Maybe Text)
, _bacPayload :: !BeaconAttachment
, _bacProjectId :: !(Maybe Text)
, _bacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
beaconsAttachmentsCreate
:: Text
-> BeaconAttachment
-> BeaconsAttachmentsCreate
beaconsAttachmentsCreate pBacBeaconName_ pBacPayload_ =
BeaconsAttachmentsCreate'
{ _bacXgafv = Nothing
, _bacUploadProtocol = Nothing
, _bacAccessToken = Nothing
, _bacBeaconName = pBacBeaconName_
, _bacUploadType = Nothing
, _bacPayload = pBacPayload_
, _bacProjectId = Nothing
, _bacCallback = Nothing
}
bacXgafv :: Lens' BeaconsAttachmentsCreate (Maybe Xgafv)
bacXgafv = lens _bacXgafv (\ s a -> s{_bacXgafv = a})
bacUploadProtocol :: Lens' BeaconsAttachmentsCreate (Maybe Text)
bacUploadProtocol
= lens _bacUploadProtocol
(\ s a -> s{_bacUploadProtocol = a})
bacAccessToken :: Lens' BeaconsAttachmentsCreate (Maybe Text)
bacAccessToken
= lens _bacAccessToken
(\ s a -> s{_bacAccessToken = a})
bacBeaconName :: Lens' BeaconsAttachmentsCreate Text
bacBeaconName
= lens _bacBeaconName
(\ s a -> s{_bacBeaconName = a})
bacUploadType :: Lens' BeaconsAttachmentsCreate (Maybe Text)
bacUploadType
= lens _bacUploadType
(\ s a -> s{_bacUploadType = a})
bacPayload :: Lens' BeaconsAttachmentsCreate BeaconAttachment
bacPayload
= lens _bacPayload (\ s a -> s{_bacPayload = a})
bacProjectId :: Lens' BeaconsAttachmentsCreate (Maybe Text)
bacProjectId
= lens _bacProjectId (\ s a -> s{_bacProjectId = a})
bacCallback :: Lens' BeaconsAttachmentsCreate (Maybe Text)
bacCallback
= lens _bacCallback (\ s a -> s{_bacCallback = a})
instance GoogleRequest BeaconsAttachmentsCreate where
type Rs BeaconsAttachmentsCreate = BeaconAttachment
type Scopes BeaconsAttachmentsCreate =
'["https://www.googleapis.com/auth/userlocation.beacon.registry"]
requestClient BeaconsAttachmentsCreate'{..}
= go _bacBeaconName _bacXgafv _bacUploadProtocol
_bacAccessToken
_bacUploadType
_bacProjectId
_bacCallback
(Just AltJSON)
_bacPayload
proximityBeaconService
where go
= buildClient
(Proxy :: Proxy BeaconsAttachmentsCreateResource)
mempty