openapi_github/models/
code_scanning_sarifs_status.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
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 CodeScanningSarifsStatus {
16    /// `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed.
17    #[serde(rename = "processing_status", skip_serializing_if = "Option::is_none")]
18    pub processing_status: Option<ProcessingStatus>,
19    /// The REST API URL for getting the analyses associated with the upload.
20    #[serde(rename = "analyses_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub analyses_url: Option<Option<String>>,
22    /// Any errors that ocurred during processing of the delivery.
23    #[serde(rename = "errors", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub errors: Option<Option<Vec<String>>>,
25}
26
27impl CodeScanningSarifsStatus {
28    pub fn new() -> CodeScanningSarifsStatus {
29        CodeScanningSarifsStatus {
30            processing_status: None,
31            analyses_url: None,
32            errors: None,
33        }
34    }
35}
36/// `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum ProcessingStatus {
39    #[serde(rename = "pending")]
40    Pending,
41    #[serde(rename = "complete")]
42    Complete,
43    #[serde(rename = "failed")]
44    Failed,
45}
46
47impl Default for ProcessingStatus {
48    fn default() -> ProcessingStatus {
49        Self::Pending
50    }
51}
52