/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Class != null) { hashCode = hashCode * 59 + Class.GetHashCode(); } if (Number != null) { hashCode = hashCode * 59 + Number.GetHashCode(); } if (Url != null) { hashCode = hashCode * 59 + Url.GetHashCode(); } if (Actions != null) { hashCode = hashCode * 59 + Actions.GetHashCode(); } if (Building != null) { hashCode = hashCode * 59 + Building.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (DisplayName != null) { hashCode = hashCode * 59 + DisplayName.GetHashCode(); } if (Duration != null) { hashCode = hashCode * 59 + Duration.GetHashCode(); } if (EstimatedDuration != null) { hashCode = hashCode * 59 + EstimatedDuration.GetHashCode(); } if (Executor != null) { hashCode = hashCode * 59 + Executor.GetHashCode(); } if (FullDisplayName != null) { hashCode = hashCode * 59 + FullDisplayName.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (KeepLog != null) { hashCode = hashCode * 59 + KeepLog.GetHashCode(); } if (QueueId != null) { hashCode = hashCode * 59 + QueueId.GetHashCode(); } if (Result != null) { hashCode = hashCode * 59 + Result.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (BuiltOn != null) { hashCode = hashCode * 59 + BuiltOn.GetHashCode(); } if (ChangeSet != null) { hashCode = hashCode * 59 + ChangeSet.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if FreeStyleBuild instances are equal /// </summary> /// <param name="other">Instance of FreeStyleBuild to be compared</param> /// <returns>Boolean</returns> public bool Equals(FreeStyleBuild other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Class == other.Class || Class != null && Class.Equals(other.Class) ) && ( Number == other.Number || Number != null && Number.Equals(other.Number) ) && ( Url == other.Url || Url != null && Url.Equals(other.Url) ) && ( Actions == other.Actions || Actions != null && Actions.SequenceEqual(other.Actions) ) && ( Building == other.Building || Building != null && Building.Equals(other.Building) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( DisplayName == other.DisplayName || DisplayName != null && DisplayName.Equals(other.DisplayName) ) && ( Duration == other.Duration || Duration != null && Duration.Equals(other.Duration) ) && ( EstimatedDuration == other.EstimatedDuration || EstimatedDuration != null && EstimatedDuration.Equals(other.EstimatedDuration) ) && ( Executor == other.Executor || Executor != null && Executor.Equals(other.Executor) ) && ( FullDisplayName == other.FullDisplayName || FullDisplayName != null && FullDisplayName.Equals(other.FullDisplayName) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( KeepLog == other.KeepLog || KeepLog != null && KeepLog.Equals(other.KeepLog) ) && ( QueueId == other.QueueId || QueueId != null && QueueId.Equals(other.QueueId) ) && ( Result == other.Result || Result != null && Result.Equals(other.Result) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( BuiltOn == other.BuiltOn || BuiltOn != null && BuiltOn.Equals(other.BuiltOn) ) && ( ChangeSet == other.ChangeSet || ChangeSet != null && ChangeSet.Equals(other.ChangeSet) )); }