/// <summary> /// Returns true if RentalRequestRotationList instances are equal /// </summary> /// <param name="other">Instance of RentalRequestRotationList to be compared</param> /// <returns>Boolean</returns> public bool Equals(RentalRequestRotationList other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( RotationListSortOrder == other.RotationListSortOrder || RotationListSortOrder.Equals(other.RotationListSortOrder) ) && ( Equipment == other.Equipment || Equipment != null && Equipment.Equals(other.Equipment) ) && ( RentalAgreement == other.RentalAgreement || RentalAgreement != null && RentalAgreement.Equals(other.RentalAgreement) ) && ( IsForceHire == other.IsForceHire || IsForceHire != null && IsForceHire.Equals(other.IsForceHire) ) && ( WasAsked == other.WasAsked || WasAsked != null && WasAsked.Equals(other.WasAsked) ) && ( AskedDateTime == other.AskedDateTime || AskedDateTime != null && AskedDateTime.Equals(other.AskedDateTime) ) && ( OfferResponse == other.OfferResponse || OfferResponse != null && OfferResponse.Equals(other.OfferResponse) ) && ( OfferRefusalReason == other.OfferRefusalReason || OfferRefusalReason != null && OfferRefusalReason.Equals(other.OfferRefusalReason) ) && ( OfferResponseDatetime == other.OfferResponseDatetime || OfferResponseDatetime != null && OfferResponseDatetime.Equals(other.OfferResponseDatetime) ) && ( OfferResponseNote == other.OfferResponseNote || OfferResponseNote != null && OfferResponseNote.Equals(other.OfferResponseNote) ) && ( Note == other.Note || Note != null && Note.Equals(other.Note) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); hash = hash * 59 + RotationListSortOrder.GetHashCode(); if (Equipment != null) { hash = hash * 59 + Equipment.GetHashCode(); } if (RentalAgreement != null) { hash = hash * 59 + RentalAgreement.GetHashCode(); } if (IsForceHire != null) { hash = hash * 59 + IsForceHire.GetHashCode(); } if (WasAsked != null) { hash = hash * 59 + WasAsked.GetHashCode(); } if (AskedDateTime != null) { hash = hash * 59 + AskedDateTime.GetHashCode(); } if (OfferResponse != null) { hash = hash * 59 + OfferResponse.GetHashCode(); } if (OfferRefusalReason != null) { hash = hash * 59 + OfferRefusalReason.GetHashCode(); } if (OfferResponseDatetime != null) { hash = hash * 59 + OfferResponseDatetime.GetHashCode(); } if (OfferResponseNote != null) { hash = hash * 59 + OfferResponseNote.GetHashCode(); } if (Note != null) { hash = hash * 59 + Note.GetHashCode(); } return(hash); } }
/// <summary> /// Initializes a new instance of the <see cref="LocalAreaRotationList" /> class. /// </summary> /// <param name="Id">Id (required).</param> /// <param name="DistrictEquipmentType">A foreign key reference to the system-generated unique identifier for an Equipment Type (required).</param> /// <param name="LocalArea">LocalArea (required).</param> /// <param name="AskNextBlock1">The id of the next piece of Block 1 Equipment to be asked for a Rental Request. If null, start from the first piece of equipment in Block 1..</param> /// <param name="AskNextBlock1Seniority">The seniority score of the piece of equipment that is the next to be asked in Block 1..</param> /// <param name="AskNextBlock2">The id of the next piece of Block 2 Equipment to be asked for a Rental Request. If null, start from the first piece of equipment in Block 2..</param> /// <param name="AskNextBlock2Seniority">The seniority score of the piece of equipment that is the next to be asked in Block 1..</param> /// <param name="AskNextBlockOpen">The id of the next piece of Block Open Equipment to be asked for a Rental Request. If null, start from the first piece of equipment in Block Open..</param> public LocalAreaRotationList(int Id, DistrictEquipmentType DistrictEquipmentType, LocalArea LocalArea, Equipment AskNextBlock1 = null, float?AskNextBlock1Seniority = null, Equipment AskNextBlock2 = null, float?AskNextBlock2Seniority = null, Equipment AskNextBlockOpen = null) { this.Id = Id; this.DistrictEquipmentType = DistrictEquipmentType; this.LocalArea = LocalArea; this.AskNextBlock1 = AskNextBlock1; this.AskNextBlock1Seniority = AskNextBlock1Seniority; this.AskNextBlock2 = AskNextBlock2; this.AskNextBlock2Seniority = AskNextBlock2Seniority; this.AskNextBlockOpen = AskNextBlockOpen; }