{-# 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.Bundles.Upload
(
EditsBundlesUploadResource
, editsBundlesUpload
, EditsBundlesUpload
, ebuPackageName
, ebuAckBundleInstallationWarning
, ebuEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsBundlesUploadResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"bundles" :>
QueryParam "ackBundleInstallationWarning" Bool :>
QueryParam "alt" AltJSON :> Post '[JSON] Bundle
:<|>
"upload" :>
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"bundles" :>
QueryParam "ackBundleInstallationWarning" Bool :>
QueryParam "alt" AltJSON :>
QueryParam "uploadType" AltMedia :>
AltMedia :> Post '[JSON] Bundle
data EditsBundlesUpload = EditsBundlesUpload'
{ _ebuPackageName :: !Text
, _ebuAckBundleInstallationWarning :: !(Maybe Bool)
, _ebuEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsBundlesUpload
:: Text
-> Text
-> EditsBundlesUpload
editsBundlesUpload pEbuPackageName_ pEbuEditId_ =
EditsBundlesUpload'
{ _ebuPackageName = pEbuPackageName_
, _ebuAckBundleInstallationWarning = Nothing
, _ebuEditId = pEbuEditId_
}
ebuPackageName :: Lens' EditsBundlesUpload Text
ebuPackageName
= lens _ebuPackageName
(\ s a -> s{_ebuPackageName = a})
ebuAckBundleInstallationWarning :: Lens' EditsBundlesUpload (Maybe Bool)
ebuAckBundleInstallationWarning
= lens _ebuAckBundleInstallationWarning
(\ s a -> s{_ebuAckBundleInstallationWarning = a})
ebuEditId :: Lens' EditsBundlesUpload Text
ebuEditId
= lens _ebuEditId (\ s a -> s{_ebuEditId = a})
instance GoogleRequest EditsBundlesUpload where
type Rs EditsBundlesUpload = Bundle
type Scopes EditsBundlesUpload =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsBundlesUpload'{..}
= go _ebuPackageName _ebuEditId
_ebuAckBundleInstallationWarning
(Just AltJSON)
androidPublisherService
where go :<|> _
= buildClient
(Proxy :: Proxy EditsBundlesUploadResource)
mempty
instance GoogleRequest
(MediaUpload EditsBundlesUpload) where
type Rs (MediaUpload EditsBundlesUpload) = Bundle
type Scopes (MediaUpload EditsBundlesUpload) =
Scopes EditsBundlesUpload
requestClient
(MediaUpload EditsBundlesUpload'{..} body)
= go _ebuPackageName _ebuEditId
_ebuAckBundleInstallationWarning
(Just AltJSON)
(Just AltMedia)
body
androidPublisherService
where _ :<|> go
= buildClient
(Proxy :: Proxy EditsBundlesUploadResource)
mempty