/*
* 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};
/// ApiChangelogEntry : One API changelog entry, as shown on https://docs.zernio.com/changelog.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiChangelogEntry {
/// Stable entry id; the same entry is never published twice.
#[serde(rename = "id")]
pub id: String,
/// When `impact` is set, `breaking_change` means exactly `impact: action_required`.
#[serde(rename = "type")]
pub r#type: Type,
/// What an integrator has to do, computed from the OpenAPI diff rather than from the prose. `action_required`: an existing call or parser can break (an operation, parameter or field removed, a field newly required, a type narrowed, an enum value removed, or authentication changed). `additive`: only new or looser things, existing integrations keep working. `none`: descriptions or examples only. Null on entries published before October 2026.
#[serde(rename = "impact", deserialize_with = "Option::deserialize")]
pub impact: Option<Impact>,
/// Platform and area slugs the entry is about: a platform (`instagram`, `facebook`, `threads`, `tiktok`, `x`, `linkedin`, `youtube`, `pinterest`, `reddit`, `bluesky`, `telegram`, `snapchat`, `whatsapp`, `discord`, `slack`, `google-business`, `imessage`), an ads platform (`meta-ads`, `google-ads`, `tiktok-ads`, `linkedin-ads`, `pinterest-ads`, `x-ads`) or an area (`ads`, `publishing`, `inbox`, `telephony`, `commerce`, `analytics`, `webhooks`, `general`). Filter with the `platform` query parameter.
#[serde(rename = "platforms")]
pub platforms: Vec<String>,
/// The change in a few words, for example `Delete inbox conversations`. Null on older entries.
#[serde(rename = "title", deserialize_with = "Option::deserialize")]
pub title: Option<String>,
/// One or two plain sentences on what changed and why it matters. Null when `title` is.
#[serde(rename = "summary", deserialize_with = "Option::deserialize")]
pub summary: Option<String>,
/// The details in Markdown: endpoints, fields and how to use them.
#[serde(rename = "message")]
pub message: String,
#[serde(rename = "publishedAt")]
pub published_at: String,
/// The `info.version` of the OpenAPI spec the entry describes, when known.
#[serde(rename = "specVersion", deserialize_with = "Option::deserialize")]
pub spec_version: Option<String>,
/// The entry on the docs changelog.
#[serde(rename = "url")]
pub url: String,
#[serde(rename = "changes")]
pub changes: Box<models::ApiChangelogEntryChanges>,
}
impl ApiChangelogEntry {
/// One API changelog entry, as shown on https://docs.zernio.com/changelog.
pub fn new(
id: String,
r#type: Type,
impact: Option<Impact>,
platforms: Vec<String>,
title: Option<String>,
summary: Option<String>,
message: String,
published_at: String,
spec_version: Option<String>,
url: String,
changes: models::ApiChangelogEntryChanges,
) -> ApiChangelogEntry {
ApiChangelogEntry {
id,
r#type,
impact,
platforms,
title,
summary,
message,
published_at,
spec_version,
url,
changes: Box::new(changes),
}
}
}
/// When `impact` is set, `breaking_change` means exactly `impact: action_required`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "new_feature")]
NewFeature,
#[serde(rename = "breaking_change")]
BreakingChange,
#[serde(rename = "improvement")]
Improvement,
#[serde(rename = "deprecation")]
Deprecation,
#[serde(rename = "minor")]
Minor,
}
impl Default for Type {
fn default() -> Type {
Self::NewFeature
}
}
/// What an integrator has to do, computed from the OpenAPI diff rather than from the prose. `action_required`: an existing call or parser can break (an operation, parameter or field removed, a field newly required, a type narrowed, an enum value removed, or authentication changed). `additive`: only new or looser things, existing integrations keep working. `none`: descriptions or examples only. Null on entries published before October 2026.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Impact {
#[serde(rename = "none")]
None,
#[serde(rename = "additive")]
Additive,
#[serde(rename = "action_required")]
ActionRequired,
}
impl Default for Impact {
fn default() -> Impact {
Self::None
}
}