1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CalendarPost {
/// Body is the post text. Required.
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
/// Channel is the target network: x, facebook, instagram, linkedin, tiktok, youtube or threads. Required — a post must name where it goes.
#[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
pub channel: Option<String>,
/// CreatedAt is unix seconds when the post was added, server-assigned and never rewritten.
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<i32>,
/// Error is the exact reason the last publish attempt failed — the honest record behind a \"failed\" status, never a faked success.
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
/// ID is the server-assigned post id (\"cal_\" + 128 random bits).
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// PublishedAt is when the publish succeeded; 0 until it does.
#[serde(rename = "publishedAt", skip_serializing_if = "Option::is_none")]
pub published_at: Option<i32>,
/// ScheduledAt is the unix publish time; 0 leaves the post a draft, and any value makes it \"scheduled\" for the durable sweep to pick up.
#[serde(rename = "scheduledAt", skip_serializing_if = "Option::is_none")]
pub scheduled_at: Option<i32>,
/// Status is draft, scheduled, published, failed or canceled. Server-owned.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Title is the post's internal label, capped at 1024 bytes.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// UpdatedAt is unix seconds of the last write, server-assigned. The durable sweep writes too — claiming a due post, publishing it and recording a failure each bump it — so this moves without anyone editing the post.
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<i32>,
}
impl CalendarPost {
pub fn new() -> CalendarPost {
CalendarPost {
body: None,
channel: None,
created_at: None,
error: None,
id: None,
published_at: None,
scheduled_at: None,
status: None,
title: None,
updated_at: None,
}
}
}