{-# 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.Patch
(
EditsDetailsPatchResource
, editsDetailsPatch
, EditsDetailsPatch
, edpPackageName
, edpPayload
, edpEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsDetailsPatchResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"details" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AppDetails :>
Patch '[JSON] AppDetails
data EditsDetailsPatch = EditsDetailsPatch'
{ _edpPackageName :: !Text
, _edpPayload :: !AppDetails
, _edpEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsDetailsPatch
:: Text
-> AppDetails
-> Text
-> EditsDetailsPatch
editsDetailsPatch pEdpPackageName_ pEdpPayload_ pEdpEditId_ =
EditsDetailsPatch'
{ _edpPackageName = pEdpPackageName_
, _edpPayload = pEdpPayload_
, _edpEditId = pEdpEditId_
}
edpPackageName :: Lens' EditsDetailsPatch Text
edpPackageName
= lens _edpPackageName
(\ s a -> s{_edpPackageName = a})
edpPayload :: Lens' EditsDetailsPatch AppDetails
edpPayload
= lens _edpPayload (\ s a -> s{_edpPayload = a})
edpEditId :: Lens' EditsDetailsPatch Text
edpEditId
= lens _edpEditId (\ s a -> s{_edpEditId = a})
instance GoogleRequest EditsDetailsPatch where
type Rs EditsDetailsPatch = AppDetails
type Scopes EditsDetailsPatch =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsDetailsPatch'{..}
= go _edpPackageName _edpEditId (Just AltJSON)
_edpPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy EditsDetailsPatchResource)
mempty