/*
* 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.380.1
* 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 SupportRunDiagnosis {
/// What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`.
#[serde(rename = "category")]
pub category: Category,
/// The cause the answer gives, in one sentence. Null when the answer reports no problem, for example a how-to question.
#[serde(rename = "cause", deserialize_with = "Option::deserialize")]
pub cause: Option<String>,
/// The steps the answer recommends, in order. Empty when it recommends none.
#[serde(rename = "fixSteps")]
pub fix_steps: Vec<String>,
/// Links to docs.zernio.com that the answer itself cites. Empty when it cites none.
#[serde(rename = "docsLinks")]
pub docs_links: Vec<String>,
/// Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`.
#[serde(rename = "whoMustAct")]
pub who_must_act: WhoMustAct,
}
impl SupportRunDiagnosis {
pub fn new(
category: Category,
cause: Option<String>,
fix_steps: Vec<String>,
docs_links: Vec<String>,
who_must_act: WhoMustAct,
) -> SupportRunDiagnosis {
SupportRunDiagnosis {
category,
cause,
fix_steps,
docs_links,
who_must_act,
}
}
}
/// What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Category {
#[serde(rename = "account_connection")]
AccountConnection,
#[serde(rename = "content_rejected")]
ContentRejected,
#[serde(rename = "rate_limited")]
RateLimited,
#[serde(rename = "platform_issue")]
PlatformIssue,
#[serde(rename = "zernio_issue")]
ZernioIssue,
#[serde(rename = "billing")]
Billing,
#[serde(rename = "configuration")]
Configuration,
#[serde(rename = "how_to")]
HowTo,
#[serde(rename = "other")]
Other,
}
impl Default for Category {
fn default() -> Category {
Self::AccountConnection
}
}
/// Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum WhoMustAct {
#[serde(rename = "integrator")]
Integrator,
#[serde(rename = "end_user")]
EndUser,
#[serde(rename = "zernio")]
Zernio,
#[serde(rename = "platform")]
Platform,
#[serde(rename = "none")]
None,
}
impl Default for WhoMustAct {
fn default() -> WhoMustAct {
Self::Integrator
}
}