openapi_github/models/
repos_transfer_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 ReposTransferRequest {
16    /// The username or organization name the repository will be transferred to.
17    #[serde(rename = "new_owner")]
18    pub new_owner: String,
19    /// The new name to be given to the repository.
20    #[serde(rename = "new_name", skip_serializing_if = "Option::is_none")]
21    pub new_name: Option<String>,
22    /// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
23    #[serde(rename = "team_ids", skip_serializing_if = "Option::is_none")]
24    pub team_ids: Option<Vec<i32>>,
25}
26
27impl ReposTransferRequest {
28    pub fn new(new_owner: String) -> ReposTransferRequest {
29        ReposTransferRequest {
30            new_owner,
31            new_name: None,
32            team_ids: None,
33        }
34    }
35}
36