/// <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 (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                if (HostName != null)
                {
                    hashCode = hashCode * 59 + HostName.GetHashCode();
                }

                hashCode = hashCode * 59 + Port.GetHashCode();

                hashCode = hashCode * 59 + IsLdaps.GetHashCode();
                if (Account != null)
                {
                    hashCode = hashCode * 59 + Account.GetHashCode();
                }
                if (BaseDn != null)
                {
                    hashCode = hashCode * 59 + BaseDn.GetHashCode();
                }
                if (LdapAttributes != null)
                {
                    hashCode = hashCode * 59 + LdapAttributes.GetHashCode();
                }
                return(hashCode);
            }
        }
        /// <summary>
        /// Returns true if LdapAuthenticationModeSubmit instances are equal
        /// </summary>
        /// <param name="other">Instance of LdapAuthenticationModeSubmit to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LdapAuthenticationModeSubmit other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Uuid == other.Uuid ||
                     Uuid != null &&
                     Uuid.Equals(other.Uuid)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     HostName == other.HostName ||
                     HostName != null &&
                     HostName.Equals(other.HostName)
                 ) &&
                 (
                     Port == other.Port ||

                     Port.Equals(other.Port)
                 ) &&
                 (
                     IsLdaps == other.IsLdaps ||

                     IsLdaps.Equals(other.IsLdaps)
                 ) &&
                 (
                     Account == other.Account ||
                     Account != null &&
                     Account.Equals(other.Account)
                 ) &&
                 (
                     Password == other.Password ||
                     Password != null &&
                     Password.Equals(other.Password)
                 ) &&
                 (
                     BaseDn == other.BaseDn ||
                     BaseDn != null &&
                     BaseDn.Equals(other.BaseDn)
                 ) &&
                 (
                     LdapAttributes == other.LdapAttributes ||
                     LdapAttributes != null &&
                     other.LdapAttributes != null &&
                     LdapAttributes.SequenceEqual(other.LdapAttributes)
                 ));
        }
        /// <summary>
        /// Returns true if SecurityContractDefaultConfigurationLdapAuthMode instances are equal
        /// </summary>
        /// <param name="other">Instance of SecurityContractDefaultConfigurationLdapAuthMode to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SecurityContractDefaultConfigurationLdapAuthMode other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     HostName == other.HostName ||
                     HostName != null &&
                     HostName.Equals(other.HostName)
                 ) &&
                 (
                     Port == other.Port ||

                     Port.Equals(other.Port)
                 ) &&
                 (
                     IsLdaps == other.IsLdaps ||

                     IsLdaps.Equals(other.IsLdaps)
                 ) &&
                 (
                     Account == other.Account ||
                     Account != null &&
                     Account.Equals(other.Account)
                 ) &&
                 (
                     BaseDn == other.BaseDn ||
                     BaseDn != null &&
                     BaseDn.Equals(other.BaseDn)
                 ) &&
                 (
                     LdapAttributes == other.LdapAttributes ||
                     LdapAttributes != null &&
                     other.LdapAttributes != null &&
                     LdapAttributes.SequenceEqual(other.LdapAttributes)
                 ));
        }