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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// GetInboxPostComments200ResponsePost : (Reddit only) Metadata for the target post, returned alongside the comments in Reddit's single round-trip. Lets integrators render a preview of the post the user is commenting on without an additional request. Absent for non-Reddit platforms and when the upstream response is missing the post listing (deleted post, malformed response).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetInboxPostComments200ResponsePost {
/// Reddit post base36 id (e.g. \"1tjtj26\")
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Fullname with type prefix (e.g. \"t3_1tjtj26\")
#[serde(rename = "fullname", skip_serializing_if = "Option::is_none")]
pub fullname: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Body text for self-posts (empty for link posts)
#[serde(rename = "selftext", skip_serializing_if = "Option::is_none")]
pub selftext: Option<String>,
/// Reddit username, without the u/ prefix
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Subreddit name, without the r/ prefix
#[serde(rename = "subreddit", skip_serializing_if = "Option::is_none")]
pub subreddit: Option<String>,
/// Absolute URL to the post on reddit.com
#[serde(rename = "permalink", skip_serializing_if = "Option::is_none")]
pub permalink: Option<String>,
/// For link posts, the external URL; for self-posts, the Reddit permalink
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// Net upvotes (upvotes minus downvotes)
#[serde(rename = "score", skip_serializing_if = "Option::is_none")]
pub score: Option<i32>,
#[serde(rename = "numComments", skip_serializing_if = "Option::is_none")]
pub num_comments: Option<i32>,
/// Unix timestamp in seconds
#[serde(rename = "createdUtc", skip_serializing_if = "Option::is_none")]
pub created_utc: Option<i32>,
#[serde(rename = "over18", skip_serializing_if = "Option::is_none")]
pub over18: Option<bool>,
#[serde(rename = "stickied", skip_serializing_if = "Option::is_none")]
pub stickied: Option<bool>,
/// Link flair text if any
#[serde(
rename = "flairText",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub flair_text: Option<Option<String>>,
/// True if the post is a Reddit gallery (multiple images)
#[serde(rename = "isGallery", skip_serializing_if = "Option::is_none")]
pub is_gallery: Option<bool>,
}
impl GetInboxPostComments200ResponsePost {
/// (Reddit only) Metadata for the target post, returned alongside the comments in Reddit's single round-trip. Lets integrators render a preview of the post the user is commenting on without an additional request. Absent for non-Reddit platforms and when the upstream response is missing the post listing (deleted post, malformed response).
pub fn new() -> GetInboxPostComments200ResponsePost {
GetInboxPostComments200ResponsePost {
id: None,
fullname: None,
title: None,
selftext: None,
author: None,
subreddit: None,
permalink: None,
url: None,
score: None,
num_comments: None,
created_utc: None,
over18: None,
stickied: None,
flair_text: None,
is_gallery: None,
}
}
}