Struct apiai::structure::ApiRequest
[−]
[src]
pub struct ApiRequest { pub query: Option<String>, pub event: Option<ApiEvent>, pub session_id: String, pub lang: Language, pub contexts: Vec<ApiContext>, }
ApiRequest is a structure that encapsulates an api.ai request object
Fields
query: Option<String>
queryis a simple string that holds the query payload for api.ai requests.
The api.ai documentation defines a query as the natural language to be processed that may be up to 256 characters in length.
event: Option<ApiEvent>
session_id: String
lang: Language
contexts: Vec<ApiContext>
Trait Implementations
impl Default for ApiRequest
[src]
Default for ApiRequest automatically generates a sessionId if one is not provided.
fn default() -> ApiRequest
Returns the "default value" for a type. Read more