{-# 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.IdentityToolkit.RelyingParty.UploadAccount
(
RelyingPartyUploadAccountResource
, relyingPartyUploadAccount
, RelyingPartyUploadAccount
, rpuaPayload
) where
import Network.Google.IdentityToolkit.Types
import Network.Google.Prelude
type RelyingPartyUploadAccountResource =
"identitytoolkit" :>
"v3" :>
"relyingparty" :>
"uploadAccount" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
IdentitytoolkitRelyingPartyUploadAccountRequest
:> Post '[JSON] UploadAccountResponse
newtype RelyingPartyUploadAccount = RelyingPartyUploadAccount'
{ _rpuaPayload :: IdentitytoolkitRelyingPartyUploadAccountRequest
} deriving (Eq,Show,Data,Typeable,Generic)
relyingPartyUploadAccount
:: IdentitytoolkitRelyingPartyUploadAccountRequest
-> RelyingPartyUploadAccount
relyingPartyUploadAccount pRpuaPayload_ =
RelyingPartyUploadAccount'
{ _rpuaPayload = pRpuaPayload_
}
rpuaPayload :: Lens' RelyingPartyUploadAccount IdentitytoolkitRelyingPartyUploadAccountRequest
rpuaPayload
= lens _rpuaPayload (\ s a -> s{_rpuaPayload = a})
instance GoogleRequest RelyingPartyUploadAccount
where
type Rs RelyingPartyUploadAccount =
UploadAccountResponse
type Scopes RelyingPartyUploadAccount =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient RelyingPartyUploadAccount'{..}
= go (Just AltJSON) _rpuaPayload
identityToolkitService
where go
= buildClient
(Proxy :: Proxy RelyingPartyUploadAccountResource)
mempty