{-# 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.ExpansionFiles.Upload
(
EditsExpansionFilesUploadResource
, editsExpansionFilesUpload
, EditsExpansionFilesUpload
, ePackageName
, eAPKVersionCode
, eExpansionFileType
, eEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsExpansionFilesUploadResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"apks" :>
Capture "apkVersionCode" (Textual Int32) :>
"expansionFiles" :>
Capture "expansionFileType"
EditsExpansionFilesUploadExpansionFileType
:>
QueryParam "alt" AltJSON :>
Post '[JSON] ExpansionFilesUploadResponse
:<|>
"upload" :>
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"apks" :>
Capture "apkVersionCode" (Textual Int32) :>
"expansionFiles" :>
Capture "expansionFileType"
EditsExpansionFilesUploadExpansionFileType
:>
QueryParam "alt" AltJSON :>
QueryParam "uploadType" AltMedia :>
AltMedia :>
Post '[JSON] ExpansionFilesUploadResponse
data EditsExpansionFilesUpload = EditsExpansionFilesUpload'
{ _ePackageName :: !Text
, _eAPKVersionCode :: !(Textual Int32)
, _eExpansionFileType :: !EditsExpansionFilesUploadExpansionFileType
, _eEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsExpansionFilesUpload
:: Text
-> Int32
-> EditsExpansionFilesUploadExpansionFileType
-> Text
-> EditsExpansionFilesUpload
editsExpansionFilesUpload pEPackageName_ pEAPKVersionCode_ pEExpansionFileType_ pEEditId_ =
EditsExpansionFilesUpload'
{ _ePackageName = pEPackageName_
, _eAPKVersionCode = _Coerce # pEAPKVersionCode_
, _eExpansionFileType = pEExpansionFileType_
, _eEditId = pEEditId_
}
ePackageName :: Lens' EditsExpansionFilesUpload Text
ePackageName
= lens _ePackageName (\ s a -> s{_ePackageName = a})
eAPKVersionCode :: Lens' EditsExpansionFilesUpload Int32
eAPKVersionCode
= lens _eAPKVersionCode
(\ s a -> s{_eAPKVersionCode = a})
. _Coerce
eExpansionFileType :: Lens' EditsExpansionFilesUpload EditsExpansionFilesUploadExpansionFileType
eExpansionFileType
= lens _eExpansionFileType
(\ s a -> s{_eExpansionFileType = a})
eEditId :: Lens' EditsExpansionFilesUpload Text
eEditId = lens _eEditId (\ s a -> s{_eEditId = a})
instance GoogleRequest EditsExpansionFilesUpload
where
type Rs EditsExpansionFilesUpload =
ExpansionFilesUploadResponse
type Scopes EditsExpansionFilesUpload =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsExpansionFilesUpload'{..}
= go _ePackageName _eEditId _eAPKVersionCode
_eExpansionFileType
(Just AltJSON)
androidPublisherService
where go :<|> _
= buildClient
(Proxy :: Proxy EditsExpansionFilesUploadResource)
mempty
instance GoogleRequest
(MediaUpload EditsExpansionFilesUpload) where
type Rs (MediaUpload EditsExpansionFilesUpload) =
ExpansionFilesUploadResponse
type Scopes (MediaUpload EditsExpansionFilesUpload) =
Scopes EditsExpansionFilesUpload
requestClient
(MediaUpload EditsExpansionFilesUpload'{..} body)
= go _ePackageName _eEditId _eAPKVersionCode
_eExpansionFileType
(Just AltJSON)
(Just AltMedia)
body
androidPublisherService
where _ :<|> go
= buildClient
(Proxy :: Proxy EditsExpansionFilesUploadResource)
mempty