{-# 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.Chat.Spaces.Messages.Update
(
SpacesMessagesUpdateResource
, spacesMessagesUpdate
, SpacesMessagesUpdate
, smuXgafv
, smuUploadProtocol
, smuUpdateMask
, smuAccessToken
, smuUploadType
, smuPayload
, smuName
, smuCallback
) where
import Network.Google.Chat.Types
import Network.Google.Prelude
type SpacesMessagesUpdateResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Message :> Put '[JSON] Message
data SpacesMessagesUpdate = SpacesMessagesUpdate'
{ _smuXgafv :: !(Maybe Xgafv)
, _smuUploadProtocol :: !(Maybe Text)
, _smuUpdateMask :: !(Maybe GFieldMask)
, _smuAccessToken :: !(Maybe Text)
, _smuUploadType :: !(Maybe Text)
, _smuPayload :: !Message
, _smuName :: !Text
, _smuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spacesMessagesUpdate
:: Message
-> Text
-> SpacesMessagesUpdate
spacesMessagesUpdate pSmuPayload_ pSmuName_ =
SpacesMessagesUpdate'
{ _smuXgafv = Nothing
, _smuUploadProtocol = Nothing
, _smuUpdateMask = Nothing
, _smuAccessToken = Nothing
, _smuUploadType = Nothing
, _smuPayload = pSmuPayload_
, _smuName = pSmuName_
, _smuCallback = Nothing
}
smuXgafv :: Lens' SpacesMessagesUpdate (Maybe Xgafv)
smuXgafv = lens _smuXgafv (\ s a -> s{_smuXgafv = a})
smuUploadProtocol :: Lens' SpacesMessagesUpdate (Maybe Text)
smuUploadProtocol
= lens _smuUploadProtocol
(\ s a -> s{_smuUploadProtocol = a})
smuUpdateMask :: Lens' SpacesMessagesUpdate (Maybe GFieldMask)
smuUpdateMask
= lens _smuUpdateMask
(\ s a -> s{_smuUpdateMask = a})
smuAccessToken :: Lens' SpacesMessagesUpdate (Maybe Text)
smuAccessToken
= lens _smuAccessToken
(\ s a -> s{_smuAccessToken = a})
smuUploadType :: Lens' SpacesMessagesUpdate (Maybe Text)
smuUploadType
= lens _smuUploadType
(\ s a -> s{_smuUploadType = a})
smuPayload :: Lens' SpacesMessagesUpdate Message
smuPayload
= lens _smuPayload (\ s a -> s{_smuPayload = a})
smuName :: Lens' SpacesMessagesUpdate Text
smuName = lens _smuName (\ s a -> s{_smuName = a})
smuCallback :: Lens' SpacesMessagesUpdate (Maybe Text)
smuCallback
= lens _smuCallback (\ s a -> s{_smuCallback = a})
instance GoogleRequest SpacesMessagesUpdate where
type Rs SpacesMessagesUpdate = Message
type Scopes SpacesMessagesUpdate = '[]
requestClient SpacesMessagesUpdate'{..}
= go _smuName _smuXgafv _smuUploadProtocol
_smuUpdateMask
_smuAccessToken
_smuUploadType
_smuCallback
(Just AltJSON)
_smuPayload
chatService
where go
= buildClient
(Proxy :: Proxy SpacesMessagesUpdateResource)
mempty