openapi_github/models/
repos_create_commit_comment_request.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 ReposCreateCommitCommentRequest {
16    /// The contents of the comment.
17    #[serde(rename = "body")]
18    pub body: String,
19    /// Relative path of the file to comment on.
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    /// Line index in the diff to comment on.
23    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
24    pub position: Option<i32>,
25    /// **Deprecated**. Use **position** parameter instead. Line number in the file to comment on.
26    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
27    pub line: Option<i32>,
28}
29
30impl ReposCreateCommitCommentRequest {
31    pub fn new(body: String) -> ReposCreateCommitCommentRequest {
32        ReposCreateCommitCommentRequest {
33            body,
34            path: None,
35            position: None,
36            line: None,
37        }
38    }
39}
40