// Equal Checks for deep equality
512144
func (m *FilterSelect) Equal(s *FilterSelect) bool {
	if m == nil && s == nil {
		return true
	}
	if m == nil && s != nil {
		return false
	}
	if m != nil && s == nil {
		return false
	}
	if !m.Columns.Equal(s.Columns) {
		return false
	}
	mfs := m.FilterStatement
	if mfs != nil {
		sfs := s.FilterStatement
		if !mfs.Equal(sfs) {
			return false
		}
	}
	return true
}
145552
func (v Var) Equal(other Value) bool {
	switch other := other.(type) {
	case Var:
		return v == other
	default:
		return false
	}
}
604508
func (o *UserTokenOption) Equal(o2 *UserTokenOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
236556
func (c CurrSymbol) Equal(o CurrSymbol) bool {
	return c.String() == o.String()
}
398146
func (o *MaxFacetHitsOption) Equal(o2 *MaxFacetHitsOption) bool {
	if o2 == nil {
		return o.value == 10
	}
	return o.value == o2.value
}
96756
func (a *AttributeTypeAndValue) Equal(other *AttributeTypeAndValue) bool {
	return strings.EqualFold(a.Type, other.Type) && a.Value == other.Value
}
488907
func (o *SortFacetValuesByOption) Equal(o2 *SortFacetValuesByOption) bool {
	if o2 == nil {
		return o.value == "count"
	}
	return o.value == o2.value
}
232028
func (self StringEqualer) Equal(e Equaler) bool {
	return self.S == e.(StringEqualer).S
}
134140
func (s *String) Equal(value string) *String {
	if !(s.value == value) {
		s.chain.fail("\nexpected string equal to:\n %q\n\nbut got:\n %q",
			value, s.value)
	}
	return s
}
411135
func Equal(left Value, right Value) bool {
	// TODO: Stop-gap for now, this will need to be much more sophisticated.
	return CoerceString(left) == CoerceString(right)
}
918823
func (s *OutputState) Equal(other *OutputState) bool {
	if s == nil && other == nil {
		return true
	}

	if s == nil || other == nil {
		return false
	}
	s.Lock()
	defer s.Unlock()

	if s.Type != other.Type {
		return false
	}

	if s.Sensitive != other.Sensitive {
		return false
	}

	if !reflect.DeepEqual(s.Value, other.Value) {
		return false
	}

	return true
}
528568
func (o *AnalyticsOption) Equal(o2 *AnalyticsOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
385221
func (o *RuleContextsOption) Equal(o2 *RuleContextsOption) bool {
	if o2 == nil {
		return reflect.DeepEqual(o.value, []string{})
	}
	return reflect.DeepEqual(o.value, o2.value)
}
766486
func (o *TypoToleranceOption) Equal(o2 *TypoToleranceOption) bool {
	if o2 == nil {
		return o.value == typoToleranceTrue
	}
	return o.value == o2.value
}
1346562
func Equal(u1 UUID, u2 UUID) bool {
	return bytes.Equal(u1[:], u2[:])
}
636682
func (o *EnablePersonalizationOption) Equal(o2 *EnablePersonalizationOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
245570
func Equal(a1, a2 interface{}) bool {
	if a1 == nil || a2 == nil {
		return a1 == a2
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}