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
/*
* 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 SocialPostWrite {
/// Channel is the network to publish to: x, facebook, instagram, linkedin, tiktok, youtube or threads. Omitted means x. Example: \"x\"
#[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
pub channel: Option<String>,
/// Content is the post's text. Required on every update, and bounded at 8192 characters. Example: \"Shipping today.\"
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
/// Media is the post's attached media as URLs, at most 10. Omitting it CLEARS any stored media: this is a replacement, not a merge.
#[serde(rename = "media", skip_serializing_if = "Option::is_none")]
pub media: Option<Vec<String>>,
/// ScheduleAt is when to publish, as a unix timestamp in SECONDS. 0 means unscheduled. Moving it into the past here does NOT publish the post — that is the scheduler's to notice, or the publish operation's.
#[serde(rename = "scheduleAt", skip_serializing_if = "Option::is_none")]
pub schedule_at: Option<i32>,
/// Status is the post's lifecycle state: draft, scheduled, published or failed. Omitting it RESETS the post to draft.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
impl SocialPostWrite {
pub fn new() -> SocialPostWrite {
SocialPostWrite {
channel: None,
content: None,
media: None,
schedule_at: None,
status: None,
}
}
}