openapi_github/models/
migrations_start_for_authenticated_user_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 MigrationsStartForAuthenticatedUserRequest {
16    /// Lock the repositories being migrated at the start of the migration
17    #[serde(rename = "lock_repositories", skip_serializing_if = "Option::is_none")]
18    pub lock_repositories: Option<bool>,
19    /// Indicates whether metadata should be excluded and only git source should be included for the migration.
20    #[serde(rename = "exclude_metadata", skip_serializing_if = "Option::is_none")]
21    pub exclude_metadata: Option<bool>,
22    /// Indicates whether the repository git data should be excluded from the migration.
23    #[serde(rename = "exclude_git_data", skip_serializing_if = "Option::is_none")]
24    pub exclude_git_data: Option<bool>,
25    /// Do not include attachments in the migration
26    #[serde(rename = "exclude_attachments", skip_serializing_if = "Option::is_none")]
27    pub exclude_attachments: Option<bool>,
28    /// Do not include releases in the migration
29    #[serde(rename = "exclude_releases", skip_serializing_if = "Option::is_none")]
30    pub exclude_releases: Option<bool>,
31    /// Indicates whether projects owned by the organization or users should be excluded.
32    #[serde(rename = "exclude_owner_projects", skip_serializing_if = "Option::is_none")]
33    pub exclude_owner_projects: Option<bool>,
34    /// Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).
35    #[serde(rename = "org_metadata_only", skip_serializing_if = "Option::is_none")]
36    pub org_metadata_only: Option<bool>,
37    /// Exclude attributes from the API response to improve performance
38    #[serde(rename = "exclude", skip_serializing_if = "Option::is_none")]
39    pub exclude: Option<Vec<Exclude>>,
40    #[serde(rename = "repositories")]
41    pub repositories: Vec<String>,
42}
43
44impl MigrationsStartForAuthenticatedUserRequest {
45    pub fn new(repositories: Vec<String>) -> MigrationsStartForAuthenticatedUserRequest {
46        MigrationsStartForAuthenticatedUserRequest {
47            lock_repositories: None,
48            exclude_metadata: None,
49            exclude_git_data: None,
50            exclude_attachments: None,
51            exclude_releases: None,
52            exclude_owner_projects: None,
53            org_metadata_only: None,
54            exclude: None,
55            repositories,
56        }
57    }
58}
59/// Exclude attributes from the API response to improve performance
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum Exclude {
62    #[serde(rename = "repositories")]
63    Repositories,
64}
65
66impl Default for Exclude {
67    fn default() -> Exclude {
68        Self::Repositories
69    }
70}
71