windmill-api 1.824.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.824.1
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetHubIntegrationMeta200Response {
    #[serde(rename = "app")]
    pub app: String,
    #[serde(rename = "display_name")]
    pub display_name: String,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "docs_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub docs_url: Option<Option<String>>,
    /// 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
    #[serde(rename = "curated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub curated: Option<Option<bool>>,
    /// whether the provider knowledge was authored (curated) or inferred from the shipped scripts (derived)
    #[serde(rename = "metadata_source", skip_serializing_if = "Option::is_none")]
    pub metadata_source: Option<MetadataSource>,
    /// the integration's authored meta.json verbatim; the content repo owns its schema, so it is passed through unvalidated
    #[serde(rename = "meta", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub meta: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
    #[serde(rename = "meta_updated_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub meta_updated_at: Option<Option<String>>,
    #[serde(rename = "derived", skip_serializing_if = "Option::is_none")]
    pub derived: Option<Box<models::GetHubIntegrationMeta200ResponseDerived>>,
    #[serde(rename = "resource_types", skip_serializing_if = "Option::is_none")]
    pub resource_types: Option<Vec<models::GetHubIntegrationMeta200ResponseResourceTypesInner>>,
}

impl GetHubIntegrationMeta200Response {
    pub fn new(app: String, display_name: String) -> GetHubIntegrationMeta200Response {
        GetHubIntegrationMeta200Response {
            app,
            display_name,
            description: None,
            docs_url: None,
            curated: None,
            metadata_source: None,
            meta: None,
            meta_updated_at: None,
            derived: None,
            resource_types: None,
        }
    }
}
/// whether the provider knowledge was authored (curated) or inferred from the shipped scripts (derived)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MetadataSource {
    #[serde(rename = "curated")]
    Curated,
    #[serde(rename = "derived")]
    Derived,
}

impl Default for MetadataSource {
    fn default() -> MetadataSource {
        Self::Curated
    }
}