/*
* 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.199.0
* 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,
#[serde(rename = "type")]
pub r#type: Type,
/// 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 announcement, in Markdown.
#[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,
platforms: Vec<String>,
message: String,
published_at: String,
spec_version: Option<String>,
url: String,
changes: models::ApiChangelogEntryChanges,
) -> ApiChangelogEntry {
ApiChangelogEntry {
id,
r#type,
platforms,
message,
published_at,
spec_version,
url,
changes: Box::new(changes),
}
}
}
///
#[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
}
}