#[non_exhaustive]pub struct WebhookRequest {
pub session: String,
pub response_id: String,
pub query_result: Option<QueryResult>,
pub original_detect_intent_request: Option<OriginalDetectIntentRequest>,
/* private fields */
}agents and answer-records and contexts and conversation-datasets and conversation-models and conversation-profiles and conversations and documents and encryption-spec-service and entity-types and environments and fulfillments and generators and intents and knowledge-bases and participants and session-entity-types and sessions and versions only.Expand description
The request message for a webhook call.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session: StringThe unique identifier of detectIntent request session.
Can be used to identify end-user inside webhook implementation.
Format: projects/<Project ID>/agent/sessions/<Session ID>, or
projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>.
response_id: StringThe unique identifier of the response. Contains the same value as
[Streaming]DetectIntentResponse.response_id.
query_result: Option<QueryResult>The result of the conversational query or event processing. Contains the
same value as [Streaming]DetectIntentResponse.query_result.
original_detect_intent_request: Option<OriginalDetectIntentRequest>Optional. The contents of the original request that was passed to
[Streaming]DetectIntent call.
Implementations§
Source§impl WebhookRequest
impl WebhookRequest
pub fn new() -> Self
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_response_id<T: Into<String>>(self, v: T) -> Self
pub fn set_response_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_query_result<T>(self, v: T) -> Selfwhere
T: Into<QueryResult>,
pub fn set_query_result<T>(self, v: T) -> Selfwhere
T: Into<QueryResult>,
Sets the value of query_result.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = WebhookRequest::new().set_query_result(QueryResult::default()/* use setters */);Sourcepub fn set_or_clear_query_result<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryResult>,
pub fn set_or_clear_query_result<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryResult>,
Sets or clears the value of query_result.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = WebhookRequest::new().set_or_clear_query_result(Some(QueryResult::default()/* use setters */));
let x = WebhookRequest::new().set_or_clear_query_result(None::<QueryResult>);Sourcepub fn set_original_detect_intent_request<T>(self, v: T) -> Selfwhere
T: Into<OriginalDetectIntentRequest>,
pub fn set_original_detect_intent_request<T>(self, v: T) -> Selfwhere
T: Into<OriginalDetectIntentRequest>,
Sets the value of original_detect_intent_request.
§Example
use google_cloud_dialogflow_v2::model::OriginalDetectIntentRequest;
let x = WebhookRequest::new().set_original_detect_intent_request(OriginalDetectIntentRequest::default()/* use setters */);Sourcepub fn set_or_clear_original_detect_intent_request<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<OriginalDetectIntentRequest>,
pub fn set_or_clear_original_detect_intent_request<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<OriginalDetectIntentRequest>,
Sets or clears the value of original_detect_intent_request.
§Example
use google_cloud_dialogflow_v2::model::OriginalDetectIntentRequest;
let x = WebhookRequest::new().set_or_clear_original_detect_intent_request(Some(OriginalDetectIntentRequest::default()/* use setters */));
let x = WebhookRequest::new().set_or_clear_original_detect_intent_request(None::<OriginalDetectIntentRequest>);Trait Implementations§
Source§impl Clone for WebhookRequest
impl Clone for WebhookRequest
Source§fn clone(&self) -> WebhookRequest
fn clone(&self) -> WebhookRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more