Skip to main content

tapis_workflows/models/
context.rs

1/*
2 * Tapis Workflows API
3 *
4 * Create and manage pipelines
5 *
6 * The version of the OpenAPI document: 1.6.0
7 * Contact: cicsupport@tacc.utexas.edu
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 Context {
16    #[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
17    pub branch: Option<String>,
18    #[serde(
19        rename = "credentials",
20        default,
21        with = "::serde_with::rust::double_option",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub credentials: Option<Option<serde_json::Value>>,
25    #[serde(rename = "build_file_path", skip_serializing_if = "Option::is_none")]
26    pub build_file_path: Option<String>,
27    #[serde(rename = "sub_path", skip_serializing_if = "Option::is_none")]
28    pub sub_path: Option<String>,
29    #[serde(rename = "type")]
30    pub r#type: models::EnumContextType,
31    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
32    pub url: Option<String>,
33    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
34    pub visibility: Option<models::EnumContextVisibility>,
35}
36
37impl Context {
38    pub fn new(r#type: models::EnumContextType) -> Context {
39        Context {
40            branch: None,
41            credentials: None,
42            build_file_path: None,
43            sub_path: None,
44            r#type,
45            url: None,
46            visibility: None,
47        }
48    }
49}