{-# 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.Clear
(
StatesClearResource
, statesClear
, StatesClear
, scStateKey
, scCurrentDataVersion
) where
import Network.Google.AppState.Types
import Network.Google.Prelude
type StatesClearResource =
"appstate" :>
"v1" :>
"states" :>
Capture "stateKey" (Textual Int32) :>
"clear" :>
QueryParam "currentDataVersion" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] WriteResult
data StatesClear = StatesClear'
{ _scStateKey :: !(Textual Int32)
, _scCurrentDataVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
statesClear
:: Int32
-> StatesClear
statesClear pScStateKey_ =
StatesClear'
{ _scStateKey = _Coerce # pScStateKey_
, _scCurrentDataVersion = Nothing
}
scStateKey :: Lens' StatesClear Int32
scStateKey
= lens _scStateKey (\ s a -> s{_scStateKey = a}) .
_Coerce
scCurrentDataVersion :: Lens' StatesClear (Maybe Text)
scCurrentDataVersion
= lens _scCurrentDataVersion
(\ s a -> s{_scCurrentDataVersion = a})
instance GoogleRequest StatesClear where
type Rs StatesClear = WriteResult
type Scopes StatesClear =
'["https://www.googleapis.com/auth/appstate"]
requestClient StatesClear'{..}
= go _scStateKey _scCurrentDataVersion (Just AltJSON)
appStateService
where go
= buildClient (Proxy :: Proxy StatesClearResource)
mempty