{-# 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.DialogFlow.Projects.GetAgent
(
ProjectsGetAgentResource
, projectsGetAgent
, ProjectsGetAgent
, pgaParent
, pgaXgafv
, pgaUploadProtocol
, pgaAccessToken
, pgaUploadType
, pgaCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsGetAgentResource =
"v2" :>
Capture "parent" Text :>
"agent" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GoogleCloudDialogflowV2Agent
data ProjectsGetAgent = ProjectsGetAgent'
{ _pgaParent :: !Text
, _pgaXgafv :: !(Maybe Xgafv)
, _pgaUploadProtocol :: !(Maybe Text)
, _pgaAccessToken :: !(Maybe Text)
, _pgaUploadType :: !(Maybe Text)
, _pgaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetAgent
:: Text
-> ProjectsGetAgent
projectsGetAgent pPgaParent_ =
ProjectsGetAgent'
{ _pgaParent = pPgaParent_
, _pgaXgafv = Nothing
, _pgaUploadProtocol = Nothing
, _pgaAccessToken = Nothing
, _pgaUploadType = Nothing
, _pgaCallback = Nothing
}
pgaParent :: Lens' ProjectsGetAgent Text
pgaParent
= lens _pgaParent (\ s a -> s{_pgaParent = a})
pgaXgafv :: Lens' ProjectsGetAgent (Maybe Xgafv)
pgaXgafv = lens _pgaXgafv (\ s a -> s{_pgaXgafv = a})
pgaUploadProtocol :: Lens' ProjectsGetAgent (Maybe Text)
pgaUploadProtocol
= lens _pgaUploadProtocol
(\ s a -> s{_pgaUploadProtocol = a})
pgaAccessToken :: Lens' ProjectsGetAgent (Maybe Text)
pgaAccessToken
= lens _pgaAccessToken
(\ s a -> s{_pgaAccessToken = a})
pgaUploadType :: Lens' ProjectsGetAgent (Maybe Text)
pgaUploadType
= lens _pgaUploadType
(\ s a -> s{_pgaUploadType = a})
pgaCallback :: Lens' ProjectsGetAgent (Maybe Text)
pgaCallback
= lens _pgaCallback (\ s a -> s{_pgaCallback = a})
instance GoogleRequest ProjectsGetAgent where
type Rs ProjectsGetAgent =
GoogleCloudDialogflowV2Agent
type Scopes ProjectsGetAgent =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsGetAgent'{..}
= go _pgaParent _pgaXgafv _pgaUploadProtocol
_pgaAccessToken
_pgaUploadType
_pgaCallback
(Just AltJSON)
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsGetAgentResource)
mempty