/// <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 (AssetUrl != null) { hashCode = hashCode * 59 + AssetUrl.GetHashCode(); } if (ClientApiUrl != null) { hashCode = hashCode * 59 + ClientApiUrl.GetHashCode(); } if (ClientSessionId != null) { hashCode = hashCode * 59 + ClientSessionId.GetHashCode(); } if (CustomerId != null) { hashCode = hashCode * 59 + CustomerId.GetHashCode(); } if (InvalidTokens != null) { hashCode = hashCode * 59 + InvalidTokens.GetHashCode(); } if (Region != null) { hashCode = hashCode * 59 + Region.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if SessionResponse instances are equal /// </summary> /// <param name="other">Instance of SessionResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(SessionResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AssetUrl == other.AssetUrl || AssetUrl != null && AssetUrl.Equals(other.AssetUrl) ) && ( ClientApiUrl == other.ClientApiUrl || ClientApiUrl != null && ClientApiUrl.Equals(other.ClientApiUrl) ) && ( ClientSessionId == other.ClientSessionId || ClientSessionId != null && ClientSessionId.Equals(other.ClientSessionId) ) && ( CustomerId == other.CustomerId || CustomerId != null && CustomerId.Equals(other.CustomerId) ) && ( InvalidTokens == other.InvalidTokens || InvalidTokens != null && InvalidTokens.SequenceEqual(other.InvalidTokens) ) && ( Region == other.Region || Region != null && Region.Equals(other.Region) )); }