openapi_github/models/
pulls_create_review_request_comments_inner.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 PullsCreateReviewRequestCommentsInner {
16    /// The relative path to the file that necessitates a review comment.
17    #[serde(rename = "path")]
18    pub path: String,
19    /// The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The `position` value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
20    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
21    pub position: Option<i32>,
22    /// Text of the review comment.
23    #[serde(rename = "body")]
24    pub body: String,
25    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
26    pub line: Option<i32>,
27    #[serde(rename = "side", skip_serializing_if = "Option::is_none")]
28    pub side: Option<String>,
29    #[serde(rename = "start_line", skip_serializing_if = "Option::is_none")]
30    pub start_line: Option<i32>,
31    #[serde(rename = "start_side", skip_serializing_if = "Option::is_none")]
32    pub start_side: Option<String>,
33}
34
35impl PullsCreateReviewRequestCommentsInner {
36    pub fn new(path: String, body: String) -> PullsCreateReviewRequestCommentsInner {
37        PullsCreateReviewRequestCommentsInner {
38            path,
39            position: None,
40            body,
41            line: None,
42            side: None,
43            start_line: None,
44            start_side: None,
45        }
46    }
47}
48