openapi_github/models/
git_create_commit_request_author.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/// GitCreateCommitRequestAuthor : Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GitCreateCommitRequestAuthor {
17    /// The name of the author (or committer) of the commit
18    #[serde(rename = "name")]
19    pub name: String,
20    /// The email of the author (or committer) of the commit
21    #[serde(rename = "email")]
22    pub email: String,
23    /// Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
24    #[serde(rename = "date", skip_serializing_if = "Option::is_none")]
25    pub date: Option<String>,
26}
27
28impl GitCreateCommitRequestAuthor {
29    /// Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.
30    pub fn new(name: String, email: String) -> GitCreateCommitRequestAuthor {
31        GitCreateCommitRequestAuthor {
32            name,
33            email,
34            date: None,
35        }
36    }
37}
38