{-# 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.Fitness.Users.Sessions.Delete
(
UsersSessionsDeleteResource
, usersSessionsDelete
, UsersSessionsDelete
, usdUserId
, usdCurrentTimeMillis
, usdSessionId
) where
import Network.Google.Fitness.Types
import Network.Google.Prelude
type UsersSessionsDeleteResource =
"fitness" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"sessions" :>
Capture "sessionId" Text :>
QueryParam "currentTimeMillis" (Textual Int64) :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersSessionsDelete = UsersSessionsDelete'
{ _usdUserId :: !Text
, _usdCurrentTimeMillis :: !(Maybe (Textual Int64))
, _usdSessionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSessionsDelete
:: Text
-> Text
-> UsersSessionsDelete
usersSessionsDelete pUsdUserId_ pUsdSessionId_ =
UsersSessionsDelete'
{ _usdUserId = pUsdUserId_
, _usdCurrentTimeMillis = Nothing
, _usdSessionId = pUsdSessionId_
}
usdUserId :: Lens' UsersSessionsDelete Text
usdUserId
= lens _usdUserId (\ s a -> s{_usdUserId = a})
usdCurrentTimeMillis :: Lens' UsersSessionsDelete (Maybe Int64)
usdCurrentTimeMillis
= lens _usdCurrentTimeMillis
(\ s a -> s{_usdCurrentTimeMillis = a})
. mapping _Coerce
usdSessionId :: Lens' UsersSessionsDelete Text
usdSessionId
= lens _usdSessionId (\ s a -> s{_usdSessionId = a})
instance GoogleRequest UsersSessionsDelete where
type Rs UsersSessionsDelete = ()
type Scopes UsersSessionsDelete =
'["https://www.googleapis.com/auth/fitness.activity.write"]
requestClient UsersSessionsDelete'{..}
= go _usdUserId _usdSessionId _usdCurrentTimeMillis
(Just AltJSON)
fitnessService
where go
= buildClient
(Proxy :: Proxy UsersSessionsDeleteResource)
mempty