Skip to main content

windmill_api/models/
get_hub_integration_meta_200_response.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.824.1
7 * Contact: contact@windmill.dev
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 GetHubIntegrationMeta200Response {
16    #[serde(rename = "app")]
17    pub app: String,
18    #[serde(rename = "display_name")]
19    pub display_name: String,
20    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub description: Option<Option<String>>,
22    #[serde(rename = "docs_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub docs_url: Option<Option<String>>,
24    /// whether the script set was pruned to idiomatic actions rather than generated one per endpoint; null when nobody has assessed it, which is distinct from a stated false
25    #[serde(rename = "curated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub curated: Option<Option<bool>>,
27    /// whether the provider knowledge was authored (curated) or inferred from the shipped scripts (derived)
28    #[serde(rename = "metadata_source", skip_serializing_if = "Option::is_none")]
29    pub metadata_source: Option<MetadataSource>,
30    /// the integration's authored meta.json verbatim; the content repo owns its schema, so it is passed through unvalidated
31    #[serde(rename = "meta", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub meta: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
33    #[serde(rename = "meta_updated_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub meta_updated_at: Option<Option<String>>,
35    #[serde(rename = "derived", skip_serializing_if = "Option::is_none")]
36    pub derived: Option<Box<models::GetHubIntegrationMeta200ResponseDerived>>,
37    #[serde(rename = "resource_types", skip_serializing_if = "Option::is_none")]
38    pub resource_types: Option<Vec<models::GetHubIntegrationMeta200ResponseResourceTypesInner>>,
39}
40
41impl GetHubIntegrationMeta200Response {
42    pub fn new(app: String, display_name: String) -> GetHubIntegrationMeta200Response {
43        GetHubIntegrationMeta200Response {
44            app,
45            display_name,
46            description: None,
47            docs_url: None,
48            curated: None,
49            metadata_source: None,
50            meta: None,
51            meta_updated_at: None,
52            derived: None,
53            resource_types: None,
54        }
55    }
56}
57/// whether the provider knowledge was authored (curated) or inferred from the shipped scripts (derived)
58#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
59pub enum MetadataSource {
60    #[serde(rename = "curated")]
61    Curated,
62    #[serde(rename = "derived")]
63    Derived,
64}
65
66impl Default for MetadataSource {
67    fn default() -> MetadataSource {
68        Self::Curated
69    }
70}
71