/*
* 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.168.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 RcsAgent {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "profileId", skip_serializing_if = "Option::is_none")]
pub profile_id: Option<String>,
/// The rcs inbox account, created once the agent exists with the carriers.
#[serde(
rename = "accountId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub account_id: Option<Option<String>>,
/// Launch market (ISO 3166-1 alpha-2). US agents run through the carriers automatically; other markets are filed by our team and skip the testing and launch_review steps (send the launch request while the agent is still in review).
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "useCase", skip_serializing_if = "Option::is_none")]
pub use_case: Option<UseCase>,
#[serde(rename = "profile", skip_serializing_if = "Option::is_none")]
pub profile: Option<Box<models::RcsAgentProfile>>,
#[serde(
rename = "brand",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub brand: Option<Option<Box<models::RcsBrand>>>,
#[serde(
rename = "launchRequest",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub launch_request: Option<Option<Box<models::RcsLaunchRequest>>>,
#[serde(rename = "carrierApprovals", skip_serializing_if = "Option::is_none")]
pub carrier_approvals: Option<Vec<models::RcsCarrierApproval>>,
#[serde(rename = "testDevices", skip_serializing_if = "Option::is_none")]
pub test_devices: Option<Vec<models::RcsTestDevice>>,
#[serde(
rename = "smsFallbackFrom",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub sms_fallback_from: Option<Option<String>>,
/// Our note while status is changes_requested.
#[serde(
rename = "reviewNote",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub review_note: Option<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 = "requestedAt",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub requested_at: Option<Option<String>>,
#[serde(
rename = "submittedAt",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub submitted_at: Option<Option<String>>,
#[serde(
rename = "liveAt",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub live_at: Option<Option<String>>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
impl RcsAgent {
pub fn new() -> RcsAgent {
RcsAgent {
id: None,
profile_id: None,
account_id: None,
country: None,
status: None,
display_name: None,
use_case: None,
profile: None,
brand: None,
launch_request: None,
carrier_approvals: None,
test_devices: None,
sms_fallback_from: None,
review_note: None,
decline_reason: None,
requested_at: None,
submitted_at: None,
live_at: None,
created_at: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "requested")]
Requested,
#[serde(rename = "changes_requested")]
ChangesRequested,
#[serde(rename = "brand_vetting")]
BrandVetting,
#[serde(rename = "agent_review")]
AgentReview,
#[serde(rename = "testing")]
Testing,
#[serde(rename = "launch_review")]
LaunchReview,
#[serde(rename = "launching")]
Launching,
#[serde(rename = "live")]
Live,
#[serde(rename = "rejected")]
Rejected,
#[serde(rename = "deactivated")]
Deactivated,
}
impl Default for Status {
fn default() -> Status {
Self::Requested
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum UseCase {
#[serde(rename = "MULTI_USE")]
MultiUse,
#[serde(rename = "PROMOTIONAL")]
Promotional,
#[serde(rename = "TRANSACTIONAL")]
Transactional,
#[serde(rename = "OTP")]
Otp,
}
impl Default for UseCase {
fn default() -> UseCase {
Self::MultiUse
}
}