{-# 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.PhotosLibrary.MediaItems.Get
(
MediaItemsGetResource
, mediaItemsGet
, MediaItemsGet
, migXgafv
, migUploadProtocol
, migPp
, migAccessToken
, migUploadType
, migMediaItemId
, migBearerToken
, migCallback
) where
import Network.Google.PhotosLibrary.Types
import Network.Google.Prelude
type MediaItemsGetResource =
"v1" :>
"mediaItems" :>
Capture "mediaItemId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] MediaItem
data MediaItemsGet = MediaItemsGet'
{ _migXgafv :: !(Maybe Xgafv)
, _migUploadProtocol :: !(Maybe Text)
, _migPp :: !Bool
, _migAccessToken :: !(Maybe Text)
, _migUploadType :: !(Maybe Text)
, _migMediaItemId :: !Text
, _migBearerToken :: !(Maybe Text)
, _migCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mediaItemsGet
:: Text
-> MediaItemsGet
mediaItemsGet pMigMediaItemId_ =
MediaItemsGet'
{ _migXgafv = Nothing
, _migUploadProtocol = Nothing
, _migPp = True
, _migAccessToken = Nothing
, _migUploadType = Nothing
, _migMediaItemId = pMigMediaItemId_
, _migBearerToken = Nothing
, _migCallback = Nothing
}
migXgafv :: Lens' MediaItemsGet (Maybe Xgafv)
migXgafv = lens _migXgafv (\ s a -> s{_migXgafv = a})
migUploadProtocol :: Lens' MediaItemsGet (Maybe Text)
migUploadProtocol
= lens _migUploadProtocol
(\ s a -> s{_migUploadProtocol = a})
migPp :: Lens' MediaItemsGet Bool
migPp = lens _migPp (\ s a -> s{_migPp = a})
migAccessToken :: Lens' MediaItemsGet (Maybe Text)
migAccessToken
= lens _migAccessToken
(\ s a -> s{_migAccessToken = a})
migUploadType :: Lens' MediaItemsGet (Maybe Text)
migUploadType
= lens _migUploadType
(\ s a -> s{_migUploadType = a})
migMediaItemId :: Lens' MediaItemsGet Text
migMediaItemId
= lens _migMediaItemId
(\ s a -> s{_migMediaItemId = a})
migBearerToken :: Lens' MediaItemsGet (Maybe Text)
migBearerToken
= lens _migBearerToken
(\ s a -> s{_migBearerToken = a})
migCallback :: Lens' MediaItemsGet (Maybe Text)
migCallback
= lens _migCallback (\ s a -> s{_migCallback = a})
instance GoogleRequest MediaItemsGet where
type Rs MediaItemsGet = MediaItem
type Scopes MediaItemsGet =
'["https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/photoslibrary",
"https://www.googleapis.com/auth/photoslibrary.readonly",
"https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata"]
requestClient MediaItemsGet'{..}
= go _migMediaItemId _migXgafv _migUploadProtocol
(Just _migPp)
_migAccessToken
_migUploadType
_migBearerToken
_migCallback
(Just AltJSON)
photosLibraryService
where go
= buildClient (Proxy :: Proxy MediaItemsGetResource)
mempty