{-# 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.Get
(
SpacesMessagesGetResource
, spacesMessagesGet
, SpacesMessagesGet
, smgXgafv
, smgUploadProtocol
, smgAccessToken
, smgUploadType
, smgName
, smgCallback
) where
import Network.Google.Chat.Types
import Network.Google.Prelude
type SpacesMessagesGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Message
data SpacesMessagesGet = SpacesMessagesGet'
{ _smgXgafv :: !(Maybe Xgafv)
, _smgUploadProtocol :: !(Maybe Text)
, _smgAccessToken :: !(Maybe Text)
, _smgUploadType :: !(Maybe Text)
, _smgName :: !Text
, _smgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spacesMessagesGet
:: Text
-> SpacesMessagesGet
spacesMessagesGet pSmgName_ =
SpacesMessagesGet'
{ _smgXgafv = Nothing
, _smgUploadProtocol = Nothing
, _smgAccessToken = Nothing
, _smgUploadType = Nothing
, _smgName = pSmgName_
, _smgCallback = Nothing
}
smgXgafv :: Lens' SpacesMessagesGet (Maybe Xgafv)
smgXgafv = lens _smgXgafv (\ s a -> s{_smgXgafv = a})
smgUploadProtocol :: Lens' SpacesMessagesGet (Maybe Text)
smgUploadProtocol
= lens _smgUploadProtocol
(\ s a -> s{_smgUploadProtocol = a})
smgAccessToken :: Lens' SpacesMessagesGet (Maybe Text)
smgAccessToken
= lens _smgAccessToken
(\ s a -> s{_smgAccessToken = a})
smgUploadType :: Lens' SpacesMessagesGet (Maybe Text)
smgUploadType
= lens _smgUploadType
(\ s a -> s{_smgUploadType = a})
smgName :: Lens' SpacesMessagesGet Text
smgName = lens _smgName (\ s a -> s{_smgName = a})
smgCallback :: Lens' SpacesMessagesGet (Maybe Text)
smgCallback
= lens _smgCallback (\ s a -> s{_smgCallback = a})
instance GoogleRequest SpacesMessagesGet where
type Rs SpacesMessagesGet = Message
type Scopes SpacesMessagesGet = '[]
requestClient SpacesMessagesGet'{..}
= go _smgName _smgXgafv _smgUploadProtocol
_smgAccessToken
_smgUploadType
_smgCallback
(Just AltJSON)
chatService
where go
= buildClient
(Proxy :: Proxy SpacesMessagesGetResource)
mempty