{-# 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.Tracks.Patch
(
EditsTracksPatchResource
, editsTracksPatch
, EditsTracksPatch
, etptTrack
, etptPackageName
, etptPayload
, etptEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsTracksPatchResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"tracks" :>
Capture "track" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Track :> Patch '[JSON] Track
data EditsTracksPatch = EditsTracksPatch'
{ _etptTrack :: !Text
, _etptPackageName :: !Text
, _etptPayload :: !Track
, _etptEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsTracksPatch
:: Text
-> Text
-> Track
-> Text
-> EditsTracksPatch
editsTracksPatch pEtptTrack_ pEtptPackageName_ pEtptPayload_ pEtptEditId_ =
EditsTracksPatch'
{ _etptTrack = pEtptTrack_
, _etptPackageName = pEtptPackageName_
, _etptPayload = pEtptPayload_
, _etptEditId = pEtptEditId_
}
etptTrack :: Lens' EditsTracksPatch Text
etptTrack
= lens _etptTrack (\ s a -> s{_etptTrack = a})
etptPackageName :: Lens' EditsTracksPatch Text
etptPackageName
= lens _etptPackageName
(\ s a -> s{_etptPackageName = a})
etptPayload :: Lens' EditsTracksPatch Track
etptPayload
= lens _etptPayload (\ s a -> s{_etptPayload = a})
etptEditId :: Lens' EditsTracksPatch Text
etptEditId
= lens _etptEditId (\ s a -> s{_etptEditId = a})
instance GoogleRequest EditsTracksPatch where
type Rs EditsTracksPatch = Track
type Scopes EditsTracksPatch =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsTracksPatch'{..}
= go _etptPackageName _etptEditId _etptTrack
(Just AltJSON)
_etptPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy EditsTracksPatchResource)
mempty