using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; namespace Octokit { [SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Justification = "People can use fully qualified names if they want to use both.")] [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Deployment { public Deployment() { } public Deployment(int id, string sha, string url, User creator, IReadOnlyDictionary payload, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description, string statusesUrl) { Id = id; Sha = sha; Url = url; Creator = creator; Payload = payload; CreatedAt = createdAt; UpdatedAt = updatedAt; Description = description; StatusesUrl = statusesUrl; } /// /// Id of this deployment. /// public int Id { get; protected set; } /// /// /// public string Sha { get; protected set; } /// /// The API URL for this deployment. /// public string Url { get; protected set; } /// /// The that created the deployment. /// public User Creator { get; protected set; } /// /// JSON payload with extra information about the deployment. /// public IReadOnlyDictionary Payload { get; protected set; } /// /// Date and time that the deployment was created. /// public DateTimeOffset CreatedAt { get; protected set; } /// /// Date and time that the deployment was updated. /// public DateTimeOffset UpdatedAt { get; protected set; } /// /// A short description of the deployment. /// public string Description { get; protected set; } /// /// The API URL for the es of this deployment. /// public string StatusesUrl { get; protected set; } /// /// Indicates if the environment is specific to a deployment and will no longer exist at some point in the future. /// public bool TransientEnvironment { get; protected set; } /// /// Indicates if the environment is one with which end users directly interact. /// public bool ProductionEnvironment { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "CreatedAt: {0}", CreatedAt); } } } }