Skip to main content

onesignal_rust_api/models/
button.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 * Contact: devrel@onesignal.com
7 * Generated by: https://openapi-generator.tech
8 */
9
10
11
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct Button {
15    #[serde(rename = "id")]
16    pub id: String,
17    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
18    pub text: Option<String>,
19    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
20    pub icon: Option<String>,
21}
22
23impl Button {
24    pub fn new(id: String) -> Button {
25        Button {
26            id,
27            text: None,
28            icon: None,
29        }
30    }
31}
32
33