Skip to main content

onesignal_rust_api/models/
update_api_key_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.4.0
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 UpdateApiKeyRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    #[serde(rename = "ip_allowlist_mode", skip_serializing_if = "Option::is_none")]
19    pub ip_allowlist_mode: Option<IpAllowlistModeType>,
20    #[serde(rename = "ip_allowlist", skip_serializing_if = "Option::is_none")]
21    pub ip_allowlist: Option<Vec<String>>,
22}
23
24impl UpdateApiKeyRequest {
25    pub fn new() -> UpdateApiKeyRequest {
26        UpdateApiKeyRequest {
27            name: None,
28            ip_allowlist_mode: None,
29            ip_allowlist: None,
30        }
31    }
32}
33
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum IpAllowlistModeType {
37    #[serde(rename = "disabled")]
38    Disabled,
39    #[serde(rename = "explicit")]
40    Explicit,
41}
42
43impl Default for IpAllowlistModeType {
44    fn default() -> IpAllowlistModeType {
45        Self::Disabled
46    }
47}
48