{-# 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.Albums.AddEnrichment
(
AlbumsAddEnrichmentResource
, albumsAddEnrichment
, AlbumsAddEnrichment
, aaeXgafv
, aaeAlbumId
, aaeUploadProtocol
, aaePp
, aaeAccessToken
, aaeUploadType
, aaePayload
, aaeBearerToken
, aaeCallback
) where
import Network.Google.PhotosLibrary.Types
import Network.Google.Prelude
type AlbumsAddEnrichmentResource =
"v1" :>
"albums" :>
CaptureMode "albumId" "addEnrichment" 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 :>
ReqBody '[JSON] AddEnrichmentToAlbumRequest :>
Post '[JSON] AddEnrichmentToAlbumResponse
data AlbumsAddEnrichment = AlbumsAddEnrichment'
{ _aaeXgafv :: !(Maybe Xgafv)
, _aaeAlbumId :: !Text
, _aaeUploadProtocol :: !(Maybe Text)
, _aaePp :: !Bool
, _aaeAccessToken :: !(Maybe Text)
, _aaeUploadType :: !(Maybe Text)
, _aaePayload :: !AddEnrichmentToAlbumRequest
, _aaeBearerToken :: !(Maybe Text)
, _aaeCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
albumsAddEnrichment
:: Text
-> AddEnrichmentToAlbumRequest
-> AlbumsAddEnrichment
albumsAddEnrichment pAaeAlbumId_ pAaePayload_ =
AlbumsAddEnrichment'
{ _aaeXgafv = Nothing
, _aaeAlbumId = pAaeAlbumId_
, _aaeUploadProtocol = Nothing
, _aaePp = True
, _aaeAccessToken = Nothing
, _aaeUploadType = Nothing
, _aaePayload = pAaePayload_
, _aaeBearerToken = Nothing
, _aaeCallback = Nothing
}
aaeXgafv :: Lens' AlbumsAddEnrichment (Maybe Xgafv)
aaeXgafv = lens _aaeXgafv (\ s a -> s{_aaeXgafv = a})
aaeAlbumId :: Lens' AlbumsAddEnrichment Text
aaeAlbumId
= lens _aaeAlbumId (\ s a -> s{_aaeAlbumId = a})
aaeUploadProtocol :: Lens' AlbumsAddEnrichment (Maybe Text)
aaeUploadProtocol
= lens _aaeUploadProtocol
(\ s a -> s{_aaeUploadProtocol = a})
aaePp :: Lens' AlbumsAddEnrichment Bool
aaePp = lens _aaePp (\ s a -> s{_aaePp = a})
aaeAccessToken :: Lens' AlbumsAddEnrichment (Maybe Text)
aaeAccessToken
= lens _aaeAccessToken
(\ s a -> s{_aaeAccessToken = a})
aaeUploadType :: Lens' AlbumsAddEnrichment (Maybe Text)
aaeUploadType
= lens _aaeUploadType
(\ s a -> s{_aaeUploadType = a})
aaePayload :: Lens' AlbumsAddEnrichment AddEnrichmentToAlbumRequest
aaePayload
= lens _aaePayload (\ s a -> s{_aaePayload = a})
aaeBearerToken :: Lens' AlbumsAddEnrichment (Maybe Text)
aaeBearerToken
= lens _aaeBearerToken
(\ s a -> s{_aaeBearerToken = a})
aaeCallback :: Lens' AlbumsAddEnrichment (Maybe Text)
aaeCallback
= lens _aaeCallback (\ s a -> s{_aaeCallback = a})
instance GoogleRequest AlbumsAddEnrichment where
type Rs AlbumsAddEnrichment =
AddEnrichmentToAlbumResponse
type Scopes AlbumsAddEnrichment =
'["https://www.googleapis.com/auth/photoslibrary",
"https://www.googleapis.com/auth/photoslibrary.appendonly",
"https://www.googleapis.com/auth/photoslibrary.sharing"]
requestClient AlbumsAddEnrichment'{..}
= go _aaeAlbumId _aaeXgafv _aaeUploadProtocol
(Just _aaePp)
_aaeAccessToken
_aaeUploadType
_aaeBearerToken
_aaeCallback
(Just AltJSON)
_aaePayload
photosLibraryService
where go
= buildClient
(Proxy :: Proxy AlbumsAddEnrichmentResource)
mempty