using GitHub.Services.WebApi; using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; namespace GitHub.Build.WebApi { /// /// Represents a reference to a build. /// [DataContract] public class BuildReference : BaseSecuredObject { public BuildReference() { } internal BuildReference( ISecuredObject securedObject) : base(securedObject) { } /// /// The ID of the build. /// [DataMember(EmitDefaultValue = false)] [Key] public Int32 Id { get; [EditorBrowsable(EditorBrowsableState.Never)] set; } /// /// The build number. /// [DataMember(EmitDefaultValue = false)] public String BuildNumber { get; set; } /// /// The build status. /// [DataMember(EmitDefaultValue = false)] public BuildStatus? Status { get; set; } /// /// The build result. /// [DataMember(EmitDefaultValue = false)] public BuildResult? Result { get; set; } /// /// The time that the build was queued. /// [DataMember(EmitDefaultValue = false)] public DateTime? QueueTime { get; set; } /// /// The time that the build was started. /// [DataMember(EmitDefaultValue = false)] public DateTime? StartTime { get; set; } /// /// The time that the build was completed. /// [DataMember(EmitDefaultValue = false)] public DateTime? FinishTime { get; set; } /// /// The identity on whose behalf the build was queued. /// [DataMember(EmitDefaultValue = false)] public IdentityRef RequestedFor { get; [EditorBrowsable(EditorBrowsableState.Never)] set; } /// /// Indicates whether the build has been deleted. /// [DataMember(EmitDefaultValue = false)] public Boolean Deleted { get; set; } /// /// The links to other objects related to this object. /// public ReferenceLinks Links { get { if (m_links == null) { m_links = new ReferenceLinks(); } return m_links; } } [DataMember(Name = "_links", EmitDefaultValue = false)] private ReferenceLinks m_links; } }