/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
*
* The version of the OpenAPI document: 1.61.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RegisterImessageSenderRequest {
/// Profile to attach the sender to
#[serde(rename = "profileId")]
pub profile_id: String,
/// The provider-provisioned sender handle: a phone number in international format (e.g. +18305551234) or an email address
#[serde(rename = "sender")]
pub sender: String,
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
/// Delivery provider. Defaults to the platform default.
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
pub provider: Option<Provider>,
}
impl RegisterImessageSenderRequest {
pub fn new(profile_id: String, sender: String) -> RegisterImessageSenderRequest {
RegisterImessageSenderRequest {
profile_id,
sender,
display_name: None,
provider: None,
}
}
}
/// Delivery provider. Defaults to the platform default.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Provider {
#[serde(rename = "loopmessage")]
Loopmessage,
}
impl Default for Provider {
fn default() -> Provider {
Self::Loopmessage
}
}