/*
* 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.456.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 GetAdAccountHealth200ResponseChecksInner {
#[serde(rename = "id")]
pub id: Id,
#[serde(rename = "status")]
pub status: Status,
#[serde(rename = "title")]
pub title: String,
#[serde(rename = "message")]
pub message: String,
/// When the check is not `ok`: the error code a create refused for this reason returns.
#[serde(rename = "code", skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename = "hint", skip_serializing_if = "Option::is_none")]
pub hint: Option<String>,
#[serde(rename = "fix", skip_serializing_if = "Option::is_none")]
pub fix: Option<Box<models::GetAdAccountHealth200ResponseBlockersInnerFix>>,
}
impl GetAdAccountHealth200ResponseChecksInner {
pub fn new(
id: Id,
status: Status,
title: String,
message: String,
) -> GetAdAccountHealth200ResponseChecksInner {
GetAdAccountHealth200ResponseChecksInner {
id,
status,
title,
message,
code: None,
hint: None,
fix: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Id {
#[serde(rename = "account_status")]
AccountStatus,
#[serde(rename = "payment")]
Payment,
#[serde(rename = "spend_cap")]
SpendCap,
#[serde(rename = "page")]
Page,
#[serde(rename = "instagram")]
Instagram,
#[serde(rename = "lead_terms")]
LeadTerms,
#[serde(rename = "pixel")]
Pixel,
#[serde(rename = "whatsapp")]
Whatsapp,
#[serde(rename = "last_refusal")]
LastRefusal,
}
impl Default for Id {
fn default() -> Id {
Self::AccountStatus
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "ok")]
Ok,
#[serde(rename = "warning")]
Warning,
#[serde(rename = "error")]
Error,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "unknown")]
Unknown,
}
impl Default for Status {
fn default() -> Status {
Self::Ok
}
}