late 0.0.1085

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.147.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 CreateBrandedCallingIdentityRequest {
    /// A business from POST /v1/branded-calling/enterprises.
    #[serde(rename = "enterpriseId")]
    pub enterprise_id: String,
    /// Shown on the callee's screen. No emoji.
    #[serde(rename = "displayName")]
    pub display_name: String,
    /// 1 to 10 reasons you call, each up to 64 characters. Pick from GET /v1/branded-calling/call-reasons to skip manual vetting.
    #[serde(rename = "callReasons")]
    pub call_reasons: Vec<String>,
    /// HTTPS URL of a PNG, JPEG, WebP or SVG logo. Zernio converts it to the 256x256 BMP the carriers require and hosts it.
    #[serde(rename = "logoUrl", skip_serializing_if = "Option::is_none")]
    pub logo_url: Option<String>,
    #[serde(rename = "authorizer")]
    pub authorizer: Box<models::CreateBrandedCallingIdentityRequestAuthorizer>,
    #[serde(rename = "references")]
    pub references: Box<models::BrandedCallingReferences>,
}

impl CreateBrandedCallingIdentityRequest {
    pub fn new(
        enterprise_id: String,
        display_name: String,
        call_reasons: Vec<String>,
        authorizer: models::CreateBrandedCallingIdentityRequestAuthorizer,
        references: models::BrandedCallingReferences,
    ) -> CreateBrandedCallingIdentityRequest {
        CreateBrandedCallingIdentityRequest {
            enterprise_id,
            display_name,
            call_reasons,
            logo_url: None,
            authorizer: Box::new(authorizer),
            references: Box::new(references),
        }
    }
}