/*
* 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 GetSmsRegistration200Response {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "registrationType", skip_serializing_if = "Option::is_none")]
pub registration_type: Option<RegistrationType>,
/// requested/changes_requested = pre-submission review states; customers see them as pending / needs changes.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
#[serde(rename = "brandStatus", skip_serializing_if = "Option::is_none")]
pub brand_status: Option<String>,
#[serde(rename = "campaignStatus", skip_serializing_if = "Option::is_none")]
pub campaign_status: Option<String>,
#[serde(
rename = "declineReason",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub decline_reason: Option<Option<String>>,
#[serde(rename = "phoneNumbers", skip_serializing_if = "Option::is_none")]
pub phone_numbers: Option<Vec<String>>,
#[serde(rename = "awaitingOtp", skip_serializing_if = "Option::is_none")]
pub awaiting_otp: Option<bool>,
/// The open change request as text (status changes_requested).
#[serde(
rename = "adminReviewNote",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub admin_review_note: Option<Option<String>>,
#[serde(
rename = "reviewRequest",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub review_request: Option<Option<Box<models::SmsRegistrationReviewRequest>>>,
#[serde(rename = "campaignContent", skip_serializing_if = "Option::is_none")]
pub campaign_content: Option<Box<models::GetSmsRegistration200ResponseCampaignContent>>,
}
impl GetSmsRegistration200Response {
pub fn new() -> GetSmsRegistration200Response {
GetSmsRegistration200Response {
id: None,
registration_type: None,
status: None,
brand_status: None,
campaign_status: None,
decline_reason: None,
phone_numbers: None,
awaiting_otp: None,
admin_review_note: None,
review_request: None,
campaign_content: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RegistrationType {
#[serde(rename = "standard_10dlc")]
Standard10dlc,
#[serde(rename = "sole_prop_10dlc")]
SoleProp10dlc,
#[serde(rename = "toll_free")]
TollFree,
}
impl Default for RegistrationType {
fn default() -> RegistrationType {
Self::Standard10dlc
}
}
/// requested/changes_requested = pre-submission review states; customers see them as pending / needs changes.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "pending")]
Pending,
#[serde(rename = "approved")]
Approved,
#[serde(rename = "rejected")]
Rejected,
#[serde(rename = "requested")]
Requested,
#[serde(rename = "changes_requested")]
ChangesRequested,
#[serde(rename = "deactivated")]
Deactivated,
}
impl Default for Status {
fn default() -> Status {
Self::Pending
}
}