// UnmarshalJSON implements conversion to JSON, supporting an alternate specification of the object as a string
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
}
1347772
func (t *JSONTime) UnmarshalJSON(buf []byte) error {
	s := bytes.Trim(buf, `"`)

	v, err := strconv.Atoi(string(s))
	if err != nil {
		return err
	}

	*t = JSONTime(int64(v))
	return nil
}
948159
func (r *Raw) UnmarshalJSON(data []byte) error {
	if r == nil {
		return errors.New("Raw: UnmarshalJSON on nil pointer")
	}
	*r = append((*r)[0:0], data...)
	return nil
}
412756
func (l *WAFRegionalByteMatchSetFieldToMatchList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := WAFRegionalByteMatchSetFieldToMatch{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = WAFRegionalByteMatchSetFieldToMatchList{item}
		return nil
	}
	list := []WAFRegionalByteMatchSetFieldToMatch{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = WAFRegionalByteMatchSetFieldToMatchList(list)
		return nil
	}
	return err
}
1160941
func (s *UUID) UnmarshalJSON(data []byte) error {
	var ss []string
	if err := json.Unmarshal(data, &ss); err != nil {
		return err
	}
	us, err := strSliceToUUIDSlice(ss)
	if err != nil {
		return errors.WithStack(err)
	}
	*s = us
	return nil
}
995811
func (resp *IndicesSyncedFlushResponse) UnmarshalJSON(data []byte) error {
	m := make(map[string]json.RawMessage)
	err := json.Unmarshal(data, &m)
	if err != nil {
		return err
	}
	resp.Index = make(map[string]*IndicesShardsSyncedFlushResult)
	for k, v := range m {
		if k == "_shards" {
			if err := json.Unmarshal(v, &resp.Shards); err != nil {
				return err
			}
		} else {
			ix := new(IndicesShardsSyncedFlushResult)
			if err := json.Unmarshal(v, &ix); err != nil {
				return err
			}
			resp.Index[k] = ix
		}
	}
	return nil
}
803494
func (l *EMRInstanceGroupConfigEbsConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := EMRInstanceGroupConfigEbsConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = EMRInstanceGroupConfigEbsConfigurationList{item}
		return nil
	}
	list := []EMRInstanceGroupConfigEbsConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = EMRInstanceGroupConfigEbsConfigurationList(list)
		return nil
	}
	return err
}
135845
func (v *BodySendFormatV2) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat7(&r, v)
	return r.Error()
}
477189
func (l *EMRClusterInstanceFleetProvisioningSpecificationsList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := EMRClusterInstanceFleetProvisioningSpecifications{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = EMRClusterInstanceFleetProvisioningSpecificationsList{item}
		return nil
	}
	list := []EMRClusterInstanceFleetProvisioningSpecifications{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = EMRClusterInstanceFleetProvisioningSpecificationsList(list)
		return nil
	}
	return err
}
1197964
func (vd *VolumeSnapshotDataList) UnmarshalJSON(data []byte) error {
	tmp := VolumeSnapshotDataListCopy{}
	err := json.Unmarshal(data, &tmp)
	if err != nil {
		return err
	}
	tmp2 := VolumeSnapshotDataList(tmp)
	*vd = tmp2
	return nil
}
587268
func (s *ProbeDetailsDTO) UnmarshalJSON(b []byte) (err error) {
	s.data = b
	return nil
}
19459
func (timestamp *Timestamp) UnmarshalJSON(data []byte) error {
	t, err := time.Parse(timestampFormat, string(data))
	if err != nil {
		return err
	}

	*timestamp = Timestamp(t)
	return nil
}
334205
func (s *String) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		s.Valid = false
		return nil
	}
	if data == nil {
		s.Chars, s.Valid = "", false
		return nil
	}

	s.Valid = true

	return json.Unmarshal(data, &s.Chars)
}
1164123
func (j *Json) UnmarshalJSON(p []byte) error {
	dec := json.NewDecoder(bytes.NewBuffer(p))
	dec.UseNumber()
	return dec.Decode(&j.data)
}
782120
func (s *StreamName) UnmarshalJSON(data []byte) error {
	v := ""
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	if err := StreamName(v).Validate(); err != nil {
		return err
	}
	*s = StreamName(v)
	return nil
}
1325812
func (i *Item) UnmarshalJSON(value []byte) error {
	return json.Unmarshal(value, &i.Value)
}
934373
func (level *Level) UnmarshalJSON(data []byte) error {
	var (
		s   string
		err error
	)
	if len(data) >= 2 {
		s, err = strconv.Unquote(string(data))
		if err != nil {
			return err
		}
	} else {
		s = string(data)
	}
	return level.Decode(s)
}