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 * The version of the OpenAPI document: 1.4.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 Button {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
19    pub text: Option<String>,
20    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
21    pub icon: Option<String>,
22}
23
24impl Button {
25    pub fn new(id: String) -> Button {
26        Button {
27            id,
28            text: None,
29            icon: None,
30        }
31    }
32}
33
34