// UnmarshalJSON initializes the primitive type from
// a JSON string.
501396
func (t *PrimitiveType) UnmarshalJSON(data []byte) error {
	var s string
	if err := json.Unmarshal(data, &s); err != nil {
		return err
	}
	x, err := primitiveFromString(string(data))
	if err != nil {
		return err
	}
	*t = x
	return nil
}
128554
func (self *MapTypeDef) UnmarshalJSON(b []byte) error {
	var m rawMapTypeDef
	err := json.Unmarshal(b, &m)
	if err == nil {
		o := MapTypeDef(m)
		*self = *((&o).Init())
		err = self.Validate()
	}
	return err
}
527109
func (e *StrSlice) UnmarshalJSON(b []byte) error {
	if len(b) == 0 {
		// With no input, we preserve the existing value by returning nil and
		// leaving the target alone. This allows defining default values for
		// the type.
		return nil
	}

	p := make([]string, 0, 1)
	if err := json.Unmarshal(b, &p); err != nil {
		var s string
		if err := json.Unmarshal(b, &s); err != nil {
			return err
		}
		p = append(p, s)
	}

	*e = p
	return nil
}
955952
func (self *StringTypeDef) UnmarshalJSON(b []byte) error {
	var m rawStringTypeDef
	err := json.Unmarshal(b, &m)
	if err == nil {
		o := StringTypeDef(m)
		*self = o
		err = self.Validate()
	}
	return err
}
864468
func (s *SamplePair) UnmarshalJSON(b []byte) error {
	v := [...]json.Unmarshaler{&s.Timestamp, &s.Value}
	return json.Unmarshal(b, &v)
}
1364342
func (pTypeDef *MapArrayTest) UnmarshalJSON(b []byte) error {
	var r rawMapArrayTest
	err := json.Unmarshal(b, &r)
	if err == nil {
		o := MapArrayTest(r)
		*pTypeDef = *((&o).Init())
		err = pTypeDef.Validate()
	}
	return err
}
215651
func (k *Kind) UnmarshalJSON(b []byte) error {
	var s string
	if err := json.Unmarshal(b, &s); err != nil {
		return err
	}

	*k = ParseKind(s)
	return nil
}
978038
func (v *ClientInfo) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCce3d1beDecodeGithubComMailgunMailgunGoEvents8(&r, v)
	return r.Error()
}
1188998
func (ua *Uint64Array) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		ua.Valid = false
		return nil
	}
	if data == nil {
		ua.Uint64Array, ua.Valid = nil, false
		return nil
	}
	ua.Valid = true
	return json.Unmarshal(data, &ua.Uint64Array)
}
580027
func (pTypeDef *NegativeNumberTest) UnmarshalJSON(b []byte) error {
	var r rawNegativeNumberTest
	err := json.Unmarshal(b, &r)
	if err == nil {
		o := NegativeNumberTest(r)
		*pTypeDef = o
		err = pTypeDef.Validate()
	}
	return err
}
77297
func (o *InstanceTemplate) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realInstanceTemplate
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = InstanceTemplate(r)
	return nil
}
276561
func (t *TraceV1) UnmarshalJSON(b []byte) error {
	*t = TraceV1(b[:])
	return nil
}
469494
func (u *UUID) UnmarshalJSON(data []byte) error {
	return u.ReadBytes(data[1 : len(data)-1])
}
392815
func (r *ComponentStatus) UnmarshalJSON(data []byte) error {
	var s string
	if err := json.Unmarshal(data, &s); err != nil {
		return fmt.Errorf("ComponentStatus should be a string, got %s", data)
	}
	v, ok := _ComponentStatusNameToValue[s]
	if !ok {
		return fmt.Errorf("invalid ComponentStatus %q", s)
	}
	*r = v
	return nil
}
553829
func (e *BaseType) UnmarshalJSON(b []byte) error {
	var j string
	err := json.Unmarshal(b, &j)
	if err == nil {
		s := string(j)
		for v, s2 := range namesBaseType {
			if s == s2 {
				*e = BaseType(v)
				return nil
			}
		}
		err = fmt.Errorf("Bad enum symbol for type BaseType: %s", s)
	}
	return err
}
12440
func (v *Complained) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents15(&r, v)
	return r.Error()
}
319004
func (v *InputAnnotation) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat5(&r, v)
	return r.Error()
}