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 */
1011use crate::models;
12use serde::{Deserialize, Serialize};
1314#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MigrationsStartForOrgRequest {
16/// A list of arrays indicating which repositories should be migrated.
17#[serde(rename = "repositories")]
18pub repositories: Vec<String>,
19/// Indicates whether repositories should be locked (to prevent manipulation) while migrating data.
20#[serde(rename = "lock_repositories", skip_serializing_if = "Option::is_none")]
21pub lock_repositories: Option<bool>,
22/// Indicates whether metadata should be excluded and only git source should be included for the migration.
23#[serde(rename = "exclude_metadata", skip_serializing_if = "Option::is_none")]
24pub exclude_metadata: Option<bool>,
25/// Indicates whether the repository git data should be excluded from the migration.
26#[serde(rename = "exclude_git_data", skip_serializing_if = "Option::is_none")]
27pub exclude_git_data: Option<bool>,
28/// Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).
29#[serde(rename = "exclude_attachments", skip_serializing_if = "Option::is_none")]
30pub exclude_attachments: Option<bool>,
31/// Indicates whether releases should be excluded from the migration (to reduce migration archive file size).
32#[serde(rename = "exclude_releases", skip_serializing_if = "Option::is_none")]
33pub exclude_releases: Option<bool>,
34/// Indicates whether projects owned by the organization or users should be excluded. from the migration.
35#[serde(rename = "exclude_owner_projects", skip_serializing_if = "Option::is_none")]
36pub exclude_owner_projects: Option<bool>,
37/// Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).
38#[serde(rename = "org_metadata_only", skip_serializing_if = "Option::is_none")]
39pub org_metadata_only: Option<bool>,
40/// Exclude related items from being returned in the response in order to improve performance of the request.
41#[serde(rename = "exclude", skip_serializing_if = "Option::is_none")]
42pub exclude: Option<Vec<Exclude>>,
43}
4445impl MigrationsStartForOrgRequest {
46pub fn new(repositories: Vec<String>) -> MigrationsStartForOrgRequest {
47 MigrationsStartForOrgRequest {
48 repositories,
49 lock_repositories: None,
50 exclude_metadata: None,
51 exclude_git_data: None,
52 exclude_attachments: None,
53 exclude_releases: None,
54 exclude_owner_projects: None,
55 org_metadata_only: None,
56 exclude: None,
57 }
58 }
59}
60/// Exclude related items from being returned in the response in order to improve performance of the request.
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum Exclude {
63#[serde(rename = "repositories")]
64Repositories,
65}
6667impl Default for Exclude {
68fn default() -> Exclude {
69Self::Repositories
70 }
71}
72