// Equals returns true if all the fields of this HandshakeResponse match the
// provided HandshakeResponse.
//
// This function performs a deep comparison.
547723
func (v *HandshakeResponse) Equals(rhs *HandshakeResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !(v.Name == rhs.Name) {
		return false
	}
	if !(v.APIVersion == rhs.APIVersion) {
		return false
	}
	if !_List_Feature_Equals(v.Features, rhs.Features) {
		return false
	}
	if !_String_EqualsPtr(v.LibraryVersion, rhs.LibraryVersion) {
		return false
	}

	return true
}
88973
func (d *ResourceDevices) Equals(o *ResourceDevices) bool {
	if d == o {
		return true
	}
	if d == nil || o == nil {
		return false
	}
	if len(*d) != len(*o) {
		return false
	}
	m := make(map[string]*RequestedDevice, len(*d))
	for _, e := range *d {
		m[e.Name] = e
	}
	for _, oe := range *o {
		de, ok := m[oe.Name]
		if !ok || !de.Equals(oe) {
			return false
		}
	}
	return true
}
854744
func (v *ServiceGenerator_Generate_Args) Equals(rhs *ServiceGenerator_Generate_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}
1213949
func (s *Service) Equals(b *Service) bool {
	if s.ID != b.ID {
		return false
	}
	if s.Name != b.Name {
		return false
	}
	if s.Version != b.Version {
		return false
	}
	if !reflect.DeepEqual(s.Context, b.Context) {
		return false
	}
	if s.Startup != b.Startup {
		return false
	}
	if s.Description != b.Description {
		return false
	}
	if s.Instances != b.Instances {
		return false
	}
	if s.ImageID != b.ImageID {
		return false
	}
	if s.PoolID != b.PoolID {
		return false
	}
	if s.DesiredState != b.DesiredState {
		return false
	}
	if s.Launch != b.Launch {
		return false
	}
	if s.Hostname != b.Hostname {
		return false
	}
	if s.Privileged != b.Privileged {
		return false
	}
	if s.HostPolicy != b.HostPolicy {
		return false
	}
	if s.ParentServiceID != b.ParentServiceID {
		return false
	}
	if s.CreatedAt.Unix() != b.CreatedAt.Unix() {
		return false
	}
	if s.UpdatedAt.Unix() != b.UpdatedAt.Unix() {
		return false
	}
	return true
}
1317069
func (state State) Equals(state2 State) bool {
	sbz, s2bz := state.Bytes(), state2.Bytes()
	return bytes.Equal(sbz, s2bz)
}
328686
func (pk PubKeyMultisigThreshold) Equals(other crypto.PubKey) bool {
	otherKey, sameType := other.(PubKeyMultisigThreshold)
	if !sameType {
		return false
	}
	if pk.K != otherKey.K || len(pk.PubKeys) != len(otherKey.PubKeys) {
		return false
	}
	for i := 0; i < len(pk.PubKeys); i++ {
		if !pk.PubKeys[i].Equals(otherKey.PubKeys[i]) {
			return false
		}
	}
	return true
}
1335481
func (lhs UserId) Equals(rhs UserId) bool {
	return ((int64)(lhs) == (int64)(rhs))
}
952626
func (pstr *pstring) Equals(other pstring) bool {
	return pstr.string == other.string
}
888327
func (c SeqEnd) Equals(other core.DxfElement) bool {
	if otherSeqEnd, ok := other.(*SeqEnd); ok {
		return c.BaseEntity.Equals(otherSeqEnd.BaseEntity)
	}
	return false
}
961499
func (e Text) Equals(other core.DxfElement) bool {
	if otherText, ok := other.(*Text); ok {
		return e.BaseEntity.Equals(otherText.BaseEntity) &&
			core.FloatEquals(e.Thickness, otherText.Thickness) &&
			e.FirstAlignmentPoint.Equals(otherText.FirstAlignmentPoint) &&
			core.FloatEquals(e.Height, otherText.Height) &&
			e.Value == otherText.Value &&
			core.FloatEquals(e.Rotation, otherText.Rotation) &&
			core.FloatEquals(e.RelativeXScale, otherText.RelativeXScale) &&
			core.FloatEquals(e.ObliqueAngle, otherText.ObliqueAngle) &&
			e.StyleName == otherText.StyleName &&
			e.MirroredX == otherText.MirroredX &&
			e.MirroredY == otherText.MirroredY &&
			e.HorizontalJustification == otherText.HorizontalJustification &&
			e.SecondAlignmentPoint.Equals(otherText.SecondAlignmentPoint) &&
			e.ExtrusionDirection.Equals(otherText.ExtrusionDirection) &&
			e.VerticalJustification == otherText.VerticalJustification
	}
	return false
}
352211
func Equals(a, b error) bool {
	if a == nil && b == nil {
		// Both are nil.
		return true
	}

	if a == nil || b == nil {
		// One of the two is nil, since we know both are not nil.
		return false
	}

	return a.Error() == b.Error() && Code(a) == Code(b)
}
575344
func (privKey PrivKeySecp256k1) Equals(other crypto.PrivKey) bool {
	if otherSecp, ok := other.(PrivKeySecp256k1); ok {
		return subtle.ConstantTimeCompare(privKey[:], otherSecp[:]) == 1
	}
	return false
}
301397
func (v *Xtruct2) Equals(rhs *Xtruct2) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_Byte_EqualsPtr(v.ByteThing, rhs.ByteThing) {
		return false
	}
	if !((v.StructThing == nil && rhs.StructThing == nil) || (v.StructThing != nil && rhs.StructThing != nil && v.StructThing.Equals(rhs.StructThing))) {
		return false
	}
	if !_I32_EqualsPtr(v.I32Thing, rhs.I32Thing) {
		return false
	}

	return true
}
123645
func (m *MetadataValue) Equals(md MetadataValue) bool {
	return m.Type == md.Type && m.Value == md.Value
}
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
}
1025538
func (v *SinkRequest) Equals(rhs *SinkRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !(v.Message == rhs.Message) {
		return false
	}

	return true
}
1247444
func equals(a, b interface{}) bool {
	sameType := reflect.TypeOf(a) == reflect.TypeOf(b)
	if _, ok := a.([]byte); ok {
		if _, ok := b.([]byte); !ok {
			// panic(fmt.Sprintf("incomparable type: %v vs %v", a, b))
			return false
		}
		b1 := a.([]byte)
		b2 := b.([]byte)
		if len(b1) != len(b2) {
			return false
		}
		for i := 0; i < len(b1) && i < len(b2); i++ {
			if b1[i] != b2[i] {
				return false
			}
		}
		return true
	} else if _, ok := a.(int64); ok {
		if _, ok := b.(int64); !ok {
			// panic(fmt.Sprintf("incomparable type: %v vs %v", a, b))
			return false
		}
		return a.(int64) == b.(int64)
	} else if a == nil && b == nil {
		return true
	} else if sameType && a == b {
		return true
	}
	return false
}