onesignal_rust_api/models/update_segment_request.rs
1/*
2 * OneSignal
3 *
4 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5 *
6 * The version of the OpenAPI document: 5.11.1
7 * Contact: devrel@onesignal.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct UpdateSegmentRequest {
16 /// Required. The segment name. Maximum 128 characters.
17 #[serde(rename = "name")]
18 pub name: String,
19 /// Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged.
20 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21 pub description: Option<String>,
22 /// Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators.
23 #[serde(rename = "filters", skip_serializing_if = "Option::is_none")]
24 pub filters: Option<Vec<crate::models::FilterExpression>>,
25}
26
27impl UpdateSegmentRequest {
28 pub fn new(name: String) -> UpdateSegmentRequest {
29 UpdateSegmentRequest {
30 name,
31 description: None,
32 filters: None,
33 }
34 }
35}
36
37