openapi_github/models/
checks_update_request_output.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/// ChecksUpdateRequestOutput : Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ChecksUpdateRequestOutput {
17    /// **Required**.
18    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
19    pub title: Option<String>,
20    /// Can contain Markdown.
21    #[serde(rename = "summary")]
22    pub summary: String,
23    /// Can contain Markdown.
24    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
25    pub text: Option<String>,
26    /// Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about annotations in the UI, see \"[About status checks](https://docs.github.com/articles/about-status-checks#checks)\".
27    #[serde(rename = "annotations", skip_serializing_if = "Option::is_none")]
28    pub annotations: Option<Vec<models::ChecksCreateRequestOutputAnnotationsInner>>,
29    /// Adds images to the output displayed in the GitHub pull request UI.
30    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
31    pub images: Option<Vec<models::ChecksCreateRequestOutputImagesInner>>,
32}
33
34impl ChecksUpdateRequestOutput {
35    /// Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.
36    pub fn new(summary: String) -> ChecksUpdateRequestOutput {
37        ChecksUpdateRequestOutput {
38            title: None,
39            summary,
40            text: None,
41            annotations: None,
42            images: None,
43        }
44    }
45}
46