// UnmarshallInterface from a JSON string to a MaterialAttributesGit struct
353631
func unmarshallMaterialAttributesGit(mag *MaterialAttributesGit, i map[string]interface{}) {
	for key, value := range i {
		if value == nil {
			continue
		}
		switch key {
		case "name":
			mag.Name = value.(string)
		case "url":
			mag.URL = value.(string)
		case "auto_update":
			mag.AutoUpdate = value.(bool)
		case "branch":
			mag.Branch = value.(string)
		case "submodule_folder":
			mag.SubmoduleFolder = value.(string)
		case "destination":
			mag.Destination = value.(string)
		case "shallow_clone":
			mag.ShallowClone = value.(bool)
		case "invert_filter":
			mag.InvertFilter = value.(bool)
		case "filter":
			if v1, ok1 := value.(map[string]interface{}); ok1 {
				mag.Filter = unmarshallMaterialFilter(v1)
			}
		}
	}
}
514911
func (t *ISO8601Time) UnmarshalText(text []byte) error {
	ts, err := time.Parse(time.RFC3339, string(text))
	if err != nil {
		return err
	}
	*t = ISO8601Time(ts)
	return nil
}
21948
func (p *PaymentIntent) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		p.ID = id
		return nil
	}

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

	*p = PaymentIntent(v)
	return nil
}
507437
func (m *Material) UnmarshalJSON(b []byte) (err error) {
	raw := map[string]interface{}{}
	if err = json.Unmarshal(b, &raw); err == nil {
		err = m.Ingest(raw)
	}

	return
}
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
}
248357
func (f *FloatAttribute) UnmarshalJSON(data []byte) error {
	var d map[string]interface{}
	err := json.Unmarshal(data, &d)
	if err != nil {
		return err
	}
	if precision, ok := d["precision"]; ok {
		f.Precision = int(precision.(float64))
		return nil
	}
	return fmt.Errorf("Precision must be specified")
}
1363857
func unmarshallMaterialAttributesTfs(mtfs *MaterialAttributesTfs, i map[string]interface{}) {
	for key, value := range i {
		if value == nil {
			continue
		}
		switch key {

		case "name":
			mtfs.Name = value.(string)

		case "url":
			mtfs.URL = value.(string)
		case "project_path":
			mtfs.ProjectPath = value.(string)
		case "domain":
			mtfs.Domain = value.(string)

		case "username":
			mtfs.Username = value.(string)
		case "password":
			mtfs.Password = value.(string)
		case "encrypted_password":
			mtfs.EncryptedPassword = value.(string)

		case "destination":
			mtfs.Destination = value.(string)
		case "filter":
			mtfs.Filter = unmarshallMaterialFilter(value.(map[string]interface{}))
		case "invert_filter":
			mtfs.InvertFilter = value.(bool)
		case "auto_update":
			mtfs.AutoUpdate = value.(bool)
		}
	}
}
998492
func (datr *DataRate) UnmarshalText(data []byte) error {
	parsed, err := ParseDataRate(string(data))
	if err != nil {
		return err
	}
	*datr = *parsed
	return nil
}
225922
func (b *Uint) UnmarshalJSON(input []byte) error {
	if !isString(input) {
		return errNonString(uintT)
	}
	return wrapTypeError(b.UnmarshalText(input[1:len(input)-1]), uintT)
}
170604
func (u *UUID) UnmarshalText(data []byte) error {
	if len(data) == 0 {
		return nil
	}
	id := Parse(string(data))
	if id == nil {
		return errors.New("invalid UUID")
	}
	*u = id
	return nil
}
694468
func (n *NetID) UnmarshalText(data []byte) error {
	parsed, err := ParseHEX(string(data), 3)
	if err != nil {
		return err
	}
	copy(n[:], parsed[:])
	return nil
}
964090
func (Attr *CategoricalAttribute) UnmarshalJSON(data []byte) error {
	var d map[string]interface{}
	err := json.Unmarshal(data, &d)
	if err != nil {
		return err
	}
	for _, v := range d["values"].([]interface{}) {
		Attr.values = append(Attr.values, v.(string))
	}
	return nil
}
455603
func (h *Hash) UnmarshalText(data []byte) error {
	newH, err := HashFromString(string(data))
	if err != nil {
		return err
	}
	*h = newH
	return nil
}
1192042
func UnmarshalGeometry(data []byte) (*Geometry, error) {
	g := &Geometry{}
	err := json.Unmarshal(data, g)
	if err != nil {
		return nil, err
	}

	return g, nil
}
163076
func (hb *HEXBytes) UnmarshalText(text []byte) error {
	b, err := hex.DecodeString(string(text))
	if err != nil {
		return err
	}
	*hb = HEXBytes(b)
	return nil
}
210235
func (o *UUID) UnmarshalText(uuid []byte) error {
	id, err := parse(string(uuid))
	if err == nil {
		o.UnmarshalBinary(id)
	}
	return err
}
902429
func (r *ReplyGetattrV2) UnmarshalBinary(data []byte) error {
	return UnmarshalBinary(data, &r.Reply, &r.Attr, &r.SymlinkTarget)
}