// Code generated by github.com/tinylib/msgp DO NOT EDIT.

package tracer

import (
	"github.com/tinylib/msgp/msgp"
)

// DecodeMsg implements msgp.Decodable
func (z *otelProcessContext) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, err = dc.ReadMapHeader()
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "deployment.environment.name":
			z.DeploymentEnvironmentName, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "DeploymentEnvironmentName")
				return
			}
		case "host.name":
			z.HostName, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "HostName")
				return
			}
		case "service.instance.id":
			z.ServiceInstanceID, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "ServiceInstanceID")
				return
			}
		case "service.name":
			z.ServiceName, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "ServiceName")
				return
			}
		case "service.version":
			z.ServiceVersion, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "ServiceVersion")
				return
			}
		case "telemetry.sdk.language":
			z.TelemetrySDKLanguage, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySDKLanguage")
				return
			}
		case "telemetry.sdk.version":
			z.TelemetrySDKVersion, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySDKVersion")
				return
			}
		case "telemetry.sdk.name":
			z.TelemetrySdkName, err = dc.ReadString()
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySdkName")
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	return
}

// EncodeMsg implements msgp.Encodable
func (z *otelProcessContext) EncodeMsg(en *msgp.Writer) (err error) {
	// map header, size 8
	// write "deployment.environment.name"
	err = en.Append(0x88, 0xbb, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.DeploymentEnvironmentName)
	if err != nil {
		err = msgp.WrapError(err, "DeploymentEnvironmentName")
		return
	}
	// write "host.name"
	err = en.Append(0xa9, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.HostName)
	if err != nil {
		err = msgp.WrapError(err, "HostName")
		return
	}
	// write "service.instance.id"
	err = en.Append(0xb3, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x69, 0x64)
	if err != nil {
		return
	}
	err = en.WriteString(z.ServiceInstanceID)
	if err != nil {
		err = msgp.WrapError(err, "ServiceInstanceID")
		return
	}
	// write "service.name"
	err = en.Append(0xac, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.ServiceName)
	if err != nil {
		err = msgp.WrapError(err, "ServiceName")
		return
	}
	// write "service.version"
	err = en.Append(0xaf, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	if err != nil {
		return
	}
	err = en.WriteString(z.ServiceVersion)
	if err != nil {
		err = msgp.WrapError(err, "ServiceVersion")
		return
	}
	// write "telemetry.sdk.language"
	err = en.Append(0xb6, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.TelemetrySDKLanguage)
	if err != nil {
		err = msgp.WrapError(err, "TelemetrySDKLanguage")
		return
	}
	// write "telemetry.sdk.version"
	err = en.Append(0xb5, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	if err != nil {
		return
	}
	err = en.WriteString(z.TelemetrySDKVersion)
	if err != nil {
		err = msgp.WrapError(err, "TelemetrySDKVersion")
		return
	}
	// write "telemetry.sdk.name"
	err = en.Append(0xb2, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	if err != nil {
		return
	}
	err = en.WriteString(z.TelemetrySdkName)
	if err != nil {
		err = msgp.WrapError(err, "TelemetrySdkName")
		return
	}
	return
}

// MarshalMsg implements msgp.Marshaler
func (z *otelProcessContext) MarshalMsg(b []byte) (o []byte, err error) {
	o = msgp.Require(b, z.Msgsize())
	// map header, size 8
	// string "deployment.environment.name"
	o = append(o, 0x88, 0xbb, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.DeploymentEnvironmentName)
	// string "host.name"
	o = append(o, 0xa9, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.HostName)
	// string "service.instance.id"
	o = append(o, 0xb3, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x69, 0x64)
	o = msgp.AppendString(o, z.ServiceInstanceID)
	// string "service.name"
	o = append(o, 0xac, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.ServiceName)
	// string "service.version"
	o = append(o, 0xaf, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	o = msgp.AppendString(o, z.ServiceVersion)
	// string "telemetry.sdk.language"
	o = append(o, 0xb6, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65)
	o = msgp.AppendString(o, z.TelemetrySDKLanguage)
	// string "telemetry.sdk.version"
	o = append(o, 0xb5, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e)
	o = msgp.AppendString(o, z.TelemetrySDKVersion)
	// string "telemetry.sdk.name"
	o = append(o, 0xb2, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65)
	o = msgp.AppendString(o, z.TelemetrySdkName)
	return
}

// UnmarshalMsg implements msgp.Unmarshaler
func (z *otelProcessContext) UnmarshalMsg(bts []byte) (o []byte, err error) {
	var field []byte
	_ = field
	var zb0001 uint32
	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
	if err != nil {
		err = msgp.WrapError(err)
		return
	}
	for zb0001 > 0 {
		zb0001--
		field, bts, err = msgp.ReadMapKeyZC(bts)
		if err != nil {
			err = msgp.WrapError(err)
			return
		}
		switch msgp.UnsafeString(field) {
		case "deployment.environment.name":
			z.DeploymentEnvironmentName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "DeploymentEnvironmentName")
				return
			}
		case "host.name":
			z.HostName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "HostName")
				return
			}
		case "service.instance.id":
			z.ServiceInstanceID, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "ServiceInstanceID")
				return
			}
		case "service.name":
			z.ServiceName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "ServiceName")
				return
			}
		case "service.version":
			z.ServiceVersion, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "ServiceVersion")
				return
			}
		case "telemetry.sdk.language":
			z.TelemetrySDKLanguage, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySDKLanguage")
				return
			}
		case "telemetry.sdk.version":
			z.TelemetrySDKVersion, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySDKVersion")
				return
			}
		case "telemetry.sdk.name":
			z.TelemetrySdkName, bts, err = msgp.ReadStringBytes(bts)
			if err != nil {
				err = msgp.WrapError(err, "TelemetrySdkName")
				return
			}
		default:
			bts, err = msgp.Skip(bts)
			if err != nil {
				err = msgp.WrapError(err)
				return
			}
		}
	}
	o = bts
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *otelProcessContext) Msgsize() (s int) {
	s = 1 + 28 + msgp.StringPrefixSize + len(z.DeploymentEnvironmentName) + 10 + msgp.StringPrefixSize + len(z.HostName) + 20 + msgp.StringPrefixSize + len(z.ServiceInstanceID) + 13 + msgp.StringPrefixSize + len(z.ServiceName) + 16 + msgp.StringPrefixSize + len(z.ServiceVersion) + 23 + msgp.StringPrefixSize + len(z.TelemetrySDKLanguage) + 22 + msgp.StringPrefixSize + len(z.TelemetrySDKVersion) + 19 + msgp.StringPrefixSize + len(z.TelemetrySdkName)
	return
}
