{-# 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.Get
(
UsersDataSourcesGetResource
, usersDataSourcesGet
, UsersDataSourcesGet
, udsgDataSourceId
, udsgUserId
) where
import Network.Google.Fitness.Types
import Network.Google.Prelude
type UsersDataSourcesGetResource =
"fitness" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"dataSources" :>
Capture "dataSourceId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DataSource
data UsersDataSourcesGet = UsersDataSourcesGet'
{ _udsgDataSourceId :: !Text
, _udsgUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersDataSourcesGet
:: Text
-> Text
-> UsersDataSourcesGet
usersDataSourcesGet pUdsgDataSourceId_ pUdsgUserId_ =
UsersDataSourcesGet'
{ _udsgDataSourceId = pUdsgDataSourceId_
, _udsgUserId = pUdsgUserId_
}
udsgDataSourceId :: Lens' UsersDataSourcesGet Text
udsgDataSourceId
= lens _udsgDataSourceId
(\ s a -> s{_udsgDataSourceId = a})
udsgUserId :: Lens' UsersDataSourcesGet Text
udsgUserId
= lens _udsgUserId (\ s a -> s{_udsgUserId = a})
instance GoogleRequest UsersDataSourcesGet where
type Rs UsersDataSourcesGet = DataSource
type Scopes UsersDataSourcesGet =
'["https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"]
requestClient UsersDataSourcesGet'{..}
= go _udsgUserId _udsgDataSourceId (Just AltJSON)
fitnessService
where go
= buildClient
(Proxy :: Proxy UsersDataSourcesGetResource)
mempty