// UnmarshalMsg implements msgp.Unmarshaler
func (z *A) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var xvk uint32
	xvk, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for xvk > 0 {
		xvk--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "BirthDay":
			z.BirthDay, bts, err = msgp.ReadTimeBytes(bts)
			if err != nil {
				return
			}
		case "Phone":
			z.Phone, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Siblings":
			z.Siblings, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Spouse":
			z.Spouse, bts, err = msgp.ReadBoolBytes(bts)
			if err != nil {
				return
			}
		case "Money":
			z.Money, bts, err = msgp.ReadFloat64Bytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 2
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Date) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Year":
			z.Year, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Month":
			z.Month, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Day":
			z.Day, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 3
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *ColorGroup) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "id":
			z.Id, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "colors":
			var xsz uint32
			xsz, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.Colors) >= int(xsz) {
				z.Colors = z.Colors[:xsz]
			} else {
				z.Colors = make([]string, xsz)
			}
			for xvk := range z.Colors {
				z.Colors[xvk], bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 4
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *bitmapContainer) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zcmr uint32
	zcmr, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for zcmr > 0 {
		zcmr--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "cardinality":
			z.cardinality, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "bitmap":
			var zajw uint32
			zajw, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.bitmap) >= int(zajw) {
				z.bitmap = (z.bitmap)[:zajw]
			} else {
				z.bitmap = make([]uint64, zajw)
			}
			for zxvk := range z.bitmap {
				z.bitmap[zxvk], bts, err = msgp.ReadUint64Bytes(bts)
				if err != nil {
					return
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 5
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Packet) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "type":
			z.pType, bts, err = msgp.ReadByteBytes(bts)
			if err != nil {
				return
			}
		case "id":
			z.id, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "event":
			z.eventName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "payload":
			z.payload, bts, err = msgp.ReadBytesBytes(bts, z.payload)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 6
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Attribute) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var bzg uint32
	bzg, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for bzg > 0 {
		bzg--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Id":
			z.Id, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Value":
			z.Value, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 7
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *EventHeader) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "message_id":
			z.Id, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "v":
			z.Version, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "response_to":
			z.ResponseTo, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 8
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *MetricDefinition) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Id":
			z.Id, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "OrgId":
			z.OrgId, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Metric":
			z.Metric, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Interval":
			z.Interval, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Unit":
			z.Unit, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "TargetType":
			z.TargetType, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Tags":
			var xsz uint32
			xsz, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.Tags) >= int(xsz) {
				z.Tags = z.Tags[:xsz]
			} else {
				z.Tags = make([]string, xsz)
			}
			for hct := range z.Tags {
				z.Tags[hct], bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			}
		case "LastUpdate":
			z.LastUpdate, bts, err = msgp.ReadInt64Bytes(bts)
			if err != nil {
				return
			}
		case "Nodes":
			var msz uint32
			msz, bts, err = msgp.ReadMapHeaderBytes(bts)
			if err != nil {
				return
			}
			if z.Nodes == nil && msz > 0 {
				z.Nodes = make(map[string]string, msz)
			} else if len(z.Nodes) > 0 {
				for key, _ := range z.Nodes {
					delete(z.Nodes, key)
				}
			}
			for msz > 0 {
				var cua string
				var xhx string
				msz--
				cua, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
				xhx, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
				z.Nodes[cua] = xhx
			}
		case "NodeCount":
			z.NodeCount, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 9
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *MetricData) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "OrgId":
			z.OrgId, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Name":
			z.Name, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Metric":
			z.Metric, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Interval":
			z.Interval, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Value":
			z.Value, bts, err = msgp.ReadFloat64Bytes(bts)
			if err != nil {
				return
			}
		case "Unit":
			z.Unit, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Time":
			z.Time, bts, err = msgp.ReadInt64Bytes(bts)
			if err != nil {
				return
			}
		case "TargetType":
			z.TargetType, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Tags":
			var xsz uint32
			xsz, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.Tags) >= int(xsz) {
				z.Tags = z.Tags[:xsz]
			} else {
				z.Tags = make([]string, xsz)
			}
			for xvk := range z.Tags {
				z.Tags[xvk], bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 10
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Car) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var lqf uint32
	lqf, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for lqf > 0 {
		lqf--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "CarId":
			z.CarId, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "CarName":
			z.CarName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Attributes":
			var daf uint32
			daf, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.Attributes) >= int(daf) {
				z.Attributes = z.Attributes[:daf]
			} else {
				z.Attributes = make([]Attribute, daf)
			}
			for bai := range z.Attributes {
				var pks uint32
				pks, bts, err = msgp.ReadMapHeaderBytes(bts)
				if err != nil {
					return
				}
				for pks > 0 {
					pks--
					field, bts, err = msgp.ReadMapKeyZC(bts)
					if err != nil {
						return
					}
					switch msgp.UnsafeString(field) {
					case "Id":
						z.Attributes[bai].Id, bts, err = msgp.ReadIntBytes(bts)
						if err != nil {
							return
						}
					case "Name":
						z.Attributes[bai].Name, bts, err = msgp.ReadStringBytes(bts)
						if err != nil {
							return
						}
					case "Value":
						z.Attributes[bai].Value, bts, err = msgp.ReadStringBytes(bts)
						if err != nil {
							return
						}
					default:
						bts, err = msgp.Skip(bts)
						if err != nil {
							return
						}
					}
				}
			}
		case "FlagMap":
			var jfb uint32
			jfb, bts, err = msgp.ReadMapHeaderBytes(bts)
			if err != nil {
				return
			}
			if z.FlagMap == nil && jfb > 0 {
				z.FlagMap = make(map[string]string, jfb)
			} else if len(z.FlagMap) > 0 {
				for key, _ := range z.FlagMap {
					delete(z.FlagMap, key)
				}
			}
			for jfb > 0 {
				var cmr string
				var ajw string
				jfb--
				cmr, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
				ajw, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
				z.FlagMap[cmr] = ajw
			}
		case "Ttl":
			z.Ttl, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 11
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *bitmapContainerShortIterator) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zlqf uint32
	zlqf, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for zlqf > 0 {
		zlqf--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "ptr":
			if msgp.IsNil(bts) {
				bts, err = msgp.ReadNilBytes(bts)
				if err != nil {
					return
				}
				z.ptr = nil
			} else {
				if z.ptr == nil {
					z.ptr = new(bitmapContainer)
				}
				var zdaf uint32
				zdaf, bts, err = msgp.ReadMapHeaderBytes(bts)
				if err != nil {
					return
				}
				for zdaf > 0 {
					zdaf--
					field, bts, err = msgp.ReadMapKeyZC(bts)
					if err != nil {
						return
					}
					switch msgp.UnsafeString(field) {
					case "cardinality":
						z.ptr.cardinality, bts, err = msgp.ReadIntBytes(bts)
						if err != nil {
							return
						}
					case "bitmap":
						var zpks uint32
						zpks, bts, err = msgp.ReadArrayHeaderBytes(bts)
						if err != nil {
							return
						}
						if cap(z.ptr.bitmap) >= int(zpks) {
							z.ptr.bitmap = (z.ptr.bitmap)[:zpks]
						} else {
							z.ptr.bitmap = make([]uint64, zpks)
						}
						for zwht := range z.ptr.bitmap {
							z.ptr.bitmap[zwht], bts, err = msgp.ReadUint64Bytes(bts)
							if err != nil {
								return
							}
						}
					default:
						bts, err = msgp.Skip(bts)
						if err != nil {
							return
						}
					}
				}
			}
		case "i":
			z.i, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 12
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *ServerResponse) UnmarshalMsg(bts []byte) (o []byte, err error) {
	{
		var ssz uint32
		ssz, bts, err = msgp.ReadArrayHeaderBytes(bts)
		if err != nil {
			return
		}
		if ssz != 3 {
			err = msgp.ArrayError{Wanted: 3, Got: ssz}
			return
		}
	}
	if msgp.IsNil(bts) {
		bts, err = msgp.ReadNilBytes(bts)
		if err != nil {
			return
		}
		z.Header = nil
	} else {
		if z.Header == nil {
			z.Header = new(EventHeader)
		}
		var field []byte
		_ = field
		var isz uint32
		isz, bts, err = msgp.ReadMapHeaderBytes(bts)
		if err != nil {
			return
		}
		for isz > 0 {
			isz--
			field, bts, err = msgp.ReadMapKeyZC(bts)
			if err != nil {
				return
			}
			switch msgp.UnsafeString(field) {
			case "message_id":
				z.Header.Id, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			case "v":
				z.Header.Version, bts, err = msgp.ReadIntBytes(bts)
				if err != nil {
					return
				}
			case "response_to":
				z.Header.ResponseTo, bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			default:
				bts, err = msgp.Skip(bts)
				if err != nil {
					return
				}
			}
		}
	}
	z.Name, bts, err = msgp.ReadStringBytes(bts)
	if err != nil {
		return
	}
	var xsz uint32
	xsz, bts, err = msgp.ReadArrayHeaderBytes(bts)
	if err != nil {
		return
	}
	if cap(z.Params) >= int(xsz) {
		z.Params = z.Params[:xsz]
	} else {
		z.Params = make([]interface{}, xsz)
	}
	for bzg := range z.Params {
		z.Params[bzg], bts, err = msgp.ReadIntfBytes(bts)
		if err != nil {
			return
		}
	}
	o = bts
	return
}
Exemplo n.º 13
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Event) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "id":
			z.Id, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "user":
			var isz uint32
			isz, bts, err = msgp.ReadMapHeaderBytes(bts)
			if err != nil {
				return
			}
			for isz > 0 {
				isz--
				field, bts, err = msgp.ReadMapKeyZC(bts)
				if err != nil {
					return
				}
				switch msgp.UnsafeString(field) {
				case "first":
					z.User.First, bts, err = msgp.ReadStringBytes(bts)
					if err != nil {
						return
					}
				case "last":
					z.User.Last, bts, err = msgp.ReadStringBytes(bts)
					if err != nil {
						return
					}
				default:
					bts, err = msgp.Skip(bts)
					if err != nil {
						return
					}
				}
			}
		case "flight":
			z.Flight, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "pilot":
			var xsz uint32
			xsz, bts, err = msgp.ReadArrayHeaderBytes(bts)
			if err != nil {
				return
			}
			if cap(z.Pilot) >= int(xsz) {
				z.Pilot = z.Pilot[:xsz]
			} else {
				z.Pilot = make([]string, xsz)
			}
			for xvk := range z.Pilot {
				z.Pilot[xvk], bts, err = msgp.ReadStringBytes(bts)
				if err != nil {
					return
				}
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}
Exemplo n.º 14
0
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Incident) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "event_name":
			z.EventName, bts, err = msgp.ReadBytesBytes(bts, z.EventName)
			if err != nil {
				return
			}
		case "time":
			z.Time, bts, err = msgp.ReadInt64Bytes(bts)
			if err != nil {
				return
			}
		case "id":
			z.Id, bts, err = msgp.ReadInt64Bytes(bts)
			if err != nil {
				return
			}
		case "active":
			z.Active, bts, err = msgp.ReadBoolBytes(bts)
			if err != nil {
				return
			}
		case "escalation":
			z.Escalation, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "description":
			z.Description, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "policy":
			z.Policy, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				return
			}
		case "Status":
			z.Status, bts, err = msgp.ReadIntBytes(bts)
			if err != nil {
				return
			}
		case "Event":
			bts, err = z.Event.UnmarshalMsg(bts)
			if err != nil {
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				return
			}
		}
	}
	o = bts
	return
}