using System.Collections.Generic; using System.Diagnostics; using System.Globalization; namespace Octokit { /// /// Request body for starting a migration. /// /// /// See docs /// for more information. /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class StartMigrationRequest { /// /// Parameter-less constructor needed for SimpleJsonSerializer. /// public StartMigrationRequest() { } public StartMigrationRequest( IReadOnlyList repositories ) : this(repositories, false, false) { } /// /// Instantiate a new Migration Request object. /// /// List of repositories in {owner}/{repo} format. /// To lock the repos or not. /// To exclude the attachments or not. public StartMigrationRequest( IReadOnlyList repositories, bool lockRepositories, bool excludeAttachments) { Repositories = repositories; LockRepositories = lockRepositories; ExcludeAttachments = excludeAttachments; } /// /// Required. A list of arrays indicating which repositories should be migrated. /// public IReadOnlyList Repositories { get; private set; } /// /// Indicates whether repositories should be locked (to prevent manipulation) /// while migrating data. Default: false. /// public bool LockRepositories { get; private set; } /// /// Indicates whether attachments should be excluded from the migration /// (to reduce migration archive file size). Default: false. /// public bool ExcludeAttachments { get; private set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Repos: {0}", Repositories); } } } }