{-# 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.BatchGet
(
PhotosBatchGetResource
, photosBatchGet
, PhotosBatchGet
, pbgXgafv
, pbgLanguageCode
, pbgUploadProtocol
, pbgAccessToken
, pbgUploadType
, pbgPhotoIds
, pbgView
, pbgCallback
) where
import Network.Google.Prelude
import Network.Google.StreetViewPublish.Types
type PhotosBatchGetResource =
"v1" :>
"photos:batchGet" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "languageCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParams "photoIds" Text :>
QueryParam "view" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BatchGetPhotosResponse
data PhotosBatchGet = PhotosBatchGet'
{ _pbgXgafv :: !(Maybe Xgafv)
, _pbgLanguageCode :: !(Maybe Text)
, _pbgUploadProtocol :: !(Maybe Text)
, _pbgAccessToken :: !(Maybe Text)
, _pbgUploadType :: !(Maybe Text)
, _pbgPhotoIds :: !(Maybe [Text])
, _pbgView :: !(Maybe Text)
, _pbgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
photosBatchGet
:: PhotosBatchGet
photosBatchGet =
PhotosBatchGet'
{ _pbgXgafv = Nothing
, _pbgLanguageCode = Nothing
, _pbgUploadProtocol = Nothing
, _pbgAccessToken = Nothing
, _pbgUploadType = Nothing
, _pbgPhotoIds = Nothing
, _pbgView = Nothing
, _pbgCallback = Nothing
}
pbgXgafv :: Lens' PhotosBatchGet (Maybe Xgafv)
pbgXgafv = lens _pbgXgafv (\ s a -> s{_pbgXgafv = a})
pbgLanguageCode :: Lens' PhotosBatchGet (Maybe Text)
pbgLanguageCode
= lens _pbgLanguageCode
(\ s a -> s{_pbgLanguageCode = a})
pbgUploadProtocol :: Lens' PhotosBatchGet (Maybe Text)
pbgUploadProtocol
= lens _pbgUploadProtocol
(\ s a -> s{_pbgUploadProtocol = a})
pbgAccessToken :: Lens' PhotosBatchGet (Maybe Text)
pbgAccessToken
= lens _pbgAccessToken
(\ s a -> s{_pbgAccessToken = a})
pbgUploadType :: Lens' PhotosBatchGet (Maybe Text)
pbgUploadType
= lens _pbgUploadType
(\ s a -> s{_pbgUploadType = a})
pbgPhotoIds :: Lens' PhotosBatchGet [Text]
pbgPhotoIds
= lens _pbgPhotoIds (\ s a -> s{_pbgPhotoIds = a}) .
_Default
. _Coerce
pbgView :: Lens' PhotosBatchGet (Maybe Text)
pbgView = lens _pbgView (\ s a -> s{_pbgView = a})
pbgCallback :: Lens' PhotosBatchGet (Maybe Text)
pbgCallback
= lens _pbgCallback (\ s a -> s{_pbgCallback = a})
instance GoogleRequest PhotosBatchGet where
type Rs PhotosBatchGet = BatchGetPhotosResponse
type Scopes PhotosBatchGet =
'["https://www.googleapis.com/auth/streetviewpublish"]
requestClient PhotosBatchGet'{..}
= go _pbgXgafv _pbgLanguageCode _pbgUploadProtocol
_pbgAccessToken
_pbgUploadType
(_pbgPhotoIds ^. _Default)
_pbgView
_pbgCallback
(Just AltJSON)
streetViewPublishService
where go
= buildClient (Proxy :: Proxy PhotosBatchGetResource)
mempty