Skip to main content

gitbundle_sdk/models/
pullreq_apply_suggestions_output.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.4.1
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 PullreqApplySuggestionsOutput {
17    #[serde(
18        rename = "commit_sha",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub commit_sha: Option<Option<String>>,
24    #[serde(rename = "dry_run_rules")]
25    pub dry_run_rules: bool,
26    #[serde(rename = "rule_checks")]
27    pub rule_checks: Vec<models::RuleCheckResult>,
28}
29
30impl PullreqApplySuggestionsOutput {
31    pub fn new(
32        dry_run_rules: bool,
33        rule_checks: Vec<models::RuleCheckResult>,
34    ) -> PullreqApplySuggestionsOutput {
35        PullreqApplySuggestionsOutput {
36            commit_sha: None,
37            dry_run_rules,
38            rule_checks,
39        }
40    }
41}