{-# 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.DataSources.Delete
(
UsersDataSourcesDeleteResource
, usersDataSourcesDelete
, UsersDataSourcesDelete
, udsdDataSourceId
, udsdUserId
) where
import Network.Google.Fitness.Types
import Network.Google.Prelude
type UsersDataSourcesDeleteResource =
"fitness" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"dataSources" :>
Capture "dataSourceId" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] DataSource
data UsersDataSourcesDelete = UsersDataSourcesDelete'
{ _udsdDataSourceId :: !Text
, _udsdUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersDataSourcesDelete
:: Text
-> Text
-> UsersDataSourcesDelete
usersDataSourcesDelete pUdsdDataSourceId_ pUdsdUserId_ =
UsersDataSourcesDelete'
{ _udsdDataSourceId = pUdsdDataSourceId_
, _udsdUserId = pUdsdUserId_
}
udsdDataSourceId :: Lens' UsersDataSourcesDelete Text
udsdDataSourceId
= lens _udsdDataSourceId
(\ s a -> s{_udsdDataSourceId = a})
udsdUserId :: Lens' UsersDataSourcesDelete Text
udsdUserId
= lens _udsdUserId (\ s a -> s{_udsdUserId = a})
instance GoogleRequest UsersDataSourcesDelete where
type Rs UsersDataSourcesDelete = DataSource
type Scopes UsersDataSourcesDelete =
'["https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"]
requestClient UsersDataSourcesDelete'{..}
= go _udsdUserId _udsdDataSourceId (Just AltJSON)
fitnessService
where go
= buildClient
(Proxy :: Proxy UsersDataSourcesDeleteResource)
mempty