gitbundle_sdk/models/
rule_check_result.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 RuleCheckResult {
17    #[serde(rename = "bypassable")]
18    pub bypassable: bool,
19    #[serde(rename = "bypassed")]
20    pub bypassed: bool,
21    #[serde(rename = "rule")]
22    pub rule: Box<models::RuleMetadata>,
23    #[serde(rename = "violations")]
24    pub violations: Vec<models::RuleViolation>,
25}
26
27impl RuleCheckResult {
28    pub fn new(
29        bypassable: bool,
30        bypassed: bool,
31        rule: models::RuleMetadata,
32        violations: Vec<models::RuleViolation>,
33    ) -> RuleCheckResult {
34        RuleCheckResult {
35            bypassable,
36            bypassed,
37            rule: Box::new(rule),
38            violations,
39        }
40    }
41}