// FnEquals resolves the 'Fn::Equals' AWS CloudFormation intrinsic function.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-equals
541635
func FnEquals(name string, input interface{}, template interface{}) interface{} {
	// "Fn::Equals" : ["value_1", "value_2"]

	// Check the input is an array
	if arr, ok := input.([]interface{}); ok {
		if len(arr) != 2 {
			return nil
		}

		return reflect.DeepEqual(arr[0], arr[1])
	}

	return nil
}
998835
func AutoGenerateObjectIDIfNotExistEqual(o1, o2 *AutoGenerateObjectIDIfNotExistOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1234671
func (m *MenuEntry) IsEqual(inme *MenuEntry) bool {
	return m.hopefullyUniqueID() == inme.hopefullyUniqueID() && m.Parent == inme.Parent
}
61723
func (br *BytesRef) bytesEquals(other []byte) bool {
	if br.Length != len(other) {
		return false
	}
	for i, v := range br.ToBytes() {
		if v != other[i] {
			return false
		}
	}
	return true
}
499616
func SelectEqual(v string) func(string) bool {
	return func(p string) bool {
		return v == p
	}
}
437255
func (f Filter) GreaterThanOrEqual(val interface{}) Filter {
	f.Op = ">="
	f.Val = val
	return f
}
1084598
func (p *aeBackupKindQueryProperty) LessThanOrEqual(value interface{}) *aeBackupKindQueryBuilder {
	p.bldr.q = p.bldr.q.Filter(p.name+" <=", value)
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, "<=", value)
	}
	return p.bldr
}
100554
func (p *aeBackupInformationQueryProperty) LessThanOrEqual(value interface{}) *aeBackupInformationQueryBuilder {
	p.bldr.q = p.bldr.q.Filter(p.name+" <=", value)
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, "<=", value)
	}
	return p.bldr
}
1203554
func NumericFiltersEqual(o1, o2 *NumericFiltersOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1005220
func (q1 Quat) ApproxEqualFunc(q2 Quat, f func(float32, float32) bool) bool {
	return f(q1.W, q2.W) && q1.V.ApproxFuncEqual(q2.V, f)
}
1191085
func validateEqualArgs(expected, actual interface{}) error {
	if isFunction(expected) || isFunction(actual) {
		return errors.New("cannot take func type as argument")
	}
	return nil
}
1162700
func (v *TypeReference) Equals(rhs *TypeReference) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !(v.Name == rhs.Name) {
		return false
	}
	if !(v.ImportPath == rhs.ImportPath) {
		return false
	}
	if !((v.Annotations == nil && rhs.Annotations == nil) || (v.Annotations != nil && rhs.Annotations != nil && _Map_String_String_Equals(v.Annotations, rhs.Annotations))) {
		return false
	}

	return true
}
484992
func typeEqual(t1, t2 confType) bool {
	if t1 == nil || t2 == nil {
		return false
	}
	return t1.typeString() == t2.typeString()
}
696574
func ErrorEqual(err1, err2 error) bool {
	e1 := errors.Cause(err1)
	e2 := errors.Cause(err2)

	if e1 == e2 {
		return true
	}

	if e1 == nil || e2 == nil {
		return e1 == e2
	}

	te1, ok1 := e1.(*Error)
	te2, ok2 := e2.(*Error)
	if ok1 && ok2 {
		return te1.class == te2.class && te1.code == te2.code
	}

	return e1.Error() == e2.Error()
}
189058
func TitleEquals(tab *Tab, equalsTitle string) ConditionalFunc {
	return func(tab *Tab) bool {
		if pageTitle, err := tab.GetTitle(); err == nil && pageTitle == equalsTitle {
			return true
		}
		return false
	}
}
336052
func (f F) Equal(g F) bool {
	if len(f.Zones) != len(g.Zones) {
		return false
	}
	for i := range f.Zones {
		if f.Zones[i] != g.Zones[i] {
			return false
		}
	}
	return true
}
61100
func (self FloatEqualer) Equal(e Equaler) bool {
	return self.F == e.(FloatEqualer).F
}