Skip to main content

windmill_api/models/
get_resource_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.887.0
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 GetResource200Response {
16    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
17    pub workspace_id: Option<String>,
18    #[serde(rename = "path")]
19    pub path: String,
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    #[serde(rename = "resource_type")]
23    pub resource_type: String,
24    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub value: Option<Option<serde_json::Value>>,
26    #[serde(rename = "is_oauth")]
27    pub is_oauth: bool,
28    #[serde(rename = "extra_perms", skip_serializing_if = "Option::is_none")]
29    pub extra_perms: Option<std::collections::HashMap<String, bool>>,
30    #[serde(rename = "is_expired", skip_serializing_if = "Option::is_none")]
31    pub is_expired: Option<bool>,
32    #[serde(rename = "refresh_error", skip_serializing_if = "Option::is_none")]
33    pub refresh_error: Option<String>,
34    #[serde(rename = "is_linked")]
35    pub is_linked: bool,
36    #[serde(rename = "is_refreshed")]
37    pub is_refreshed: bool,
38    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
39    pub account: Option<f64>,
40    /// OAuth scopes the linked account was connected with
41    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
42    pub scopes: Option<Vec<String>>,
43    /// OAuth client the linked account refreshes through
44    #[serde(rename = "client", skip_serializing_if = "Option::is_none")]
45    pub client: Option<String>,
46    /// The linked account was connected through the workspace's own OAuth app
47    #[serde(rename = "is_workspace_integration", skip_serializing_if = "Option::is_none")]
48    pub is_workspace_integration: Option<bool>,
49    #[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
50    pub created_by: Option<String>,
51    #[serde(rename = "edited_at", skip_serializing_if = "Option::is_none")]
52    pub edited_at: Option<String>,
53    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
54    pub labels: Option<Vec<String>>,
55    /// Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. 
56    #[serde(rename = "inherited_labels", skip_serializing_if = "Option::is_none")]
57    pub inherited_labels: Option<Vec<String>>,
58    #[serde(rename = "ws_specific", skip_serializing_if = "Option::is_none")]
59    pub ws_specific: Option<bool>,
60    /// True when this row is a per-user draft with no deployed resource at the same path. Frontend renders a \"Draft\" badge. 
61    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
62    pub draft_only: Option<bool>,
63    #[serde(rename = "is_draft")]
64    pub is_draft: bool,
65    /// For an `ai_agent` resource only, its `memory` setting: the one part of the value a listing returns, since it decides whether the agent keeps a conversation. 
66    #[serde(rename = "agent_memory", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
67    pub agent_memory: Option<Option<serde_json::Value>>,
68    /// On a draft-only row, the path its editor has staged when it differs from the storage path (e.g. a never-deployed item parked at `u/{user}/draft_{uuid}`). 
69    #[serde(rename = "draft_path", skip_serializing_if = "Option::is_none")]
70    pub draft_path: Option<String>,
71    /// The grant of the linked OAuth account: `client_credentials` connects as the app, `authorization_code` as the user who connected it. 
72    #[serde(rename = "grant_type", skip_serializing_if = "Option::is_none")]
73    pub grant_type: Option<String>,
74    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
75    pub draft_saved_at: Option<String>,
76    /// The deployed version the draft forked from, as text whatever the kind (script hash, flow version id, app version id). Compare to the deployed head to tell a draft that is behind. Absent when there is no draft or it was never forked from a deploy. 
77    #[serde(rename = "draft_base", skip_serializing_if = "Option::is_none")]
78    pub draft_base: Option<String>,
79    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
80    pub no_deployed: Option<bool>,
81    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
82    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
83    /// Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's \"get by path\" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI. 
84    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
85    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
86}
87
88impl GetResource200Response {
89    pub fn new(path: String, resource_type: String, is_oauth: bool, is_linked: bool, is_refreshed: bool, is_draft: bool) -> GetResource200Response {
90        GetResource200Response {
91            workspace_id: None,
92            path,
93            description: None,
94            resource_type,
95            value: None,
96            is_oauth,
97            extra_perms: None,
98            is_expired: None,
99            refresh_error: None,
100            is_linked,
101            is_refreshed,
102            account: None,
103            scopes: None,
104            client: None,
105            is_workspace_integration: None,
106            created_by: None,
107            edited_at: None,
108            labels: None,
109            inherited_labels: None,
110            ws_specific: None,
111            draft_only: None,
112            is_draft,
113            agent_memory: None,
114            draft_path: None,
115            grant_type: None,
116            draft_saved_at: None,
117            draft_base: None,
118            no_deployed: None,
119            draft: None,
120            other_drafts_users: None,
121        }
122    }
123}
124