{-# 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.Patch
(
EditsExpansionFilesPatchResource
, editsExpansionFilesPatch
, EditsExpansionFilesPatch
, eefpPackageName
, eefpAPKVersionCode
, eefpPayload
, eefpExpansionFileType
, eefpEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsExpansionFilesPatchResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"apks" :>
Capture "apkVersionCode" (Textual Int32) :>
"expansionFiles" :>
Capture "expansionFileType"
EditsExpansionFilesPatchExpansionFileType
:>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ExpansionFile :>
Patch '[JSON] ExpansionFile
data EditsExpansionFilesPatch = EditsExpansionFilesPatch'
{ _eefpPackageName :: !Text
, _eefpAPKVersionCode :: !(Textual Int32)
, _eefpPayload :: !ExpansionFile
, _eefpExpansionFileType :: !EditsExpansionFilesPatchExpansionFileType
, _eefpEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsExpansionFilesPatch
:: Text
-> Int32
-> ExpansionFile
-> EditsExpansionFilesPatchExpansionFileType
-> Text
-> EditsExpansionFilesPatch
editsExpansionFilesPatch pEefpPackageName_ pEefpAPKVersionCode_ pEefpPayload_ pEefpExpansionFileType_ pEefpEditId_ =
EditsExpansionFilesPatch'
{ _eefpPackageName = pEefpPackageName_
, _eefpAPKVersionCode = _Coerce # pEefpAPKVersionCode_
, _eefpPayload = pEefpPayload_
, _eefpExpansionFileType = pEefpExpansionFileType_
, _eefpEditId = pEefpEditId_
}
eefpPackageName :: Lens' EditsExpansionFilesPatch Text
eefpPackageName
= lens _eefpPackageName
(\ s a -> s{_eefpPackageName = a})
eefpAPKVersionCode :: Lens' EditsExpansionFilesPatch Int32
eefpAPKVersionCode
= lens _eefpAPKVersionCode
(\ s a -> s{_eefpAPKVersionCode = a})
. _Coerce
eefpPayload :: Lens' EditsExpansionFilesPatch ExpansionFile
eefpPayload
= lens _eefpPayload (\ s a -> s{_eefpPayload = a})
eefpExpansionFileType :: Lens' EditsExpansionFilesPatch EditsExpansionFilesPatchExpansionFileType
eefpExpansionFileType
= lens _eefpExpansionFileType
(\ s a -> s{_eefpExpansionFileType = a})
eefpEditId :: Lens' EditsExpansionFilesPatch Text
eefpEditId
= lens _eefpEditId (\ s a -> s{_eefpEditId = a})
instance GoogleRequest EditsExpansionFilesPatch where
type Rs EditsExpansionFilesPatch = ExpansionFile
type Scopes EditsExpansionFilesPatch =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsExpansionFilesPatch'{..}
= go _eefpPackageName _eefpEditId _eefpAPKVersionCode
_eefpExpansionFileType
(Just AltJSON)
_eefpPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy EditsExpansionFilesPatchResource)
mempty