{-# 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.DeobfuscationFiles.Upload
(
EditsDeobfuscationFilesUploadResource
, editsDeobfuscationFilesUpload
, EditsDeobfuscationFilesUpload
, edfuDeobfuscationFileType
, edfuPackageName
, edfuAPKVersionCode
, edfuEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsDeobfuscationFilesUploadResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"apks" :>
Capture "apkVersionCode" (Textual Int32) :>
"deobfuscationFiles" :>
Capture "deobfuscationFileType"
EditsDeobfuscationFilesUploadDeobfuscationFileType
:>
QueryParam "alt" AltJSON :>
Post '[JSON] DeobfuscationFilesUploadResponse
:<|>
"upload" :>
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"apks" :>
Capture "apkVersionCode" (Textual Int32) :>
"deobfuscationFiles" :>
Capture "deobfuscationFileType"
EditsDeobfuscationFilesUploadDeobfuscationFileType
:>
QueryParam "alt" AltJSON :>
QueryParam "uploadType" AltMedia :>
AltMedia :>
Post '[JSON] DeobfuscationFilesUploadResponse
data EditsDeobfuscationFilesUpload = EditsDeobfuscationFilesUpload'
{ _edfuDeobfuscationFileType :: !EditsDeobfuscationFilesUploadDeobfuscationFileType
, _edfuPackageName :: !Text
, _edfuAPKVersionCode :: !(Textual Int32)
, _edfuEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsDeobfuscationFilesUpload
:: EditsDeobfuscationFilesUploadDeobfuscationFileType
-> Text
-> Int32
-> Text
-> EditsDeobfuscationFilesUpload
editsDeobfuscationFilesUpload pEdfuDeobfuscationFileType_ pEdfuPackageName_ pEdfuAPKVersionCode_ pEdfuEditId_ =
EditsDeobfuscationFilesUpload'
{ _edfuDeobfuscationFileType = pEdfuDeobfuscationFileType_
, _edfuPackageName = pEdfuPackageName_
, _edfuAPKVersionCode = _Coerce # pEdfuAPKVersionCode_
, _edfuEditId = pEdfuEditId_
}
edfuDeobfuscationFileType :: Lens' EditsDeobfuscationFilesUpload EditsDeobfuscationFilesUploadDeobfuscationFileType
edfuDeobfuscationFileType
= lens _edfuDeobfuscationFileType
(\ s a -> s{_edfuDeobfuscationFileType = a})
edfuPackageName :: Lens' EditsDeobfuscationFilesUpload Text
edfuPackageName
= lens _edfuPackageName
(\ s a -> s{_edfuPackageName = a})
edfuAPKVersionCode :: Lens' EditsDeobfuscationFilesUpload Int32
edfuAPKVersionCode
= lens _edfuAPKVersionCode
(\ s a -> s{_edfuAPKVersionCode = a})
. _Coerce
edfuEditId :: Lens' EditsDeobfuscationFilesUpload Text
edfuEditId
= lens _edfuEditId (\ s a -> s{_edfuEditId = a})
instance GoogleRequest EditsDeobfuscationFilesUpload
where
type Rs EditsDeobfuscationFilesUpload =
DeobfuscationFilesUploadResponse
type Scopes EditsDeobfuscationFilesUpload =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsDeobfuscationFilesUpload'{..}
= go _edfuPackageName _edfuEditId _edfuAPKVersionCode
_edfuDeobfuscationFileType
(Just AltJSON)
androidPublisherService
where go :<|> _
= buildClient
(Proxy ::
Proxy EditsDeobfuscationFilesUploadResource)
mempty
instance GoogleRequest
(MediaUpload EditsDeobfuscationFilesUpload) where
type Rs (MediaUpload EditsDeobfuscationFilesUpload) =
DeobfuscationFilesUploadResponse
type Scopes
(MediaUpload EditsDeobfuscationFilesUpload)
= Scopes EditsDeobfuscationFilesUpload
requestClient
(MediaUpload EditsDeobfuscationFilesUpload'{..} body)
= go _edfuPackageName _edfuEditId _edfuAPKVersionCode
_edfuDeobfuscationFileType
(Just AltJSON)
(Just AltMedia)
body
androidPublisherService
where _ :<|> go
= buildClient
(Proxy ::
Proxy EditsDeobfuscationFilesUploadResource)
mempty