// UnmarshalJSON helps unmarshal a Cloud Controller Route Mapping
557348
func (routeMapping *RouteMapping) UnmarshalJSON(data []byte) error {
	var ccRouteMapping struct {
		Metadata internal.Metadata `json:"metadata"`
		Entity   struct {
			AppGUID   string `json:"app_guid"`
			RouteGUID string `json:"route_guid"`
		} `json:"entity"`
	}

	err := cloudcontroller.DecodeJSON(data, &ccRouteMapping)
	if err != nil {
		return err
	}

	routeMapping.GUID = ccRouteMapping.Metadata.GUID
	routeMapping.AppGUID = ccRouteMapping.Entity.AppGUID
	routeMapping.RouteGUID = ccRouteMapping.Entity.RouteGUID
	return nil
}
515562
func (l *Route53HostedZoneVPCList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := Route53HostedZoneVPC{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = Route53HostedZoneVPCList{item}
		return nil
	}
	list := []Route53HostedZoneVPC{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = Route53HostedZoneVPCList(list)
		return nil
	}
	return err
}
429387
func (p *Path) UnmarshalJSON(data []byte) error {
	var pointSet PointSet

	err := json.Unmarshal(data, &pointSet)
	if err != nil {
		return err
	}
	p.PointSet = pointSet
	return nil
}
202548
func (x *ParametersParameterComponent) UnmarshalJSON(data []byte) (err error) {
	x2 := parametersParameterComponent{}
	if err = json.Unmarshal(data, &x2); err == nil {
		if x2.Resource != nil {
			x2.Resource = MapToResource(x2.Resource, true)
		}
		*x = ParametersParameterComponent(x2)
	}
	return
}
371865
func (v *SmallPayload) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson890029d8DecodeGithubComFrancoispqtGojayBenchmarks(&r, v)
	return r.Error()
}
22373
func (t *TraceV1Raw) UnmarshalJSON(b []byte) error {
	var trace []TraceEventV1
	if err := json.Unmarshal(b, &trace); err != nil {
		return err
	}
	*t = TraceV1Raw(trace)
	return nil
}
818804
func (v *InputSpanList) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat3(&r, v)
	return r.Error()
}
80581
func (v *Paging) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents4(&r, v)
	return r.Error()
}
1046132
func (user *User) UnmarshalJSON(data []byte) error {
	var ccUser struct {
		Metadata internal.Metadata `json:"metadata"`
	}
	err := cloudcontroller.DecodeJSON(data, &ccUser)
	if err != nil {
		return err
	}

	user.GUID = ccUser.Metadata.GUID
	return nil
}
695262
func (vd *VolumeSnapshotList) UnmarshalJSON(data []byte) error {
	tmp := VolumeSnapshotListCopy{}
	err := json.Unmarshal(data, &tmp)
	if err != nil {
		return err
	}
	tmp2 := VolumeSnapshotList(tmp)
	*vd = tmp2
	return nil
}
421894
func (l *LambdaAliasAliasRoutingConfigurationList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := LambdaAliasAliasRoutingConfiguration{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = LambdaAliasAliasRoutingConfigurationList{item}
		return nil
	}
	list := []LambdaAliasAliasRoutingConfiguration{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = LambdaAliasAliasRoutingConfigurationList(list)
		return nil
	}
	return err
}
958241
func (v *bulkUpdateRequestCommandOp) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson1ed00e60DecodeGithubComOlivereElastic(&r, v)
	return r.Error()
}
354169
func (c *WebhookEndpoint) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		c.ID = id
		return nil
	}

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

	*c = WebhookEndpoint(v)
	return nil
}
1316835
func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
	var ipnetStr string
	if err = json.Unmarshal(b, &ipnetStr); err == nil {
		var cidr *net.IPNet
		if _, cidr, err = net.ParseCIDR(ipnetStr); err == nil {
			*ipnet = NetIPNet(*cidr)
		}
	}
	return
}
1086871
func (servicePlan *ServicePlan) UnmarshalJSON(data []byte) error {
	var ccServicePlan struct {
		Metadata internal.Metadata
		Entity   struct {
			Name        string `json:"name"`
			ServiceGUID string `json:"service_guid"`
			Public      bool   `json:"public"`
			Description string `json:"description"`
			Free        bool   `json:"free"`
		}
	}
	err := cloudcontroller.DecodeJSON(data, &ccServicePlan)
	if err != nil {
		return err
	}

	servicePlan.GUID = ccServicePlan.Metadata.GUID
	servicePlan.Name = ccServicePlan.Entity.Name
	servicePlan.ServiceGUID = ccServicePlan.Entity.ServiceGUID
	servicePlan.Public = ccServicePlan.Entity.Public
	servicePlan.Description = ccServicePlan.Entity.Description
	servicePlan.Free = ccServicePlan.Entity.Free
	return nil
}
706143
func (o *DNSZone) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realDNSZone
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = DNSZone(r)
	return nil
}
874843
func (c *TaxID) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		c.ID = id
		return nil
	}

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

	*c = TaxID(v)
	return nil
}