gitbundle_sdk/models/
job_context.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JobContext {
17    #[serde(rename = "check_run_id")]
18    pub check_run_id: i64,
19    #[serde(rename = "container")]
20    pub container: Box<models::ContainerContext>,
21    #[serde(rename = "services")]
22    pub services: std::collections::HashMap<String, models::ServiceContext>,
23    #[serde(rename = "status")]
24    pub status: models::StatusContext,
25}
26
27impl JobContext {
28    pub fn new(
29        check_run_id: i64,
30        container: models::ContainerContext,
31        services: std::collections::HashMap<String, models::ServiceContext>,
32        status: models::StatusContext,
33    ) -> JobContext {
34        JobContext {
35            check_run_id,
36            container: Box::new(container),
37            services,
38            status,
39        }
40    }
41}