late 0.0.1406

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.635.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 UpdateProfileRequest {
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Set to null to clear the description.
    #[serde(
        rename = "description",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<Option<String>>,
    #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
    pub color: Option<String>,
    /// IANA timezone new posts on this profile use when they name no `timezone`. Set to null to go back to UTC. An unknown name returns 400.
    #[serde(
        rename = "timezone",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub timezone: Option<Option<String>>,
    /// Your own identifier for this profile (1 to 255 characters, trimmed). Set to null to clear it. A value another profile of the same owner already holds returns 409 profile_external_id_conflict.
    #[serde(
        rename = "externalId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub external_id: Option<Option<String>>,
    #[serde(rename = "isDefault", skip_serializing_if = "Option::is_none")]
    pub is_default: Option<bool>,
    /// Turns zero content retention on (`none`) or off (`standard`) for this profile only, for new data within about a minute. Only the team owner can change it. `standard` answers 409 while the whole team has it on; `none` answers 409 during a WhatsApp verification of a number of this profile.
    #[serde(rename = "contentRetention", skip_serializing_if = "Option::is_none")]
    pub content_retention: Option<ContentRetention>,
    /// Caps outbound calls from this profile's numbers per rolling hour, inside the team limits. Null clears it.
    #[serde(
        rename = "maxOutboundCallsPerHour",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_outbound_calls_per_hour: Option<Option<i32>>,
    /// Caps billed call spend (USD) from this profile's numbers per rolling 24 hours, inside the team limits. Null clears it.
    #[serde(
        rename = "maxDailyCallSpendUsd",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_daily_call_spend_usd: Option<Option<f64>>,
    /// Caps minutes forwarded to a phone from this profile's numbers per rolling 24 hours, inside the team limits. Null clears it.
    #[serde(
        rename = "maxForwardedMinutesPerDay",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_forwarded_minutes_per_day: Option<Option<i32>>,
}

impl UpdateProfileRequest {
    pub fn new() -> UpdateProfileRequest {
        UpdateProfileRequest {
            name: None,
            description: None,
            color: None,
            timezone: None,
            external_id: None,
            is_default: None,
            content_retention: None,
            max_outbound_calls_per_hour: None,
            max_daily_call_spend_usd: None,
            max_forwarded_minutes_per_day: None,
        }
    }
}
/// Turns zero content retention on (`none`) or off (`standard`) for this profile only, for new data within about a minute. Only the team owner can change it. `standard` answers 409 while the whole team has it on; `none` answers 409 during a WhatsApp verification of a number of this profile.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContentRetention {
    #[serde(rename = "standard")]
    Standard,
    #[serde(rename = "none")]
    None,
}

impl Default for ContentRetention {
    fn default() -> ContentRetention {
        Self::Standard
    }
}