mailchimp/types/link.rs
1//!
2//! LinkType
3//!
4use serde::{Deserialize, Serialize};
5
6///
7/// LinkType
8///
9#[derive(Serialize, Deserialize, Debug, Clone)]
10pub struct LinkType {
11 /// Desc: As with an HTML ‘rel’ attribute, this describes the type of link.
12 #[serde(default)]
13 pub rel: String,
14 /// Desc: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
15 #[serde(default)]
16 pub href: String,
17 /// Desc: The HTTP method that should be used when accessing the URL defined in ‘href’.
18 #[serde(default)]
19 pub method: String,
20 /// Desc: For GETs, this is a URL representing the schema that the response should conform to.
21 #[serde(rename = "targetSchema")]
22 pub target_schema: Option<String>,
23 /// Desc: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
24 #[serde(default)]
25 pub schema: String,
26}
27
28impl Default for LinkType {
29 fn default() -> Self {
30 LinkType {
31 rel: "".to_string(),
32 href: "".to_string(),
33 method: "".to_string(),
34 target_schema: None,
35 schema: "".to_string(),
36 }
37 }
38}