Skip to main content

hanzo_client/models/
crawl_document.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 CrawlDocument {
16    /// Markdown is the page's content, extracted and rendered to markdown. This is the field to read.
17    #[serde(rename = "markdown", skip_serializing_if = "Option::is_none")]
18    pub markdown: Option<String>,
19    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub metadata: Option<Option<serde_json::Value>>,
21    /// Title is the document's title, when it carried one.
22    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
23    pub title: Option<String>,
24    /// URL is the address actually read, after redirects.
25    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
26    pub url: Option<String>,
27}
28
29impl CrawlDocument {
30    pub fn new() -> CrawlDocument {
31        CrawlDocument {
32            markdown: None,
33            metadata: None,
34            title: None,
35            url: None,
36        }
37    }
38}
39