Skip to content

Commit

Permalink
Generate methods to reset params (#84)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vishesh92 authored May 9, 2024
1 parent 0d335ef commit bc95c25
Show file tree
Hide file tree
Showing 71 changed files with 20,155 additions and 6 deletions.
6 changes: 6 additions & 0 deletions cloudstack/APIDiscoveryService.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func (p *ListApisParams) SetName(v string) {
p.p["name"] = v
}

func (p *ListApisParams) ResetName() {
if p.p != nil && p.p["name"] != nil {
delete(p.p, "name")
}
}

func (p *ListApisParams) GetName() (string, bool) {
if p.p == nil {
p.p = make(map[string]interface{})
Expand Down
Loading

0 comments on commit bc95c25

Please sign in to comment.