// UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItem structure.
764813
func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error {
	var aggs map[string]*json.RawMessage
	dec := json.NewDecoder(bytes.NewReader(data))
	dec.UseNumber()
	if err := dec.Decode(&aggs); err != nil {
		return err
	}
	if v, ok := aggs["key"]; ok && v != nil {
		json.Unmarshal(*v, &a.Key)
		json.Unmarshal(*v, &a.KeyNumber)
	}
	if v, ok := aggs["doc_count"]; ok && v != nil {
		json.Unmarshal(*v, &a.DocCount)
	}
	a.Aggregations = aggs
	return nil
}
576419
func (ks *KeyList) UnmarshalJSON(data []byte) error {
	parsed := make([]TUFKey, 0, 1)
	err := json.Unmarshal(data, &parsed)
	if err != nil {
		return err
	}
	final := make([]PublicKey, 0, len(parsed))
	for _, tk := range parsed {
		final = append(final, typedPublicKey(tk))
	}
	*ks = final
	return nil
}
979566
func (v *CBGravatar) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonB0500db0DecodeGithubComFrancoispqtGojayBenchmarks3(&r, v)
	return r.Error()
}
944171
func (l *S3BucketInventoryConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketInventoryConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketInventoryConfigurationList{item}
		return nil
	}
	list := []S3BucketInventoryConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketInventoryConfigurationList(list)
		return nil
	}
	return err
}
204258
func (a *AggregationGeoCentroidMetric) UnmarshalJSON(data []byte) error {
	var aggs map[string]json.RawMessage
	if err := json.Unmarshal(data, &aggs); err != nil {
		return err
	}
	if v, ok := aggs["location"]; ok && v != nil {
		json.Unmarshal(v, &a.Location)
	}
	if v, ok := aggs["meta"]; ok && v != nil {
		json.Unmarshal(v, &a.Meta)
	}
	if v, ok := aggs["count"]; ok && v != nil {
		json.Unmarshal(v, &a.Count)
	}
	a.Aggregations = aggs
	return nil
}
94512
func (l *S3BucketRoutingRuleList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketRoutingRule{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketRoutingRuleList{item}
		return nil
	}
	list := []S3BucketRoutingRule{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketRoutingRuleList(list)
		return nil
	}
	return err
}
1241172
func (l *S3BucketWebsiteConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketWebsiteConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketWebsiteConfigurationList{item}
		return nil
	}
	list := []S3BucketWebsiteConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketWebsiteConfigurationList(list)
		return nil
	}
	return err
}
1310138
func (v *bulkDeleteRequestCommandOp) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson8092efb6DecodeGithubComOlivereElastic(&r, v)
	return r.Error()
}
229412
func (l *S3BucketQueueConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketQueueConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketQueueConfigurationList{item}
		return nil
	}
	list := []S3BucketQueueConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketQueueConfigurationList(list)
		return nil
	}
	return err
}
90307
func (l *S3BucketNoncurrentVersionTransitionList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketNoncurrentVersionTransition{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketNoncurrentVersionTransitionList{item}
		return nil
	}
	list := []S3BucketNoncurrentVersionTransition{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketNoncurrentVersionTransitionList(list)
		return nil
	}
	return err
}
721465
func (l *S3BucketReplicationRuleList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketReplicationRule{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketReplicationRuleList{item}
		return nil
	}
	list := []S3BucketReplicationRule{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketReplicationRuleList(list)
		return nil
	}
	return err
}
1166085
func (l *S3BucketTransitionList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketTransition{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketTransitionList{item}
		return nil
	}
	list := []S3BucketTransition{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketTransitionList(list)
		return nil
	}
	return err
}
907222
func (k *Key) UnmarshalJSON(data []byte) error {
	var key string
	if err := json.Unmarshal(data, &key); err != nil {
		return err
	}
	*k = NewKey(key)
	return nil
}
654038
func (l *AutoScalingAutoScalingGroupTagPropertyList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := AutoScalingAutoScalingGroupTagProperty{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = AutoScalingAutoScalingGroupTagPropertyList{item}
		return nil
	}
	list := []AutoScalingAutoScalingGroupTagProperty{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = AutoScalingAutoScalingGroupTagPropertyList(list)
		return nil
	}
	return err
}
74655
func (a *AggregationBucketSignificantTerm) UnmarshalJSON(data []byte) error {
	var aggs map[string]*json.RawMessage
	if err := json.Unmarshal(data, &aggs); err != nil {
		return err
	}
	if v, ok := aggs["key"]; ok && v != nil {
		json.Unmarshal(*v, &a.Key)
	}
	if v, ok := aggs["doc_count"]; ok && v != nil {
		json.Unmarshal(*v, &a.DocCount)
	}
	if v, ok := aggs["bg_count"]; ok && v != nil {
		json.Unmarshal(*v, &a.BgCount)
	}
	if v, ok := aggs["score"]; ok && v != nil {
		json.Unmarshal(*v, &a.Score)
	}
	a.Aggregations = aggs
	return nil
}
1057900
func (l *S3BucketLoggingConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := S3BucketLoggingConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = S3BucketLoggingConfigurationList{item}
		return nil
	}
	list := []S3BucketLoggingConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = S3BucketLoggingConfigurationList(list)
		return nil
	}
	return err
}
884060
func (l *KinesisAnalyticsApplicationKinesisStreamsInputList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := KinesisAnalyticsApplicationKinesisStreamsInput{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = KinesisAnalyticsApplicationKinesisStreamsInputList{item}
		return nil
	}
	list := []KinesisAnalyticsApplicationKinesisStreamsInput{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = KinesisAnalyticsApplicationKinesisStreamsInputList(list)
		return nil
	}
	return err
}