// Code generated by "libovsdb.modelgen"
// DO NOT EDIT.

package nbdb

import "github.com/ovn-org/libovsdb/model"

// Copp defines an object in Copp table
type Copp struct {
	UUID   string            `ovsdb:"_uuid"`
	Meters map[string]string `ovsdb:"meters"`
}

func copyCoppMeters(a map[string]string) map[string]string {
	if a == nil {
		return nil
	}
	b := make(map[string]string, len(a))
	for k, v := range a {
		b[k] = v
	}
	return b
}

func equalCoppMeters(a, b map[string]string) bool {
	if (a == nil) != (b == nil) {
		return false
	}
	if len(a) != len(b) {
		return false
	}
	for k, v := range a {
		if w, ok := b[k]; !ok || v != w {
			return false
		}
	}
	return true
}

func (a *Copp) DeepCopyInto(b *Copp) {
	*b = *a
	b.Meters = copyCoppMeters(a.Meters)
}

func (a *Copp) DeepCopy() *Copp {
	b := new(Copp)
	a.DeepCopyInto(b)
	return b
}

func (a *Copp) CloneModelInto(b model.Model) {
	c := b.(*Copp)
	a.DeepCopyInto(c)
}

func (a *Copp) CloneModel() model.Model {
	return a.DeepCopy()
}

func (a *Copp) Equals(b *Copp) bool {
	return a.UUID == b.UUID &&
		equalCoppMeters(a.Meters, b.Meters)
}

func (a *Copp) EqualsModel(b model.Model) bool {
	c := b.(*Copp)
	return a.Equals(c)
}

var _ model.CloneableModel = &Copp{}
var _ model.ComparableModel = &Copp{}
