{-# 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.DataSets.Get
(
UsersDataSourcesDataSetsGetResource
, usersDataSourcesDataSetsGet
, UsersDataSourcesDataSetsGet
, udsdsgDataSourceId
, udsdsgUserId
, udsdsgDataSetId
, udsdsgLimit
, udsdsgPageToken
) where
import Network.Google.Fitness.Types
import Network.Google.Prelude
type UsersDataSourcesDataSetsGetResource =
"fitness" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"dataSources" :>
Capture "dataSourceId" Text :>
"datasets" :>
Capture "datasetId" Text :>
QueryParam "limit" (Textual Int32) :>
QueryParam "pageToken" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DataSet
data UsersDataSourcesDataSetsGet = UsersDataSourcesDataSetsGet'
{ _udsdsgDataSourceId :: !Text
, _udsdsgUserId :: !Text
, _udsdsgDataSetId :: !Text
, _udsdsgLimit :: !(Maybe (Textual Int32))
, _udsdsgPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
usersDataSourcesDataSetsGet
:: Text
-> Text
-> Text
-> UsersDataSourcesDataSetsGet
usersDataSourcesDataSetsGet pUdsdsgDataSourceId_ pUdsdsgUserId_ pUdsdsgDataSetId_ =
UsersDataSourcesDataSetsGet'
{ _udsdsgDataSourceId = pUdsdsgDataSourceId_
, _udsdsgUserId = pUdsdsgUserId_
, _udsdsgDataSetId = pUdsdsgDataSetId_
, _udsdsgLimit = Nothing
, _udsdsgPageToken = Nothing
}
udsdsgDataSourceId :: Lens' UsersDataSourcesDataSetsGet Text
udsdsgDataSourceId
= lens _udsdsgDataSourceId
(\ s a -> s{_udsdsgDataSourceId = a})
udsdsgUserId :: Lens' UsersDataSourcesDataSetsGet Text
udsdsgUserId
= lens _udsdsgUserId (\ s a -> s{_udsdsgUserId = a})
udsdsgDataSetId :: Lens' UsersDataSourcesDataSetsGet Text
udsdsgDataSetId
= lens _udsdsgDataSetId
(\ s a -> s{_udsdsgDataSetId = a})
udsdsgLimit :: Lens' UsersDataSourcesDataSetsGet (Maybe Int32)
udsdsgLimit
= lens _udsdsgLimit (\ s a -> s{_udsdsgLimit = a}) .
mapping _Coerce
udsdsgPageToken :: Lens' UsersDataSourcesDataSetsGet (Maybe Text)
udsdsgPageToken
= lens _udsdsgPageToken
(\ s a -> s{_udsdsgPageToken = a})
instance GoogleRequest UsersDataSourcesDataSetsGet
where
type Rs UsersDataSourcesDataSetsGet = DataSet
type Scopes UsersDataSourcesDataSetsGet =
'["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 UsersDataSourcesDataSetsGet'{..}
= go _udsdsgUserId _udsdsgDataSourceId
_udsdsgDataSetId
_udsdsgLimit
_udsdsgPageToken
(Just AltJSON)
fitnessService
where go
= buildClient
(Proxy :: Proxy UsersDataSourcesDataSetsGetResource)
mempty