{-# 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.AndroidPublisher.Edits.Images.Upload
(
EditsImagesUploadResource
, editsImagesUpload
, EditsImagesUpload
, eiuPackageName
, eiuImageType
, eiuLanguage
, eiuEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsImagesUploadResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"listings" :>
Capture "language" Text :>
Capture "imageType" EditsImagesUploadImageType :>
QueryParam "alt" AltJSON :>
Post '[JSON] ImagesUploadResponse
:<|>
"upload" :>
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"listings" :>
Capture "language" Text :>
Capture "imageType" EditsImagesUploadImageType :>
QueryParam "alt" AltJSON :>
QueryParam "uploadType" AltMedia :>
AltMedia :> Post '[JSON] ImagesUploadResponse
data EditsImagesUpload = EditsImagesUpload'
{ _eiuPackageName :: !Text
, _eiuImageType :: !EditsImagesUploadImageType
, _eiuLanguage :: !Text
, _eiuEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsImagesUpload
:: Text
-> EditsImagesUploadImageType
-> Text
-> Text
-> EditsImagesUpload
editsImagesUpload pEiuPackageName_ pEiuImageType_ pEiuLanguage_ pEiuEditId_ =
EditsImagesUpload'
{ _eiuPackageName = pEiuPackageName_
, _eiuImageType = pEiuImageType_
, _eiuLanguage = pEiuLanguage_
, _eiuEditId = pEiuEditId_
}
eiuPackageName :: Lens' EditsImagesUpload Text
eiuPackageName
= lens _eiuPackageName
(\ s a -> s{_eiuPackageName = a})
eiuImageType :: Lens' EditsImagesUpload EditsImagesUploadImageType
eiuImageType
= lens _eiuImageType (\ s a -> s{_eiuImageType = a})
eiuLanguage :: Lens' EditsImagesUpload Text
eiuLanguage
= lens _eiuLanguage (\ s a -> s{_eiuLanguage = a})
eiuEditId :: Lens' EditsImagesUpload Text
eiuEditId
= lens _eiuEditId (\ s a -> s{_eiuEditId = a})
instance GoogleRequest EditsImagesUpload where
type Rs EditsImagesUpload = ImagesUploadResponse
type Scopes EditsImagesUpload =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsImagesUpload'{..}
= go _eiuPackageName _eiuEditId _eiuLanguage
_eiuImageType
(Just AltJSON)
androidPublisherService
where go :<|> _
= buildClient
(Proxy :: Proxy EditsImagesUploadResource)
mempty
instance GoogleRequest
(MediaUpload EditsImagesUpload) where
type Rs (MediaUpload EditsImagesUpload) =
ImagesUploadResponse
type Scopes (MediaUpload EditsImagesUpload) =
Scopes EditsImagesUpload
requestClient
(MediaUpload EditsImagesUpload'{..} body)
= go _eiuPackageName _eiuEditId _eiuLanguage
_eiuImageType
(Just AltJSON)
(Just AltMedia)
body
androidPublisherService
where _ :<|> go
= buildClient
(Proxy :: Proxy EditsImagesUploadResource)
mempty