using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using Octokit.Internal; namespace Octokit { /// /// Represents the requested changes to an edit repository hook. /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class EditRepositoryHook { /// /// Initializes a new instance of the class. /// public EditRepositoryHook() : this(null) { } /// /// Initializes a new instance of the class. /// /// The configuration. public EditRepositoryHook(IDictionary config) { Config = config; } public IDictionary Config { get; private set; } /// /// Gets or sets the events. /// /// /// The events. /// public IEnumerable Events { get; set; } [Parameter(Key = "add_events")] public IEnumerable AddEvents { get; set; } /// /// Gets or sets the remove events. /// /// /// The remove events. /// [Parameter(Key = "remove_events")] public IEnumerable RemoveEvents { get; set; } /// /// Gets or sets the active. /// /// /// The active. /// public bool? Active { get; set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Repository Hook: Replacing Events: {0}, Adding Events: {1}, Removing Events: {2}", Events == null ? "no" : string.Join(", ", Events), AddEvents == null ? "no" : string.Join(", ", AddEvents), RemoveEvents == null ? "no" : string.Join(", ", RemoveEvents)); } } } }