public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (RoomNumber.Length != 0) { hash ^= RoomNumber.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (AdditionalDescription.Length != 0) { hash ^= AdditionalDescription.GetHashCode(); } if (NightsOccupiedCounter != 0) { hash ^= NightsOccupiedCounter.GetHashCode(); } if (lastCleanedAt_ != null) { hash ^= LastCleanedAt.GetHashCode(); } if (MaintenanceState != 0) { hash ^= MaintenanceState.GetHashCode(); } if (roomTypeId_ != null) { hash ^= RoomTypeId.GetHashCode(); } if (RoomTypeName.Length != 0) { hash ^= RoomTypeName.GetHashCode(); } if (connectedRoom_ != null) { hash ^= ConnectedRoom.GetHashCode(); } if (TrunkId.Length != 0) { hash ^= TrunkId.GetHashCode(); } if (occupyingReservation_ != null) { hash ^= OccupyingReservation.GetHashCode(); } if (KcrRoomNumber.Length != 0) { hash ^= KcrRoomNumber.GetHashCode(); } return(hash); }
public void MergeFrom(Room other) { if (other == null) { return; } if (other.entityId_ != null) { if (entityId_ == null) { entityId_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator(); } EntityId.MergeFrom(other.EntityId); } if (other.RoomNumber.Length != 0) { RoomNumber = other.RoomNumber; } if (other.Description.Length != 0) { Description = other.Description; } if (other.AdditionalDescription.Length != 0) { AdditionalDescription = other.AdditionalDescription; } if (other.NightsOccupiedCounter != 0) { NightsOccupiedCounter = other.NightsOccupiedCounter; } if (other.lastCleanedAt_ != null) { if (lastCleanedAt_ == null) { lastCleanedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } LastCleanedAt.MergeFrom(other.LastCleanedAt); } if (other.OccupancyState != 0) { OccupancyState = other.OccupancyState; } if (other.MaintenanceState != 0) { MaintenanceState = other.MaintenanceState; } if (other.MaintenanceRequest != 0) { MaintenanceRequest = other.MaintenanceRequest; } if (other.roomTypeId_ != null) { if (roomTypeId_ == null) { roomTypeId_ = new global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator(); } RoomTypeId.MergeFrom(other.RoomTypeId); } if (other.RoomTypeName.Length != 0) { RoomTypeName = other.RoomTypeName; } if (other.connectedRoom_ != null) { if (connectedRoom_ == null) { connectedRoom_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator(); } ConnectedRoom.MergeFrom(other.ConnectedRoom); } if (other.TrunkId.Length != 0) { TrunkId = other.TrunkId; } if (other.occupyingReservation_ != null) { if (occupyingReservation_ == null) { occupyingReservation_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator(); } OccupyingReservation.MergeFrom(other.OccupyingReservation); } if (other.KcrRoomNumber.Length != 0) { KcrRoomNumber = other.KcrRoomNumber; } if (other.RoomStatusCode.Length != 0) { RoomStatusCode = other.RoomStatusCode; } if (other.roomStatus_ != null) { if (roomStatus_ == null) { roomStatus_ = new global::HOLMS.Types.TenancyConfig.RoomStatus(); } RoomStatus.MergeFrom(other.RoomStatus); } if (other.markedDirtyAt_ != null) { if (markedDirtyAt_ == null) { markedDirtyAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } MarkedDirtyAt.MergeFrom(other.MarkedDirtyAt); } if (other.IsLeftDirty != false) { IsLeftDirty = other.IsLeftDirty; } }