{-# 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.Photo.Delete
(
PhotoDeleteResource
, photoDelete
, PhotoDelete
, pdXgafv
, pdUploadProtocol
, pdAccessToken
, pdUploadType
, pdPhotoId
, pdCallback
) where
import Network.Google.Prelude
import Network.Google.StreetViewPublish.Types
type PhotoDeleteResource =
"v1" :>
"photo" :>
Capture "photoId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] Empty
data PhotoDelete = PhotoDelete'
{ _pdXgafv :: !(Maybe Xgafv)
, _pdUploadProtocol :: !(Maybe Text)
, _pdAccessToken :: !(Maybe Text)
, _pdUploadType :: !(Maybe Text)
, _pdPhotoId :: !Text
, _pdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
photoDelete
:: Text
-> PhotoDelete
photoDelete pPdPhotoId_ =
PhotoDelete'
{ _pdXgafv = Nothing
, _pdUploadProtocol = Nothing
, _pdAccessToken = Nothing
, _pdUploadType = Nothing
, _pdPhotoId = pPdPhotoId_
, _pdCallback = Nothing
}
pdXgafv :: Lens' PhotoDelete (Maybe Xgafv)
pdXgafv = lens _pdXgafv (\ s a -> s{_pdXgafv = a})
pdUploadProtocol :: Lens' PhotoDelete (Maybe Text)
pdUploadProtocol
= lens _pdUploadProtocol
(\ s a -> s{_pdUploadProtocol = a})
pdAccessToken :: Lens' PhotoDelete (Maybe Text)
pdAccessToken
= lens _pdAccessToken
(\ s a -> s{_pdAccessToken = a})
pdUploadType :: Lens' PhotoDelete (Maybe Text)
pdUploadType
= lens _pdUploadType (\ s a -> s{_pdUploadType = a})
pdPhotoId :: Lens' PhotoDelete Text
pdPhotoId
= lens _pdPhotoId (\ s a -> s{_pdPhotoId = a})
pdCallback :: Lens' PhotoDelete (Maybe Text)
pdCallback
= lens _pdCallback (\ s a -> s{_pdCallback = a})
instance GoogleRequest PhotoDelete where
type Rs PhotoDelete = Empty
type Scopes PhotoDelete =
'["https://www.googleapis.com/auth/streetviewpublish"]
requestClient PhotoDelete'{..}
= go _pdPhotoId _pdXgafv _pdUploadProtocol
_pdAccessToken
_pdUploadType
_pdCallback
(Just AltJSON)
streetViewPublishService
where go
= buildClient (Proxy :: Proxy PhotoDeleteResource)
mempty