openapi_github/models/
repos_delete_file_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 ReposDeleteFileRequest {
16    /// The commit message.
17    #[serde(rename = "message")]
18    pub message: String,
19    /// The blob SHA of the file being deleted.
20    #[serde(rename = "sha")]
21    pub sha: String,
22    /// The branch name. Default: the repository’s default branch
23    #[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
24    pub branch: Option<String>,
25    #[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
26    pub committer: Option<Box<models::ReposDeleteFileRequestCommitter>>,
27    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
28    pub author: Option<Box<models::ReposDeleteFileRequestAuthor>>,
29}
30
31impl ReposDeleteFileRequest {
32    pub fn new(message: String, sha: String) -> ReposDeleteFileRequest {
33        ReposDeleteFileRequest {
34            message,
35            sha,
36            branch: None,
37            committer: None,
38            author: None,
39        }
40    }
41}
42