// UnmarshalJSON implements json.Unmarshaler.
//
// Unmarshals a JSON entry into the underlying type. The entry is expected to
// contain a string corresponding to one of the enum's keys.
13329
func (t *Time) UnmarshalJSON(data []byte) error {
	var value time.Time
	if err := value.UnmarshalJSON(data); err != nil {
		return err
	}
	*t = Time(value.UTC())
	return nil
}
705730
func (j *JSONText) UnmarshalJSON(data []byte) error {
	if j == nil {
		return errors.New("JSONText: UnmarshalJSON on nil pointer")
	}
	*j = append((*j)[0:0], data...)
	return nil
}
566428
func (s *Source) UnmarshalJSON(data []byte) error {
	type source Source
	var v source
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	*s = Source(v)

	var raw map[string]interface{}
	if err := json.Unmarshal(data, &raw); err != nil {
		return err
	}

	if d, ok := raw[s.Type]; ok {
		if m, ok := d.(map[string]interface{}); ok {
			s.TypeData = m
		}
	}

	return nil
}
818804
func (v *InputSpanList) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat3(&r, v)
	return r.Error()
}
677034
func (v *Annotation) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson72863a49DecodeGithubComSignalfxGolibTraceFormat3(&r, v)
	return r.Error()
}
282199
func (r *rawBase64) UnmarshalJSON(b []byte) error {
	if len(b) > 1 && b[0] == '"' && b[len(b)-1] == '"' {
		b = b[1 : len(b)-1]
	}
	*r = rawBase64(b)
	return nil
}
192120
func (bz *HexBytes) UnmarshalJSON(data []byte) error {
	if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
		return fmt.Errorf("Invalid hex string: %s", data)
	}
	bz2, err := hex.DecodeString(string(data[1 : len(data)-1]))
	if err != nil {
		return err
	}
	*bz = bz2
	return nil
}
773632
func (o *Instance) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realInstance
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = Instance(r)
	return nil
}
1237418
func (v *InputSpan) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat4(&r, v)
	return r.Error()
}
1276512
func (v *Storage) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCce3d1beDecodeGithubComMailgunMailgunGoEvents(&r, v)
	return r.Error()
}
756300
func (f *Fields) UnmarshalJSON(b []byte) error {
	return json.Unmarshal(b, &f.Map)
}
218736
func (s *Subscription) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		s.ID = id
		return nil
	}

	type subscription Subscription
	var v subscription
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}

	*s = Subscription(v)
	return nil
}
882114
func (h *Hash) UnmarshalJSON(input []byte) error {
	return hexutil.UnmarshalFixedJSON(hashT, input, h[:])
}
815758
func (t *StreamType) UnmarshalJSON(data []byte) error {
	return StreamTypeFlagEnum.JSONUnmarshal(t, data)
}
73308
func (c *Client) UnmarshalJSON(b []byte) error {
	temp := struct {
		Config  Config   `json:"config"`
		Cluster *Cluster `json:"cluster"`
	}{}
	err := json.Unmarshal(b, &temp)
	if err != nil {
		return err
	}

	c.Cluster = temp.Cluster
	c.Config = temp.Config
	return nil
}
74776
func (s *JSONMapItem) UnmarshalJSON(data []byte) error {
	l := jlexer.Lexer{Data: data}
	s.UnmarshalEasyJSON(&l)
	return l.Error()
}
159097
func (self *EnumElementDef) UnmarshalJSON(b []byte) error {
	var m rawEnumElementDef
	err := json.Unmarshal(b, &m)
	if err == nil {
		o := EnumElementDef(m)
		*self = o
		err = self.Validate()
	}
	return err
}