{-# 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.AppState.States.Get
(
StatesGetResource
, statesGet
, StatesGet
, sgStateKey
) where
import Network.Google.AppState.Types
import Network.Google.Prelude
type StatesGetResource =
"appstate" :>
"v1" :>
"states" :>
Capture "stateKey" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] GetResponse
newtype StatesGet = StatesGet'
{ _sgStateKey :: Textual Int32
} deriving (Eq,Show,Data,Typeable,Generic)
statesGet
:: Int32
-> StatesGet
statesGet pSgStateKey_ =
StatesGet'
{ _sgStateKey = _Coerce # pSgStateKey_
}
sgStateKey :: Lens' StatesGet Int32
sgStateKey
= lens _sgStateKey (\ s a -> s{_sgStateKey = a}) .
_Coerce
instance GoogleRequest StatesGet where
type Rs StatesGet = GetResponse
type Scopes StatesGet =
'["https://www.googleapis.com/auth/appstate"]
requestClient StatesGet'{..}
= go _sgStateKey (Just AltJSON) appStateService
where go
= buildClient (Proxy :: Proxy StatesGetResource)
mempty