openapi_github/models/
migrations_start_import_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 MigrationsStartImportRequest {
16    /// The URL of the originating repository.
17    #[serde(rename = "vcs_url")]
18    pub vcs_url: String,
19    /// The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
20    #[serde(rename = "vcs", skip_serializing_if = "Option::is_none")]
21    pub vcs: Option<Vcs>,
22    /// If authentication is required, the username to provide to `vcs_url`.
23    #[serde(rename = "vcs_username", skip_serializing_if = "Option::is_none")]
24    pub vcs_username: Option<String>,
25    /// If authentication is required, the password to provide to `vcs_url`.
26    #[serde(rename = "vcs_password", skip_serializing_if = "Option::is_none")]
27    pub vcs_password: Option<String>,
28    /// For a tfvc import, the name of the project that is being imported.
29    #[serde(rename = "tfvc_project", skip_serializing_if = "Option::is_none")]
30    pub tfvc_project: Option<String>,
31}
32
33impl MigrationsStartImportRequest {
34    pub fn new(vcs_url: String) -> MigrationsStartImportRequest {
35        MigrationsStartImportRequest {
36            vcs_url,
37            vcs: None,
38            vcs_username: None,
39            vcs_password: None,
40            tfvc_project: None,
41        }
42    }
43}
44/// The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Vcs {
47    #[serde(rename = "subversion")]
48    Subversion,
49    #[serde(rename = "git")]
50    Git,
51    #[serde(rename = "mercurial")]
52    Mercurial,
53    #[serde(rename = "tfvc")]
54    Tfvc,
55}
56
57impl Default for Vcs {
58    fn default() -> Vcs {
59        Self::Subversion
60    }
61}
62