This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch pr90
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git

commit b328f0050d6c9ac969d8e8af6072998113922ff4
Author: tonymmm1 <t...@mail.magnatox.com>
AuthorDate: Sat Jul 27 11:28:17 2024 -0500

    fix quotaTariffList
---
 cloudstack/QuotaService.go | 5 +++++
 generate/generate.go       | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/cloudstack/QuotaService.go b/cloudstack/QuotaService.go
index d790c41..53ca6f5 100644
--- a/cloudstack/QuotaService.go
+++ b/cloudstack/QuotaService.go
@@ -1380,6 +1380,11 @@ func (s *QuotaService) QuotaTariffList(p 
*QuotaTariffListParams) (*QuotaTariffLi
 }
 
 type QuotaTariffListResponse struct {
+       Count           int                `json:"count"`
+       QuotaTariffList []*QuotaTariffList `json:"quotatariff"`
+}
+
+type QuotaTariffList struct {
        ActivationRule       string  `json:"activationRule"`
        Currency             string  `json:"currency"`
        Description          string  `json:"description"`
diff --git a/generate/generate.go b/generate/generate.go
index 24aa2a7..004c534 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -1868,7 +1868,8 @@ func (s *service) generateResponseType(a *API) {
        // If this is a 'list' response, we need an separate list struct. There 
seem to be other
        // types of responses that also need a separate list struct, so 
checking on exact matches
        // for those once.
-       if strings.HasPrefix(a.Name, "list") || a.Name == "registerTemplate" || 
a.Name == "findHostsForMigration" || a.Name == "quotaSummary" {
+       if strings.HasPrefix(a.Name, "list") || a.Name == "registerTemplate" || 
a.Name == "findHostsForMigration" ||
+               a.Name == "quotaSummary" || a.Name == "quotaTariffList" {
                pn("type %s struct {", tn)
 
                // This nasty check is for some specific response that do not 
behave consistent
@@ -1902,6 +1903,9 @@ func (s *service) generateResponseType(a *API) {
                case "findHostsForMigration":
                        pn(" Count int `json:\"count\"`")
                        pn(" Host []*%s `json:\"%s\"`", 
customResponseStructTypes[a.Name], "host")
+               case "quotaTariffList":
+                       pn("    Count int `json:\"count\"`")
+                       pn("    %s []*%s `json:\"%s\"`", ln, parseSingular(ln), 
"quotatariff")
                case "quotaSummary":
                        pn("    Count int `json:\"count\"`")
                        pn("    %s []*%s `json:\"%s\"`", ln, parseSingular(ln), 
"summary")

Reply via email to