postman_api/
model.rs

1use serde::{Serialize, Deserialize};
2#[derive(Debug, Serialize, Deserialize, Default)]
3pub struct ScimUserResource {
4    ///A list of schema resource URIs.
5    pub schemas: Option<Vec<String>>,
6    ///The team member's SCIM ID.
7    pub id: Option<String>,
8    #[serde(rename = "userName")]
9    ///The team member's SCIM username.
10    pub user_name: Option<String>,
11    ///Information about the Postman team member.
12    pub name: Option<serde_json::Value>,
13    #[serde(rename = "externalId")]
14    ///The team member's external ID.
15    pub external_id: Option<String>,
16    ///If true, the team member is active.
17    pub active: Option<bool>,
18    pub meta: Option<serde_json::Value>,
19}
20impl std::fmt::Display for ScimUserResource {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
22        write!(f, "{}", serde_json::to_string(self).unwrap())
23    }
24}
25#[derive(Debug, Serialize, Deserialize, Default)]
26pub struct ImportExportFile {
27    #[serde(rename = "type")]
28    ///The `file` type value.
29    pub type_: String,
30    ///A file containing a valid user's export .zip file.
31    pub input: String,
32}
33impl std::fmt::Display for ImportExportFile {
34    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
35        write!(f, "{}", serde_json::to_string(self).unwrap())
36    }
37}
38#[derive(Debug, Serialize, Deserialize, Default)]
39pub struct JsonSchema {
40    #[serde(rename = "type")]
41    ///The OpenAPI definition type.
42    pub type_: Option<String>,
43    ///An object that contains a valid JSON OpenAPI definition. For more information, read the [OpenAPI documentation](https://swagger.io/docs/specification/basic-structure/).
44    pub input: Option<serde_json::Value>,
45}
46impl std::fmt::Display for JsonSchema {
47    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
48        write!(f, "{}", serde_json::to_string(self).unwrap())
49    }
50}
51#[derive(Debug, Serialize, Deserialize, Default)]
52pub struct JsonStringified {
53    #[serde(rename = "type")]
54    ///The OpenAPI definition type.
55    pub type_: Option<String>,
56    ///The stringified OpenAPI definition.
57    pub input: Option<String>,
58}
59impl std::fmt::Display for JsonStringified {
60    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
61        write!(f, "{}", serde_json::to_string(self).unwrap())
62    }
63}