/*
* 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 OnSmsRegistrationActionRequiredRequest {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "event", skip_serializing_if = "Option::is_none")]
pub event: Option<Event>,
/// UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
pub timestamp: Option<String>,
#[serde(rename = "registration", skip_serializing_if = "Option::is_none")]
pub registration: Option<Box<models::OnSmsRegistrationActionRequiredRequestRegistration>>,
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<Reason>,
/// What to do, in words: our request or the carrier's note. Absent for otp_required.
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
impl OnSmsRegistrationActionRequiredRequest {
pub fn new() -> OnSmsRegistrationActionRequiredRequest {
OnSmsRegistrationActionRequiredRequest {
id: None,
event: None,
timestamp: None,
registration: None,
reason: None,
message: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
#[serde(rename = "sms.registration.action_required")]
SmsRegistrationActionRequired,
}
impl Default for Event {
fn default() -> Event {
Self::SmsRegistrationActionRequired
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Reason {
#[serde(rename = "changes_requested")]
ChangesRequested,
#[serde(rename = "otp_required")]
OtpRequired,
#[serde(rename = "carrier_info_required")]
CarrierInfoRequired,
}
impl Default for Reason {
fn default() -> Reason {
Self::ChangesRequested
}
}