Skip to content

Commit bc95c25

Browse files
authored
Generate methods to reset params (#84)
After merging PR #80, optional params always needs to be set. In case of the optional parameter of type UUID, the only option is to set the value to an empty string. This results in a request to ACS with the optional parameter in the request with an empty string. ACS throws an error because it can't find the associated id in the database. Actual change is only in generate.go. Rest of the changes are in generated code.
1 parent 0d335ef commit bc95c25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+20155
-6
lines changed

cloudstack/APIDiscoveryService.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ func (p *ListApisParams) SetName(v string) {
5151
p.p["name"] = v
5252
}
5353

54+
func (p *ListApisParams) ResetName() {
55+
if p.p != nil && p.p["name"] != nil {
56+
delete(p.p, "name")
57+
}
58+
}
59+
5460
func (p *ListApisParams) GetName() (string, bool) {
5561
if p.p == nil {
5662
p.p = make(map[string]interface{})

0 commit comments

Comments
 (0)