{-# 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.BatchCreate
(
MediaItemsBatchCreateResource
, mediaItemsBatchCreate
, MediaItemsBatchCreate
, mibcXgafv
, mibcUploadProtocol
, mibcPp
, mibcAccessToken
, mibcUploadType
, mibcPayload
, mibcBearerToken
, mibcCallback
) where
import Network.Google.PhotosLibrary.Types
import Network.Google.Prelude
type MediaItemsBatchCreateResource =
"v1" :>
"mediaItems:batchCreate" :>
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] BatchCreateMediaItemsRequest :>
Post '[JSON] BatchCreateMediaItemsResponse
data MediaItemsBatchCreate = MediaItemsBatchCreate'
{ _mibcXgafv :: !(Maybe Xgafv)
, _mibcUploadProtocol :: !(Maybe Text)
, _mibcPp :: !Bool
, _mibcAccessToken :: !(Maybe Text)
, _mibcUploadType :: !(Maybe Text)
, _mibcPayload :: !BatchCreateMediaItemsRequest
, _mibcBearerToken :: !(Maybe Text)
, _mibcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mediaItemsBatchCreate
:: BatchCreateMediaItemsRequest
-> MediaItemsBatchCreate
mediaItemsBatchCreate pMibcPayload_ =
MediaItemsBatchCreate'
{ _mibcXgafv = Nothing
, _mibcUploadProtocol = Nothing
, _mibcPp = True
, _mibcAccessToken = Nothing
, _mibcUploadType = Nothing
, _mibcPayload = pMibcPayload_
, _mibcBearerToken = Nothing
, _mibcCallback = Nothing
}
mibcXgafv :: Lens' MediaItemsBatchCreate (Maybe Xgafv)
mibcXgafv
= lens _mibcXgafv (\ s a -> s{_mibcXgafv = a})
mibcUploadProtocol :: Lens' MediaItemsBatchCreate (Maybe Text)
mibcUploadProtocol
= lens _mibcUploadProtocol
(\ s a -> s{_mibcUploadProtocol = a})
mibcPp :: Lens' MediaItemsBatchCreate Bool
mibcPp = lens _mibcPp (\ s a -> s{_mibcPp = a})
mibcAccessToken :: Lens' MediaItemsBatchCreate (Maybe Text)
mibcAccessToken
= lens _mibcAccessToken
(\ s a -> s{_mibcAccessToken = a})
mibcUploadType :: Lens' MediaItemsBatchCreate (Maybe Text)
mibcUploadType
= lens _mibcUploadType
(\ s a -> s{_mibcUploadType = a})
mibcPayload :: Lens' MediaItemsBatchCreate BatchCreateMediaItemsRequest
mibcPayload
= lens _mibcPayload (\ s a -> s{_mibcPayload = a})
mibcBearerToken :: Lens' MediaItemsBatchCreate (Maybe Text)
mibcBearerToken
= lens _mibcBearerToken
(\ s a -> s{_mibcBearerToken = a})
mibcCallback :: Lens' MediaItemsBatchCreate (Maybe Text)
mibcCallback
= lens _mibcCallback (\ s a -> s{_mibcCallback = a})
instance GoogleRequest MediaItemsBatchCreate where
type Rs MediaItemsBatchCreate =
BatchCreateMediaItemsResponse
type Scopes MediaItemsBatchCreate =
'["https://www.googleapis.com/auth/photoslibrary",
"https://www.googleapis.com/auth/photoslibrary.appendonly",
"https://www.googleapis.com/auth/photoslibrary.sharing"]
requestClient MediaItemsBatchCreate'{..}
= go _mibcXgafv _mibcUploadProtocol (Just _mibcPp)
_mibcAccessToken
_mibcUploadType
_mibcBearerToken
_mibcCallback
(Just AltJSON)
_mibcPayload
photosLibraryService
where go
= buildClient
(Proxy :: Proxy MediaItemsBatchCreateResource)
mempty