{-# 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.Mirror.Accounts.Insert
(
AccountsInsertResource
, accountsInsert
, AccountsInsert
, aiAccountName
, aiPayload
, aiUserToken
, aiAccountType
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type AccountsInsertResource =
"mirror" :>
"v1" :>
"accounts" :>
Capture "userToken" Text :>
Capture "accountType" Text :>
Capture "accountName" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Post '[JSON] Account
data AccountsInsert = AccountsInsert'
{ _aiAccountName :: !Text
, _aiPayload :: !Account
, _aiUserToken :: !Text
, _aiAccountType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsInsert
:: Text
-> Account
-> Text
-> Text
-> AccountsInsert
accountsInsert pAiAccountName_ pAiPayload_ pAiUserToken_ pAiAccountType_ =
AccountsInsert'
{ _aiAccountName = pAiAccountName_
, _aiPayload = pAiPayload_
, _aiUserToken = pAiUserToken_
, _aiAccountType = pAiAccountType_
}
aiAccountName :: Lens' AccountsInsert Text
aiAccountName
= lens _aiAccountName
(\ s a -> s{_aiAccountName = a})
aiPayload :: Lens' AccountsInsert Account
aiPayload
= lens _aiPayload (\ s a -> s{_aiPayload = a})
aiUserToken :: Lens' AccountsInsert Text
aiUserToken
= lens _aiUserToken (\ s a -> s{_aiUserToken = a})
aiAccountType :: Lens' AccountsInsert Text
aiAccountType
= lens _aiAccountType
(\ s a -> s{_aiAccountType = a})
instance GoogleRequest AccountsInsert where
type Rs AccountsInsert = Account
type Scopes AccountsInsert = '[]
requestClient AccountsInsert'{..}
= go _aiUserToken _aiAccountType _aiAccountName
(Just AltJSON)
_aiPayload
mirrorService
where go
= buildClient (Proxy :: Proxy AccountsInsertResource)
mempty