{-# 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.Applications.Get
(
ApplicationsGetResource
, applicationsGet
, ApplicationsGet
, agApplicationId
, agPlatformType
, agLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type ApplicationsGetResource =
"games" :>
"v1" :>
"applications" :>
Capture "applicationId" Text :>
QueryParam "platformType" ApplicationsGetPlatformType
:>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Application
data ApplicationsGet = ApplicationsGet'
{ _agApplicationId :: !Text
, _agPlatformType :: !(Maybe ApplicationsGetPlatformType)
, _agLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
applicationsGet
:: Text
-> ApplicationsGet
applicationsGet pAgApplicationId_ =
ApplicationsGet'
{ _agApplicationId = pAgApplicationId_
, _agPlatformType = Nothing
, _agLanguage = Nothing
}
agApplicationId :: Lens' ApplicationsGet Text
agApplicationId
= lens _agApplicationId
(\ s a -> s{_agApplicationId = a})
agPlatformType :: Lens' ApplicationsGet (Maybe ApplicationsGetPlatformType)
agPlatformType
= lens _agPlatformType
(\ s a -> s{_agPlatformType = a})
agLanguage :: Lens' ApplicationsGet (Maybe Text)
agLanguage
= lens _agLanguage (\ s a -> s{_agLanguage = a})
instance GoogleRequest ApplicationsGet where
type Rs ApplicationsGet = Application
type Scopes ApplicationsGet =
'["https://www.googleapis.com/auth/games"]
requestClient ApplicationsGet'{..}
= go _agApplicationId _agPlatformType _agLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy ApplicationsGetResource)
mempty