late 0.0.1093

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.163.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// RcsAgentProfile : The agent's public profile. At least one of phone, website or email is required.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RcsAgentProfile {
    #[serde(rename = "description")]
    pub description: String,
    /// 224x224, max 50 KB. Upload any image through POST /v1/rcs/assets to get a compliant URL.
    #[serde(rename = "logoUrl")]
    pub logo_url: String,
    /// Banner, 1440x448, max 200 KB. Upload through POST /v1/rcs/assets.
    #[serde(rename = "heroUrl")]
    pub hero_url: String,
    /// Hex colour, e.g. #1A73E8. Needs 4.5:1 contrast against white.
    #[serde(rename = "brandColor")]
    pub brand_color: String,
    #[serde(rename = "privacyPolicyUrl")]
    pub privacy_policy_url: String,
    #[serde(rename = "termsUrl")]
    pub terms_url: String,
    #[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
    pub phone: Option<Box<models::RcsAgentProfilePhone>>,
    #[serde(rename = "website", skip_serializing_if = "Option::is_none")]
    pub website: Option<Box<models::RcsAgentProfileWebsite>>,
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<Box<models::RcsAgentProfileEmail>>,
}

impl RcsAgentProfile {
    /// The agent's public profile. At least one of phone, website or email is required.
    pub fn new(
        description: String,
        logo_url: String,
        hero_url: String,
        brand_color: String,
        privacy_policy_url: String,
        terms_url: String,
    ) -> RcsAgentProfile {
        RcsAgentProfile {
            description,
            logo_url,
            hero_url,
            brand_color,
            privacy_policy_url,
            terms_url,
            phone: None,
            website: None,
            email: None,
        }
    }
}