autogen_squareup/models/search_events_request.rs
1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SearchEventsRequest : Searches [Event](entity:Event)s for your application.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SearchEventsRequest {
17 /// A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of events for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
18 #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")]
19 pub cursor: Option<String>,
20 /// The maximum number of events to return in a single page. The response might contain fewer events. The default value is 100, which is also the maximum allowed value. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). Default: 100
21 #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
22 pub limit: Option<i32>,
23 #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
24 pub query: Option<Box<models::SearchEventsQuery>>,
25}
26
27impl SearchEventsRequest {
28 /// Searches [Event](entity:Event)s for your application.
29 pub fn new() -> SearchEventsRequest {
30 SearchEventsRequest {
31 cursor: None,
32 limit: None,
33 query: None,
34 }
35 }
36}
37