hanzo_client/models/social_post_write.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SocialPostWrite {
16 /// Channel is the network to publish to: x, facebook, instagram, linkedin, tiktok, youtube or threads. Omitted means x. Example: \"x\"
17 #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
18 pub channel: Option<String>,
19 /// Content is the post's text. Required on every update, and bounded at 8192 characters. Example: \"Shipping today.\"
20 #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
21 pub content: Option<String>,
22 /// 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.
23 #[serde(rename = "media", skip_serializing_if = "Option::is_none")]
24 pub media: Option<Vec<String>>,
25 /// 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.
26 #[serde(rename = "scheduleAt", skip_serializing_if = "Option::is_none")]
27 pub schedule_at: Option<i32>,
28 /// Status is the post's lifecycle state: draft, scheduled, published or failed. Omitting it RESETS the post to draft.
29 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30 pub status: Option<String>,
31}
32
33impl SocialPostWrite {
34 pub fn new() -> SocialPostWrite {
35 SocialPostWrite {
36 channel: None,
37 content: None,
38 media: None,
39 schedule_at: None,
40 status: None,
41 }
42 }
43}
44