onesignal-rust-api 5.15.0

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
Documentation
/*
 * OneSignal
 *
 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
 *
 * Contact: devrel@onesignal.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UpdateSegmentRequest {
    /// Required. The segment name. Maximum 128 characters.
    #[serde(rename = "name")]
    pub name: String,
    /// Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// 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.
    #[serde(rename = "filters", skip_serializing_if = "Option::is_none")]
    pub filters: Option<Vec<crate::models::FilterExpression>>,
}

impl UpdateSegmentRequest {
    pub fn new(name: String) -> UpdateSegmentRequest {
        UpdateSegmentRequest {
            name,
            description: None,
            filters: None,
        }
    }
}