using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using Octokit.Internal; namespace Octokit { public enum PagesBuildStatus { /// /// The site has yet to be built /// [Parameter(Value = "null")] Null, /// /// The build has been requested but not yet begun /// [Parameter(Value = "queued")] Queued, /// /// The build is in progress /// [Parameter(Value = "building")] Building, /// /// The site has been built /// [Parameter(Value = "built")] Built, /// /// An error occurred during the build /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Errored")] [Parameter(Value = "errored")] Errored } /// /// Information about your GitHub Pages configuration /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Page { public Page() { } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "cname")] public Page(string url, string htmlUrl, PagesBuildStatus status, string cname, bool custom404) { Url = url; HtmlUrl = htmlUrl; Status = status; CName = cname; Custom404 = custom404; } /// /// The pages's API URL. /// public string Url { get; protected set; } /// /// Absolute URL to the rendered site. /// public string HtmlUrl { get; protected set; } /// /// Build status of the pages site. /// public StringEnum Status { get; protected set; } /// /// CName of the pages site. Will be null if no CName was provided by the user. /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "CName")] public string CName { get; protected set; } /// /// Is a custom 404 page provided. /// public bool Custom404 { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "CName: {0}, Status: {1}", CName, Status.ToString()); } } } }