{-# 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.FirebaseDynamicLinks.GetLinkStats
(
GetLinkStatsResource
, getLinkStats
, GetLinkStats
, glsXgafv
, glsUploadProtocol
, glsDynamicLink
, glsAccessToken
, glsUploadType
, glsSdkVersion
, glsDurationDays
, glsCallback
) where
import Network.Google.FirebaseDynamicLinks.Types
import Network.Google.Prelude
type GetLinkStatsResource =
"v1" :>
Capture "dynamicLink" Text :>
"linkStats" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "sdkVersion" Text :>
QueryParam "durationDays" (Textual Int64) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] DynamicLinkStats
data GetLinkStats = GetLinkStats'
{ _glsXgafv :: !(Maybe Xgafv)
, _glsUploadProtocol :: !(Maybe Text)
, _glsDynamicLink :: !Text
, _glsAccessToken :: !(Maybe Text)
, _glsUploadType :: !(Maybe Text)
, _glsSdkVersion :: !(Maybe Text)
, _glsDurationDays :: !(Maybe (Textual Int64))
, _glsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
getLinkStats
:: Text
-> GetLinkStats
getLinkStats pGlsDynamicLink_ =
GetLinkStats'
{ _glsXgafv = Nothing
, _glsUploadProtocol = Nothing
, _glsDynamicLink = pGlsDynamicLink_
, _glsAccessToken = Nothing
, _glsUploadType = Nothing
, _glsSdkVersion = Nothing
, _glsDurationDays = Nothing
, _glsCallback = Nothing
}
glsXgafv :: Lens' GetLinkStats (Maybe Xgafv)
glsXgafv = lens _glsXgafv (\ s a -> s{_glsXgafv = a})
glsUploadProtocol :: Lens' GetLinkStats (Maybe Text)
glsUploadProtocol
= lens _glsUploadProtocol
(\ s a -> s{_glsUploadProtocol = a})
glsDynamicLink :: Lens' GetLinkStats Text
glsDynamicLink
= lens _glsDynamicLink
(\ s a -> s{_glsDynamicLink = a})
glsAccessToken :: Lens' GetLinkStats (Maybe Text)
glsAccessToken
= lens _glsAccessToken
(\ s a -> s{_glsAccessToken = a})
glsUploadType :: Lens' GetLinkStats (Maybe Text)
glsUploadType
= lens _glsUploadType
(\ s a -> s{_glsUploadType = a})
glsSdkVersion :: Lens' GetLinkStats (Maybe Text)
glsSdkVersion
= lens _glsSdkVersion
(\ s a -> s{_glsSdkVersion = a})
glsDurationDays :: Lens' GetLinkStats (Maybe Int64)
glsDurationDays
= lens _glsDurationDays
(\ s a -> s{_glsDurationDays = a})
. mapping _Coerce
glsCallback :: Lens' GetLinkStats (Maybe Text)
glsCallback
= lens _glsCallback (\ s a -> s{_glsCallback = a})
instance GoogleRequest GetLinkStats where
type Rs GetLinkStats = DynamicLinkStats
type Scopes GetLinkStats =
'["https://www.googleapis.com/auth/firebase"]
requestClient GetLinkStats'{..}
= go _glsDynamicLink _glsXgafv _glsUploadProtocol
_glsAccessToken
_glsUploadType
_glsSdkVersion
_glsDurationDays
_glsCallback
(Just AltJSON)
firebaseDynamicLinksService
where go
= buildClient (Proxy :: Proxy GetLinkStatsResource)
mempty