Skip to main content

orvanta_api/models/
runtime_usage_location.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.2.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RuntimeUsageLocation : One concrete usage of a language (#190/#255 runtime governance).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RuntimeUsageLocation {
17    #[serde(rename = "kind")]
18    pub kind: Kind,
19    #[serde(rename = "workspace_id")]
20    pub workspace_id: String,
21    #[serde(rename = "path")]
22    pub path: String,
23}
24
25impl RuntimeUsageLocation {
26    /// One concrete usage of a language (#190/#255 runtime governance).
27    pub fn new(kind: Kind, workspace_id: String, path: String) -> RuntimeUsageLocation {
28        RuntimeUsageLocation {
29            kind,
30            workspace_id,
31            path,
32        }
33    }
34}
35/// 
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Kind {
38    #[serde(rename = "script")]
39    Script,
40    #[serde(rename = "flow")]
41    Flow,
42    #[serde(rename = "app")]
43    App,
44}
45
46impl Default for Kind {
47    fn default() -> Kind {
48        Self::Script
49    }
50}
51