{-# 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.StreetViewPublish.Photos.BatchDelete
(
PhotosBatchDeleteResource
, photosBatchDelete
, PhotosBatchDelete
, pbdXgafv
, pbdUploadProtocol
, pbdAccessToken
, pbdUploadType
, pbdPayload
, pbdCallback
) where
import Network.Google.Prelude
import Network.Google.StreetViewPublish.Types
type PhotosBatchDeleteResource =
"v1" :>
"photos:batchDelete" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchDeletePhotosRequest :>
Post '[JSON] BatchDeletePhotosResponse
data PhotosBatchDelete = PhotosBatchDelete'
{ _pbdXgafv :: !(Maybe Xgafv)
, _pbdUploadProtocol :: !(Maybe Text)
, _pbdAccessToken :: !(Maybe Text)
, _pbdUploadType :: !(Maybe Text)
, _pbdPayload :: !BatchDeletePhotosRequest
, _pbdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
photosBatchDelete
:: BatchDeletePhotosRequest
-> PhotosBatchDelete
photosBatchDelete pPbdPayload_ =
PhotosBatchDelete'
{ _pbdXgafv = Nothing
, _pbdUploadProtocol = Nothing
, _pbdAccessToken = Nothing
, _pbdUploadType = Nothing
, _pbdPayload = pPbdPayload_
, _pbdCallback = Nothing
}
pbdXgafv :: Lens' PhotosBatchDelete (Maybe Xgafv)
pbdXgafv = lens _pbdXgafv (\ s a -> s{_pbdXgafv = a})
pbdUploadProtocol :: Lens' PhotosBatchDelete (Maybe Text)
pbdUploadProtocol
= lens _pbdUploadProtocol
(\ s a -> s{_pbdUploadProtocol = a})
pbdAccessToken :: Lens' PhotosBatchDelete (Maybe Text)
pbdAccessToken
= lens _pbdAccessToken
(\ s a -> s{_pbdAccessToken = a})
pbdUploadType :: Lens' PhotosBatchDelete (Maybe Text)
pbdUploadType
= lens _pbdUploadType
(\ s a -> s{_pbdUploadType = a})
pbdPayload :: Lens' PhotosBatchDelete BatchDeletePhotosRequest
pbdPayload
= lens _pbdPayload (\ s a -> s{_pbdPayload = a})
pbdCallback :: Lens' PhotosBatchDelete (Maybe Text)
pbdCallback
= lens _pbdCallback (\ s a -> s{_pbdCallback = a})
instance GoogleRequest PhotosBatchDelete where
type Rs PhotosBatchDelete = BatchDeletePhotosResponse
type Scopes PhotosBatchDelete =
'["https://www.googleapis.com/auth/streetviewpublish"]
requestClient PhotosBatchDelete'{..}
= go _pbdXgafv _pbdUploadProtocol _pbdAccessToken
_pbdUploadType
_pbdCallback
(Just AltJSON)
_pbdPayload
streetViewPublishService
where go
= buildClient
(Proxy :: Proxy PhotosBatchDeleteResource)
mempty