{-# 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.ManagedShortLinks.Create
(
ManagedShortLinksCreateResource
, managedShortLinksCreate
, ManagedShortLinksCreate
, mslcXgafv
, mslcUploadProtocol
, mslcAccessToken
, mslcUploadType
, mslcPayload
, mslcCallback
) where
import Network.Google.FirebaseDynamicLinks.Types
import Network.Google.Prelude
type ManagedShortLinksCreateResource =
"v1" :>
"managedShortLinks:create" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateManagedShortLinkRequest :>
Post '[JSON] CreateManagedShortLinkResponse
data ManagedShortLinksCreate = ManagedShortLinksCreate'
{ _mslcXgafv :: !(Maybe Xgafv)
, _mslcUploadProtocol :: !(Maybe Text)
, _mslcAccessToken :: !(Maybe Text)
, _mslcUploadType :: !(Maybe Text)
, _mslcPayload :: !CreateManagedShortLinkRequest
, _mslcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
managedShortLinksCreate
:: CreateManagedShortLinkRequest
-> ManagedShortLinksCreate
managedShortLinksCreate pMslcPayload_ =
ManagedShortLinksCreate'
{ _mslcXgafv = Nothing
, _mslcUploadProtocol = Nothing
, _mslcAccessToken = Nothing
, _mslcUploadType = Nothing
, _mslcPayload = pMslcPayload_
, _mslcCallback = Nothing
}
mslcXgafv :: Lens' ManagedShortLinksCreate (Maybe Xgafv)
mslcXgafv
= lens _mslcXgafv (\ s a -> s{_mslcXgafv = a})
mslcUploadProtocol :: Lens' ManagedShortLinksCreate (Maybe Text)
mslcUploadProtocol
= lens _mslcUploadProtocol
(\ s a -> s{_mslcUploadProtocol = a})
mslcAccessToken :: Lens' ManagedShortLinksCreate (Maybe Text)
mslcAccessToken
= lens _mslcAccessToken
(\ s a -> s{_mslcAccessToken = a})
mslcUploadType :: Lens' ManagedShortLinksCreate (Maybe Text)
mslcUploadType
= lens _mslcUploadType
(\ s a -> s{_mslcUploadType = a})
mslcPayload :: Lens' ManagedShortLinksCreate CreateManagedShortLinkRequest
mslcPayload
= lens _mslcPayload (\ s a -> s{_mslcPayload = a})
mslcCallback :: Lens' ManagedShortLinksCreate (Maybe Text)
mslcCallback
= lens _mslcCallback (\ s a -> s{_mslcCallback = a})
instance GoogleRequest ManagedShortLinksCreate where
type Rs ManagedShortLinksCreate =
CreateManagedShortLinkResponse
type Scopes ManagedShortLinksCreate =
'["https://www.googleapis.com/auth/firebase"]
requestClient ManagedShortLinksCreate'{..}
= go _mslcXgafv _mslcUploadProtocol _mslcAccessToken
_mslcUploadType
_mslcCallback
(Just AltJSON)
_mslcPayload
firebaseDynamicLinksService
where go
= buildClient
(Proxy :: Proxy ManagedShortLinksCreateResource)
mempty