{-# 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.Insert
(
EditsInsertResource
, editsInsert
, EditsInsert
, eiPackageName
, eiPayload
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsInsertResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AppEdit :> Post '[JSON] AppEdit
data EditsInsert = EditsInsert'
{ _eiPackageName :: !Text
, _eiPayload :: !AppEdit
} deriving (Eq,Show,Data,Typeable,Generic)
editsInsert
:: Text
-> AppEdit
-> EditsInsert
editsInsert pEiPackageName_ pEiPayload_ =
EditsInsert'
{ _eiPackageName = pEiPackageName_
, _eiPayload = pEiPayload_
}
eiPackageName :: Lens' EditsInsert Text
eiPackageName
= lens _eiPackageName
(\ s a -> s{_eiPackageName = a})
eiPayload :: Lens' EditsInsert AppEdit
eiPayload
= lens _eiPayload (\ s a -> s{_eiPayload = a})
instance GoogleRequest EditsInsert where
type Rs EditsInsert = AppEdit
type Scopes EditsInsert =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsInsert'{..}
= go _eiPackageName (Just AltJSON) _eiPayload
androidPublisherService
where go
= buildClient (Proxy :: Proxy EditsInsertResource)
mempty