{-# 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.UnSampledReports.Insert
(
ManagementUnSampledReportsInsertResource
, managementUnSampledReportsInsert
, ManagementUnSampledReportsInsert
, musriWebPropertyId
, musriProFileId
, musriPayload
, musriAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementUnSampledReportsInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"unsampledReports" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UnSampledReport :>
Post '[JSON] UnSampledReport
data ManagementUnSampledReportsInsert = ManagementUnSampledReportsInsert'
{ _musriWebPropertyId :: !Text
, _musriProFileId :: !Text
, _musriPayload :: !UnSampledReport
, _musriAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementUnSampledReportsInsert
:: Text
-> Text
-> UnSampledReport
-> Text
-> ManagementUnSampledReportsInsert
managementUnSampledReportsInsert pMusriWebPropertyId_ pMusriProFileId_ pMusriPayload_ pMusriAccountId_ =
ManagementUnSampledReportsInsert'
{ _musriWebPropertyId = pMusriWebPropertyId_
, _musriProFileId = pMusriProFileId_
, _musriPayload = pMusriPayload_
, _musriAccountId = pMusriAccountId_
}
musriWebPropertyId :: Lens' ManagementUnSampledReportsInsert Text
musriWebPropertyId
= lens _musriWebPropertyId
(\ s a -> s{_musriWebPropertyId = a})
musriProFileId :: Lens' ManagementUnSampledReportsInsert Text
musriProFileId
= lens _musriProFileId
(\ s a -> s{_musriProFileId = a})
musriPayload :: Lens' ManagementUnSampledReportsInsert UnSampledReport
musriPayload
= lens _musriPayload (\ s a -> s{_musriPayload = a})
musriAccountId :: Lens' ManagementUnSampledReportsInsert Text
musriAccountId
= lens _musriAccountId
(\ s a -> s{_musriAccountId = a})
instance GoogleRequest
ManagementUnSampledReportsInsert where
type Rs ManagementUnSampledReportsInsert =
UnSampledReport
type Scopes ManagementUnSampledReportsInsert =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementUnSampledReportsInsert'{..}
= go _musriAccountId _musriWebPropertyId
_musriProFileId
(Just AltJSON)
_musriPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementUnSampledReportsInsertResource)
mempty