()
| 1726 | } |
| 1727 | |
| 1728 | func (p *UpdateGuestOsParams) toURLValues() url.Values { |
| 1729 | u := url.Values{} |
| 1730 | if p.p == nil { |
| 1731 | return u |
| 1732 | } |
| 1733 | if v, found := p.p["details"]; found { |
| 1734 | m := v.(map[string]string) |
| 1735 | for i, k := range getSortedKeysFromMap(m) { |
| 1736 | u.Set(fmt.Sprintf("details[%d].key", i), k) |
| 1737 | u.Set(fmt.Sprintf("details[%d].value", i), m[k]) |
| 1738 | } |
| 1739 | } |
| 1740 | if v, found := p.p["forDisplay"]; found { |
| 1741 | vv := strconv.FormatBool(v.(bool)) |
| 1742 | u.Set("forDisplay", vv) |
| 1743 | } |
| 1744 | if v, found := p.p["id"]; found { |
| 1745 | u.Set("id", v.(string)) |
| 1746 | } |
| 1747 | if v, found := p.p["oscategoryid"]; found { |
| 1748 | u.Set("oscategoryid", v.(string)) |
| 1749 | } |
| 1750 | if v, found := p.p["osdisplayname"]; found { |
| 1751 | u.Set("osdisplayname", v.(string)) |
| 1752 | } |
| 1753 | return u |
| 1754 | } |
| 1755 | |
| 1756 | func (p *UpdateGuestOsParams) SetDetails(v map[string]string) { |
| 1757 | if p.p == nil { |
nothing calls this directly
no test coverage detected