openapi_github/models/pulls_update_branch_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 PullsUpdateBranchRequest {
16 /// The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the \"[List commits](https://docs.github.com/rest/commits/commits#list-commits)\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
17 #[serde(rename = "expected_head_sha", skip_serializing_if = "Option::is_none")]
18 pub expected_head_sha: Option<String>,
19}
20
21impl PullsUpdateBranchRequest {
22 pub fn new() -> PullsUpdateBranchRequest {
23 PullsUpdateBranchRequest {
24 expected_head_sha: None,
25 }
26 }
27}
28