{-# 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.Update
(
EditsTracksUpdateResource
, editsTracksUpdate
, EditsTracksUpdate
, etuTrack
, etuPackageName
, etuPayload
, etuEditId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type EditsTracksUpdateResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"edits" :>
Capture "editId" Text :>
"tracks" :>
Capture "track" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Track :> Put '[JSON] Track
data EditsTracksUpdate = EditsTracksUpdate'
{ _etuTrack :: !Text
, _etuPackageName :: !Text
, _etuPayload :: !Track
, _etuEditId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
editsTracksUpdate
:: Text
-> Text
-> Track
-> Text
-> EditsTracksUpdate
editsTracksUpdate pEtuTrack_ pEtuPackageName_ pEtuPayload_ pEtuEditId_ =
EditsTracksUpdate'
{ _etuTrack = pEtuTrack_
, _etuPackageName = pEtuPackageName_
, _etuPayload = pEtuPayload_
, _etuEditId = pEtuEditId_
}
etuTrack :: Lens' EditsTracksUpdate Text
etuTrack = lens _etuTrack (\ s a -> s{_etuTrack = a})
etuPackageName :: Lens' EditsTracksUpdate Text
etuPackageName
= lens _etuPackageName
(\ s a -> s{_etuPackageName = a})
etuPayload :: Lens' EditsTracksUpdate Track
etuPayload
= lens _etuPayload (\ s a -> s{_etuPayload = a})
etuEditId :: Lens' EditsTracksUpdate Text
etuEditId
= lens _etuEditId (\ s a -> s{_etuEditId = a})
instance GoogleRequest EditsTracksUpdate where
type Rs EditsTracksUpdate = Track
type Scopes EditsTracksUpdate =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient EditsTracksUpdate'{..}
= go _etuPackageName _etuEditId _etuTrack
(Just AltJSON)
_etuPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy EditsTracksUpdateResource)
mempty