/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (ProgramId != null) { hashCode = hashCode * 59 + ProgramId.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } hashCode = hashCode * 59 + Trigger.GetHashCode(); hashCode = hashCode * 59 + Status.GetHashCode(); if (CreatedAt != null) { hashCode = hashCode * 59 + CreatedAt.GetHashCode(); } if (UpdatedAt != null) { hashCode = hashCode * 59 + UpdatedAt.GetHashCode(); } if (LastStartedAt != null) { hashCode = hashCode * 59 + LastStartedAt.GetHashCode(); } if (LastFinishedAt != null) { hashCode = hashCode * 59 + LastFinishedAt.GetHashCode(); } if (Phases != null) { hashCode = hashCode * 59 + Phases.GetHashCode(); } if (Links != null) { hashCode = hashCode * 59 + Links.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Pipeline instances are equal /// </summary> /// <param name="other">Instance of Pipeline to be compared</param> /// <returns>Boolean</returns> public bool Equals(Pipeline other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( ProgramId == other.ProgramId || ProgramId != null && ProgramId.Equals(other.ProgramId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Trigger == other.Trigger || Trigger.Equals(other.Trigger) ) && ( Status == other.Status || Status.Equals(other.Status) ) && ( CreatedAt == other.CreatedAt || CreatedAt != null && CreatedAt.Equals(other.CreatedAt) ) && ( UpdatedAt == other.UpdatedAt || UpdatedAt != null && UpdatedAt.Equals(other.UpdatedAt) ) && ( LastStartedAt == other.LastStartedAt || LastStartedAt != null && LastStartedAt.Equals(other.LastStartedAt) ) && ( LastFinishedAt == other.LastFinishedAt || LastFinishedAt != null && LastFinishedAt.Equals(other.LastFinishedAt) ) && ( Phases == other.Phases || Phases != null && other.Phases != null && Phases.SequenceEqual(other.Phases) ) && ( Links == other.Links || Links != null && Links.Equals(other.Links) )); }