mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
51 lines
2.0 KiB
Swift
51 lines
2.0 KiB
Swift
//
|
|
// SocialPostWrite.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SocialPostWrite: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Channel is the network to publish to: x, facebook, instagram, linkedin, tiktok, youtube or threads. Omitted means x. Example: \"x\" */
|
|
public var channel: String?
|
|
/** Content is the post's text. Required on every update, and bounded at 8192 characters. Example: \"Shipping today.\" */
|
|
public var content: 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. */
|
|
public var media: [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. */
|
|
public var scheduleAt: Int64?
|
|
/** Status is the post's lifecycle state: draft, scheduled, published or failed. Omitting it RESETS the post to draft. */
|
|
public var status: String?
|
|
|
|
public init(channel: String? = nil, content: String? = nil, media: [String]? = nil, scheduleAt: Int64? = nil, status: String? = nil) {
|
|
self.channel = channel
|
|
self.content = content
|
|
self.media = media
|
|
self.scheduleAt = scheduleAt
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case channel
|
|
case content
|
|
case media
|
|
case scheduleAt
|
|
case status
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(channel, forKey: .channel)
|
|
try container.encodeIfPresent(content, forKey: .content)
|
|
try container.encodeIfPresent(media, forKey: .media)
|
|
try container.encodeIfPresent(scheduleAt, forKey: .scheduleAt)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|