{-# 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.ShortLinks.Create
(
ShortLinksCreateResource
, shortLinksCreate
, ShortLinksCreate
, slcXgafv
, slcUploadProtocol
, slcAccessToken
, slcUploadType
, slcPayload
, slcCallback
) where
import Network.Google.FirebaseDynamicLinks.Types
import Network.Google.Prelude
type ShortLinksCreateResource =
"v1" :>
"shortLinks" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateShortDynamicLinkRequest :>
Post '[JSON] CreateShortDynamicLinkResponse
data ShortLinksCreate = ShortLinksCreate'
{ _slcXgafv :: !(Maybe Xgafv)
, _slcUploadProtocol :: !(Maybe Text)
, _slcAccessToken :: !(Maybe Text)
, _slcUploadType :: !(Maybe Text)
, _slcPayload :: !CreateShortDynamicLinkRequest
, _slcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
shortLinksCreate
:: CreateShortDynamicLinkRequest
-> ShortLinksCreate
shortLinksCreate pSlcPayload_ =
ShortLinksCreate'
{ _slcXgafv = Nothing
, _slcUploadProtocol = Nothing
, _slcAccessToken = Nothing
, _slcUploadType = Nothing
, _slcPayload = pSlcPayload_
, _slcCallback = Nothing
}
slcXgafv :: Lens' ShortLinksCreate (Maybe Xgafv)
slcXgafv = lens _slcXgafv (\ s a -> s{_slcXgafv = a})
slcUploadProtocol :: Lens' ShortLinksCreate (Maybe Text)
slcUploadProtocol
= lens _slcUploadProtocol
(\ s a -> s{_slcUploadProtocol = a})
slcAccessToken :: Lens' ShortLinksCreate (Maybe Text)
slcAccessToken
= lens _slcAccessToken
(\ s a -> s{_slcAccessToken = a})
slcUploadType :: Lens' ShortLinksCreate (Maybe Text)
slcUploadType
= lens _slcUploadType
(\ s a -> s{_slcUploadType = a})
slcPayload :: Lens' ShortLinksCreate CreateShortDynamicLinkRequest
slcPayload
= lens _slcPayload (\ s a -> s{_slcPayload = a})
slcCallback :: Lens' ShortLinksCreate (Maybe Text)
slcCallback
= lens _slcCallback (\ s a -> s{_slcCallback = a})
instance GoogleRequest ShortLinksCreate where
type Rs ShortLinksCreate =
CreateShortDynamicLinkResponse
type Scopes ShortLinksCreate =
'["https://www.googleapis.com/auth/firebase"]
requestClient ShortLinksCreate'{..}
= go _slcXgafv _slcUploadProtocol _slcAccessToken
_slcUploadType
_slcCallback
(Just AltJSON)
_slcPayload
firebaseDynamicLinksService
where go
= buildClient
(Proxy :: Proxy ShortLinksCreateResource)
mempty