/// <summary> /// Initializes a new instance of the <see cref="AllRequestTypesExample" /> class. /// Initializes a new instance of the <see cref="AllRequestTypesExample" />class. /// </summary> /// <param name="OpTypes">OpTypes.</param> /// <param name="Heartbeat">Heartbeat.</param> /// <param name="OrderSubscriptionMessage">OrderSubscriptionMessage.</param> /// <param name="MarketSubscription">MarketSubscription.</param> /// <param name="Authentication">Authentication.</param> public AllRequestTypesExample( OpTypesEnum?OpTypes = null, HeartbeatMessage Heartbeat = null, OrderSubscriptionMessage OrderSubscriptionMessage = null, MarketSubscriptionMessage MarketSubscription = null, AuthenticationMessage Authentication = null) { this.OpTypes = OpTypes; this.Heartbeat = Heartbeat; this.OrderSubscriptionMessage = OrderSubscriptionMessage; this.MarketSubscription = MarketSubscription; this.Authentication = Authentication; }
/// <summary> /// Returns true if AllRequestTypesExample instances are equal /// </summary> /// <param name="other">Instance of AllRequestTypesExample to be compared</param> /// <returns>Boolean</returns> public bool Equals(AllRequestTypesExample other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return((OpTypes == other.OpTypes || OpTypes != null && OpTypes.Equals(other.OpTypes)) && (Heartbeat == other.Heartbeat || Heartbeat != null && Heartbeat.Equals(other.Heartbeat)) && (OrderSubscriptionMessage == other.OrderSubscriptionMessage || OrderSubscriptionMessage != null && OrderSubscriptionMessage.Equals(other.OrderSubscriptionMessage)) && (MarketSubscription == other.MarketSubscription || MarketSubscription != null && MarketSubscription.Equals(other.MarketSubscription)) && (Authentication == other.Authentication || Authentication != null && Authentication.Equals(other.Authentication))); }
/// <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 { var hash = 41; // Suitable nullity checks etc, of course :) if (OpTypes != null) { hash = hash * 59 + OpTypes.GetHashCode(); } if (Heartbeat != null) { hash = hash * 59 + Heartbeat.GetHashCode(); } if (OrderSubscriptionMessage != null) { hash = hash * 59 + OrderSubscriptionMessage.GetHashCode(); } if (MarketSubscription != null) { hash = hash * 59 + MarketSubscription.GetHashCode(); } if (Authentication != null) { hash = hash * 59 + Authentication.GetHashCode(); } return(hash); } }