Skip to main content

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