tapis_workflows/models/
req_github_context.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReqGithubContext {
16 #[serde(rename = "type")]
17 pub r#type: models::EnumContextType,
18 #[serde(rename = "visibility")]
19 pub visibility: models::EnumContextVisibility,
20 #[serde(rename = "url")]
21 pub url: String,
22 #[serde(rename = "branch")]
23 pub branch: String,
24 #[serde(rename = "build_file_path")]
25 pub build_file_path: String,
26 #[serde(rename = "sub_path", skip_serializing_if = "Option::is_none")]
27 pub sub_path: Option<String>,
28 #[serde(rename = "credentials", skip_serializing_if = "Option::is_none")]
29 pub credentials: Option<Box<models::ReqGithubCred>>,
30 #[serde(rename = "identity_uuid", skip_serializing_if = "Option::is_none")]
31 pub identity_uuid: Option<uuid::Uuid>,
32}
33
34impl ReqGithubContext {
35 pub fn new(
36 r#type: models::EnumContextType,
37 visibility: models::EnumContextVisibility,
38 url: String,
39 branch: String,
40 build_file_path: String,
41 ) -> ReqGithubContext {
42 ReqGithubContext {
43 r#type,
44 visibility,
45 url,
46 branch,
47 build_file_path,
48 sub_path: None,
49 credentials: None,
50 identity_uuid: None,
51 }
52 }
53}