{-# 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.Games.Snapshots.Get
(
SnapshotsGetResource
, snapshotsGet
, SnapshotsGet
, sLanguage
, sSnapshotId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type SnapshotsGetResource =
"games" :>
"v1" :>
"snapshots" :>
Capture "snapshotId" Text :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Snapshot
data SnapshotsGet = SnapshotsGet'
{ _sLanguage :: !(Maybe Text)
, _sSnapshotId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
snapshotsGet
:: Text
-> SnapshotsGet
snapshotsGet pSSnapshotId_ =
SnapshotsGet'
{ _sLanguage = Nothing
, _sSnapshotId = pSSnapshotId_
}
sLanguage :: Lens' SnapshotsGet (Maybe Text)
sLanguage
= lens _sLanguage (\ s a -> s{_sLanguage = a})
sSnapshotId :: Lens' SnapshotsGet Text
sSnapshotId
= lens _sSnapshotId (\ s a -> s{_sSnapshotId = a})
instance GoogleRequest SnapshotsGet where
type Rs SnapshotsGet = Snapshot
type Scopes SnapshotsGet =
'["https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/games"]
requestClient SnapshotsGet'{..}
= go _sSnapshotId _sLanguage (Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy SnapshotsGetResource)
mempty