Skip to main content

spatio_sdk/models/
slide.rs

1/*
2 * SpatioAPI
3 *
4 * The REST API that owns every resource in your Spatio workspace: notes, sheets, slides, tasks, calendar events, mail, chat, files, and contacts. SpatioMCP wraps this API; Spatio Desktop reads from it. You can call it directly from your own code.  All requests must be authenticated with a Personal Access Token (`Authorization: Bearer pat_...`) or an OAuth 2.1 access token, and use HTTPS.  Official SDKs (MIT, generated from this spec on every release):  - TypeScript: https://github.com/spatio-labs/spatio-ts (`npm install @spatio-labs/spatio-ts`) - Python: https://github.com/spatio-labs/spatio-py (`pip install spatio-sdk`) - Go: https://github.com/spatio-labs/spatio-go (`go get github.com/spatio-labs/spatio-go`)  This specification is generated from the platform-service Go source on every push to `main`. The spec, not hand-written documentation, is the source of truth: server stubs and SDKs are generated from it, and any drift between the spec and the running service fails CI. 
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: hello@spatio.app
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 Slide {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
19    pub provider: Option<String>,
20    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
21    pub account_id: Option<String>,
22    #[serde(rename = "presentationId")]
23    pub presentation_id: String,
24    #[serde(rename = "title")]
25    pub title: String,
26    /// Speaker notes.
27    #[serde(rename = "notes", skip_serializing_if = "Option::is_none")]
28    pub notes: Option<String>,
29    /// Free-form layout id. Provider-specific (`title`, `two-column`, `image-left`, custom). Not enumerated to avoid forcing a breaking change every time a provider adds one. 
30    #[serde(rename = "layout", skip_serializing_if = "Option::is_none")]
31    pub layout: Option<String>,
32    #[serde(rename = "backgroundColor", skip_serializing_if = "Option::is_none")]
33    pub background_color: Option<String>,
34    #[serde(rename = "backgroundImageUrl", skip_serializing_if = "Option::is_none")]
35    pub background_image_url: Option<String>,
36    #[serde(rename = "textColor", skip_serializing_if = "Option::is_none")]
37    pub text_color: Option<String>,
38    /// Free-form transition id.
39    #[serde(rename = "transition", skip_serializing_if = "Option::is_none")]
40    pub transition: Option<String>,
41    /// Zero-based position within the presentation.
42    #[serde(rename = "position")]
43    pub position: i32,
44    #[serde(rename = "createdAt")]
45    pub created_at: chrono::DateTime<chrono::FixedOffset>,
46    #[serde(rename = "updatedAt")]
47    pub updated_at: chrono::DateTime<chrono::FixedOffset>,
48}
49
50impl Slide {
51    pub fn new(id: String, presentation_id: String, title: String, position: i32, created_at: chrono::DateTime<chrono::FixedOffset>, updated_at: chrono::DateTime<chrono::FixedOffset>) -> Slide {
52        Slide {
53            id,
54            provider: None,
55            account_id: None,
56            presentation_id,
57            title,
58            notes: None,
59            layout: None,
60            background_color: None,
61            background_image_url: None,
62            text_color: None,
63            transition: None,
64            position,
65            created_at,
66            updated_at,
67        }
68    }
69}
70