// UnmarshalJSON helps unmarshal a Cloud Controller Service Broker response.
320205
func (serviceBroker *ServiceBroker) UnmarshalJSON(data []byte) error {
	var ccServiceBroker struct {
		Metadata internal.Metadata
		Entity   struct {
			Name         string `json:"name"`
			BrokerURL    string `json:"broker_url"`
			AuthUsername string `json:"auth_username"`
			SpaceGUID    string `json:"space_guid"`
		} `json:"entity"`
	}
	err := cloudcontroller.DecodeJSON(data, &ccServiceBroker)
	if err != nil {
		return err
	}

	serviceBroker.Name = ccServiceBroker.Entity.Name
	serviceBroker.GUID = ccServiceBroker.Metadata.GUID
	serviceBroker.BrokerURL = ccServiceBroker.Entity.BrokerURL
	serviceBroker.AuthUsername = ccServiceBroker.Entity.AuthUsername
	serviceBroker.SpaceGUID = ccServiceBroker.Entity.SpaceGUID
	return nil
}
416835
func (v *VolumeSnapshot) UnmarshalJSON(data []byte) error {
	tmp := VolumeSnapshotCopy{}
	err := json.Unmarshal(data, &tmp)
	if err != nil {
		return err
	}
	tmp2 := VolumeSnapshot(tmp)
	*v = tmp2
	return nil
}
1164123
func (j *Json) UnmarshalJSON(p []byte) error {
	dec := json.NewDecoder(bytes.NewBuffer(p))
	dec.UseNumber()
	return dec.Decode(&j.data)
}
1223434
func (instance *ApplicationInstance) UnmarshalJSON(data []byte) error {
	var ccInstance struct {
		Details string  `json:"details"`
		Since   float64 `json:"since"`
		State   string  `json:"state"`
	}
	err := cloudcontroller.DecodeJSON(data, &ccInstance)
	if err != nil {
		return err
	}

	instance.Details = ccInstance.Details
	instance.State = constant.ApplicationInstanceState(ccInstance.State)
	instance.Since = ccInstance.Since

	return nil
}
1162891
func (u *Uint64) UnmarshalJSON(data []byte) error {
	if isNull(data) {
		u.Valid = false
		return nil
	}
	if err := json.Unmarshal(data, &u.Uint64); err != nil {
		return err
	}
	u.Valid = true
	return nil
}
380818
func (o *RouterInterface) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realRouterInterface
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = RouterInterface(r)
	return nil
}
785739
func (s *Signature) UnmarshalJSON(b []byte) error {
	dec, err := jose.DecodeEscaped(b)
	if err != nil {
		return err
	}
	*s = Signature(dec)
	return nil
}
1360908
func (p *PoolsOpt) UnmarshalJSON(raw []byte) error {
	return json.Unmarshal(raw, &(p.values))
}
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
}
806116
func (v *DeliveryStatus) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCce3d1beDecodeGithubComMailgunMailgunGoEvents7(&r, v)
	return r.Error()
}
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
}
170874
func (l *APIGatewayMethodMethodResponseList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := APIGatewayMethodMethodResponse{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = APIGatewayMethodMethodResponseList{item}
		return nil
	}
	list := []APIGatewayMethodMethodResponse{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = APIGatewayMethodMethodResponseList(list)
		return nil
	}
	return err
}
810213
func (l *ECSServiceServiceRegistryList) UnmarshalJSON(buf []byte) error {
	// Cloudformation allows a single object when a list of objects is expected
	item := ECSServiceServiceRegistry{}
	if err := json.Unmarshal(buf, &item); err == nil {
		*l = ECSServiceServiceRegistryList{item}
		return nil
	}
	list := []ECSServiceServiceRegistry{}
	err := json.Unmarshal(buf, &list)
	if err == nil {
		*l = ECSServiceServiceRegistryList(list)
		return nil
	}
	return err
}
231896
func (v *eventReceivedMessageFromTarget) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonC5ff9ce6DecodeGithubComChromedpChromedp(&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
}
254869
func (d *TransferDestination) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		d.ID = id
		return nil
	}

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

	*d = TransferDestination(v)
	return json.Unmarshal(data, &d.Account)
}
1275758
func (o *VPC) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realVPC
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = VPC(r)
	return nil
}