openapi_github/models/repos_create_using_template_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 ReposCreateUsingTemplateRequest {
16 /// The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
17 #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
18 pub owner: Option<String>,
19 /// The name of the new repository.
20 #[serde(rename = "name")]
21 pub name: String,
22 /// A short description of the new repository.
23 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24 pub description: Option<String>,
25 /// Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`.
26 #[serde(rename = "include_all_branches", skip_serializing_if = "Option::is_none")]
27 pub include_all_branches: Option<bool>,
28 /// Either `true` to create a new private repository or `false` to create a new public one.
29 #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
30 pub private: Option<bool>,
31}
32
33impl ReposCreateUsingTemplateRequest {
34 pub fn new(name: String) -> ReposCreateUsingTemplateRequest {
35 ReposCreateUsingTemplateRequest {
36 owner: None,
37 name,
38 description: None,
39 include_all_branches: None,
40 private: None,
41 }
42 }
43}
44