/*
* 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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.104.0
* 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 SendSmsRequest {
/// One of your SMS-enabled numbers (E.164; formatting is normalized).
#[serde(rename = "from")]
pub from: String,
/// Recipient number (E.164).
#[serde(rename = "to")]
pub to: String,
/// Message body. Required unless `mediaUrls` is set. Max 10 SMS segments (1530 GSM-7 or 670 unicode characters).
#[serde(rename = "text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
/// Public media URLs to attach (sends as MMS). Max 10.
#[serde(rename = "mediaUrls", skip_serializing_if = "Option::is_none")]
pub media_urls: Option<Vec<String>>,
/// Optional. Schedule the send for a future time (ISO 8601 with offset, e.g. `2026-08-01T12:00:00Z`). Must be in the future. The message is queued and the `message.delivered` webhook fires when it actually sends.
#[serde(rename = "sendAt", skip_serializing_if = "Option::is_none")]
pub send_at: Option<String>,
}
impl SendSmsRequest {
pub fn new(from: String, to: String) -> SendSmsRequest {
SendSmsRequest {
from,
to,
text: None,
media_urls: None,
send_at: None,
}
}
}