{-# 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.Get
(
PhotoGetResource
, photoGet
, PhotoGet
, pgXgafv
, pgLanguageCode
, pgUploadProtocol
, pgAccessToken
, pgUploadType
, pgView
, pgPhotoId
, pgCallback
) where
import Network.Google.Prelude
import Network.Google.StreetViewPublish.Types
type PhotoGetResource =
"v1" :>
"photo" :>
Capture "photoId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "languageCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "view" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Photo
data PhotoGet = PhotoGet'
{ _pgXgafv :: !(Maybe Xgafv)
, _pgLanguageCode :: !(Maybe Text)
, _pgUploadProtocol :: !(Maybe Text)
, _pgAccessToken :: !(Maybe Text)
, _pgUploadType :: !(Maybe Text)
, _pgView :: !(Maybe Text)
, _pgPhotoId :: !Text
, _pgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
photoGet
:: Text
-> PhotoGet
photoGet pPgPhotoId_ =
PhotoGet'
{ _pgXgafv = Nothing
, _pgLanguageCode = Nothing
, _pgUploadProtocol = Nothing
, _pgAccessToken = Nothing
, _pgUploadType = Nothing
, _pgView = Nothing
, _pgPhotoId = pPgPhotoId_
, _pgCallback = Nothing
}
pgXgafv :: Lens' PhotoGet (Maybe Xgafv)
pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a})
pgLanguageCode :: Lens' PhotoGet (Maybe Text)
pgLanguageCode
= lens _pgLanguageCode
(\ s a -> s{_pgLanguageCode = a})
pgUploadProtocol :: Lens' PhotoGet (Maybe Text)
pgUploadProtocol
= lens _pgUploadProtocol
(\ s a -> s{_pgUploadProtocol = a})
pgAccessToken :: Lens' PhotoGet (Maybe Text)
pgAccessToken
= lens _pgAccessToken
(\ s a -> s{_pgAccessToken = a})
pgUploadType :: Lens' PhotoGet (Maybe Text)
pgUploadType
= lens _pgUploadType (\ s a -> s{_pgUploadType = a})
pgView :: Lens' PhotoGet (Maybe Text)
pgView = lens _pgView (\ s a -> s{_pgView = a})
pgPhotoId :: Lens' PhotoGet Text
pgPhotoId
= lens _pgPhotoId (\ s a -> s{_pgPhotoId = a})
pgCallback :: Lens' PhotoGet (Maybe Text)
pgCallback
= lens _pgCallback (\ s a -> s{_pgCallback = a})
instance GoogleRequest PhotoGet where
type Rs PhotoGet = Photo
type Scopes PhotoGet =
'["https://www.googleapis.com/auth/streetviewpublish"]
requestClient PhotoGet'{..}
= go _pgPhotoId _pgXgafv _pgLanguageCode
_pgUploadProtocol
_pgAccessToken
_pgUploadType
_pgView
_pgCallback
(Just AltJSON)
streetViewPublishService
where go
= buildClient (Proxy :: Proxy PhotoGetResource)
mempty