{-# 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.Details.Update
(
EditsDetailsUpdateResource
, editsDetailsUpdate
, EditsDetailsUpdate
, eduPackageName
, eduPayload
, eduEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsDetailsUpdateResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"details" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AppDetails :> Put '[JSON] AppDetails
data EditsDetailsUpdate = EditsDetailsUpdate'
{ _eduPackageName :: !Text
, _eduPayload :: !AppDetails
, _eduEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsDetailsUpdate
:: Text
-> AppDetails
-> Text
-> EditsDetailsUpdate
editsDetailsUpdate pEduPackageName_ pEduPayload_ pEduEditId_ =
EditsDetailsUpdate'
{ _eduPackageName = pEduPackageName_
, _eduPayload = pEduPayload_
, _eduEditId = pEduEditId_
}
eduPackageName :: Lens' EditsDetailsUpdate Text
eduPackageName
= lens _eduPackageName
(\ s a -> s{_eduPackageName = a})
eduPayload :: Lens' EditsDetailsUpdate AppDetails
eduPayload
= lens _eduPayload (\ s a -> s{_eduPayload = a})
eduEditId :: Lens' EditsDetailsUpdate Text
eduEditId
= lens _eduEditId (\ s a -> s{_eduEditId = a})
instance GoogleRequest EditsDetailsUpdate where
type Rs EditsDetailsUpdate = AppDetails
type Scopes EditsDetailsUpdate =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsDetailsUpdate'{..}
= go _eduPackageName _eduEditId (Just AltJSON)
_eduPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy EditsDetailsUpdateResource)
mempty