openapi_github/models/checks_create_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/// ChecksCreateRequestOutput : 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 ChecksCreateRequestOutput {
17 /// The title of the check run.
18 #[serde(rename = "title")]
19 pub title: String,
20 /// The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters.
21 #[serde(rename = "summary")]
22 pub summary: String,
23 /// The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters.
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 on GitHub in the **Checks** and **Files changed** tab of the pull request. 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/reference/checks#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 how you can view annotations on GitHub, 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 ChecksCreateRequestOutput {
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(title: String, summary: String) -> ChecksCreateRequestOutput {
37 ChecksCreateRequestOutput {
38 title,
39 summary,
40 text: None,
41 annotations: None,
42 images: None,
43 }
44 }
45}
46