{-# 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.Agent.Search
(
ProjectsAgentSearchResource
, projectsAgentSearch
, ProjectsAgentSearch
, pasParent
, pasXgafv
, pasUploadProtocol
, pasAccessToken
, pasUploadType
, pasPageToken
, pasPageSize
, pasCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentSearchResource =
"v2" :>
Capture "parent" Text :>
"agent:search" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON]
GoogleCloudDialogflowV2SearchAgentsResponse
data ProjectsAgentSearch = ProjectsAgentSearch'
{ _pasParent :: !Text
, _pasXgafv :: !(Maybe Xgafv)
, _pasUploadProtocol :: !(Maybe Text)
, _pasAccessToken :: !(Maybe Text)
, _pasUploadType :: !(Maybe Text)
, _pasPageToken :: !(Maybe Text)
, _pasPageSize :: !(Maybe (Textual Int32))
, _pasCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentSearch
:: Text
-> ProjectsAgentSearch
projectsAgentSearch pPasParent_ =
ProjectsAgentSearch'
{ _pasParent = pPasParent_
, _pasXgafv = Nothing
, _pasUploadProtocol = Nothing
, _pasAccessToken = Nothing
, _pasUploadType = Nothing
, _pasPageToken = Nothing
, _pasPageSize = Nothing
, _pasCallback = Nothing
}
pasParent :: Lens' ProjectsAgentSearch Text
pasParent
= lens _pasParent (\ s a -> s{_pasParent = a})
pasXgafv :: Lens' ProjectsAgentSearch (Maybe Xgafv)
pasXgafv = lens _pasXgafv (\ s a -> s{_pasXgafv = a})
pasUploadProtocol :: Lens' ProjectsAgentSearch (Maybe Text)
pasUploadProtocol
= lens _pasUploadProtocol
(\ s a -> s{_pasUploadProtocol = a})
pasAccessToken :: Lens' ProjectsAgentSearch (Maybe Text)
pasAccessToken
= lens _pasAccessToken
(\ s a -> s{_pasAccessToken = a})
pasUploadType :: Lens' ProjectsAgentSearch (Maybe Text)
pasUploadType
= lens _pasUploadType
(\ s a -> s{_pasUploadType = a})
pasPageToken :: Lens' ProjectsAgentSearch (Maybe Text)
pasPageToken
= lens _pasPageToken (\ s a -> s{_pasPageToken = a})
pasPageSize :: Lens' ProjectsAgentSearch (Maybe Int32)
pasPageSize
= lens _pasPageSize (\ s a -> s{_pasPageSize = a}) .
mapping _Coerce
pasCallback :: Lens' ProjectsAgentSearch (Maybe Text)
pasCallback
= lens _pasCallback (\ s a -> s{_pasCallback = a})
instance GoogleRequest ProjectsAgentSearch where
type Rs ProjectsAgentSearch =
GoogleCloudDialogflowV2SearchAgentsResponse
type Scopes ProjectsAgentSearch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentSearch'{..}
= go _pasParent _pasXgafv _pasUploadProtocol
_pasAccessToken
_pasUploadType
_pasPageToken
_pasPageSize
_pasCallback
(Just AltJSON)
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentSearchResource)
mempty