late 0.0.1082

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.
Documentation
/*
 * 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.146.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 BrandedCallingIdentity {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "enterpriseId", skip_serializing_if = "Option::is_none")]
    pub enterprise_id: Option<String>,
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    #[serde(rename = "callReasons", skip_serializing_if = "Option::is_none")]
    pub call_reasons: Option<Vec<String>>,
    /// Every call reason matches the carrier catalogue (GET /v1/branded-calling/call-reasons); anything else is vetted by hand and takes longer.
    #[serde(
        rename = "callReasonsPreApproved",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_reasons_pre_approved: Option<bool>,
    /// The image you sent. Zernio hosts the 256x256 BMP the carriers require.
    #[serde(
        rename = "logoUrl",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub logo_url: Option<Option<String>>,
    #[serde(rename = "authorizer", skip_serializing_if = "Option::is_none")]
    pub authorizer: Option<Box<models::BrandedCallingIdentityAuthorizer>>,
    #[serde(rename = "references", skip_serializing_if = "Option::is_none")]
    pub references: Option<Box<models::BrandedCallingReferences>>,
    /// requested = in Zernio review; changes_requested = answer the review (PATCH); pending_email_verification = confirm the code emailed to the authorizer; in_review = with the carrier vetting team; verified = attach numbers; rejected = fix and PATCH to resubmit; suspended = an infringement claim is open; expired = the yearly verification lapsed; permanently_rejected = terminal.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "rejectionReasons", skip_serializing_if = "Option::is_none")]
    pub rejection_reasons: Option<Vec<models::BrandedCallingIdentityRejectionReasonsInner>>,
    /// The open change request, as text.
    #[serde(
        rename = "reviewNote",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub review_note: Option<Option<String>>,
    #[serde(rename = "reviewRequest", skip_serializing_if = "Option::is_none")]
    pub review_request: Option<Box<models::BrandedCallingIdentityReviewRequest>>,
    #[serde(
        rename = "emailVerifiedAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub email_verified_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 = "verifiedAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub verified_at: Option<Option<String>>,
    /// Verification lasts one year; Zernio resubmits 30 days before this date.
    #[serde(
        rename = "expiringAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub expiring_at: Option<Option<String>>,
    #[serde(rename = "numbers", skip_serializing_if = "Option::is_none")]
    pub numbers: Option<Vec<models::BrandedCallingIdentityNumber>>,
    #[serde(
        rename = "createdAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub created_at: Option<Option<String>>,
    #[serde(
        rename = "updatedAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub updated_at: Option<Option<String>>,
}

impl BrandedCallingIdentity {
    pub fn new() -> BrandedCallingIdentity {
        BrandedCallingIdentity {
            id: None,
            enterprise_id: None,
            display_name: None,
            call_reasons: None,
            call_reasons_pre_approved: None,
            logo_url: None,
            authorizer: None,
            references: None,
            status: None,
            rejection_reasons: None,
            review_note: None,
            review_request: None,
            email_verified_at: None,
            submitted_at: None,
            verified_at: None,
            expiring_at: None,
            numbers: None,
            created_at: None,
            updated_at: None,
        }
    }
}
/// requested = in Zernio review; changes_requested = answer the review (PATCH); pending_email_verification = confirm the code emailed to the authorizer; in_review = with the carrier vetting team; verified = attach numbers; rejected = fix and PATCH to resubmit; suspended = an infringement claim is open; expired = the yearly verification lapsed; permanently_rejected = terminal.
#[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 = "rejected")]
    Rejected,
    #[serde(rename = "pending_email_verification")]
    PendingEmailVerification,
    #[serde(rename = "in_review")]
    InReview,
    #[serde(rename = "verified")]
    Verified,
    #[serde(rename = "suspended")]
    Suspended,
    #[serde(rename = "expired")]
    Expired,
    #[serde(rename = "permanently_rejected")]
    PermanentlyRejected,
}

impl Default for Status {
    fn default() -> Status {
        Self::Requested
    }
}