{-# 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.Analytics.Management.Segments.List
(
ManagementSegmentsListResource
, managementSegmentsList
, ManagementSegmentsList
, mslStartIndex
, mslMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementSegmentsListResource =
"analytics" :>
"v3" :>
"management" :>
"segments" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Segments
data ManagementSegmentsList = ManagementSegmentsList'
{ _mslStartIndex :: !(Maybe (Textual Int32))
, _mslMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementSegmentsList
:: ManagementSegmentsList
managementSegmentsList =
ManagementSegmentsList'
{ _mslStartIndex = Nothing
, _mslMaxResults = Nothing
}
mslStartIndex :: Lens' ManagementSegmentsList (Maybe Int32)
mslStartIndex
= lens _mslStartIndex
(\ s a -> s{_mslStartIndex = a})
. mapping _Coerce
mslMaxResults :: Lens' ManagementSegmentsList (Maybe Int32)
mslMaxResults
= lens _mslMaxResults
(\ s a -> s{_mslMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementSegmentsList where
type Rs ManagementSegmentsList = Segments
type Scopes ManagementSegmentsList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementSegmentsList'{..}
= go _mslStartIndex _mslMaxResults (Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementSegmentsListResource)
mempty