From 9f8c47b22672e40942d0f9860dc36a25566cc246 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Nov 2024 03:54:01 -0500 Subject: [PATCH] fix: Generate CloudQuery Go API Client from `spec.json` (#249) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 30 ++++++++++++++++++++++++------ spec.json | 12 +++++++++++- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/models.gen.go b/models.gen.go index 399d374..100b625 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1144,6 +1144,8 @@ type ListInvoicesByTeam200Response struct { // ListMetadata defines model for ListMetadata. type ListMetadata struct { LastPage *int `json:"last_page,omitempty"` + PageSize int `json:"page_size"` + TimeMs *int `json:"time_ms,omitempty"` TotalCount *int `json:"total_count,omitempty"` } @@ -2737,12 +2739,13 @@ type UpdateCurrentUserRequest struct { // UpdateCustomerRequest defines model for UpdateCustomer_request. type UpdateCustomerRequest struct { - CompanyName *string `json:"company_name,omitempty"` - FirstName string `json:"first_name"` - LastName string `json:"last_name"` - LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` - Phone *string `json:"phone,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + CompanyName *string `json:"company_name,omitempty"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` + LearnedAboutCqFromOther *string `json:"learned_about_cq_from_other,omitempty"` + Phone *string `json:"phone,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateSyncRunRequest defines model for UpdateSyncRun_request. @@ -5168,6 +5171,14 @@ func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { delete(object, "learned_about_cq_from") } + if raw, found := object["learned_about_cq_from_other"]; found { + err = json.Unmarshal(raw, &a.LearnedAboutCqFromOther) + if err != nil { + return fmt.Errorf("error reading 'learned_about_cq_from_other': %w", err) + } + delete(object, "learned_about_cq_from_other") + } + if raw, found := object["phone"]; found { err = json.Unmarshal(raw, &a.Phone) if err != nil { @@ -5219,6 +5230,13 @@ func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { } } + if a.LearnedAboutCqFromOther != nil { + object["learned_about_cq_from_other"], err = json.Marshal(a.LearnedAboutCqFromOther) + if err != nil { + return nil, fmt.Errorf("error marshaling 'learned_about_cq_from_other': %w", err) + } + } + if a.Phone != nil { object["phone"], err = json.Marshal(a.Phone) if err != nil { diff --git a/spec.json b/spec.json index f484f33..416d094 100644 --- a/spec.json +++ b/spec.json @@ -7067,8 +7067,15 @@ }, "last_page" : { "type" : "integer" + }, + "page_size" : { + "type" : "integer" + }, + "time_ms" : { + "type" : "integer" } - } + }, + "required" : [ "page_size" ] }, "PluginNotificationRequestCreate" : { "additionalProperties" : false, @@ -10998,6 +11005,9 @@ "learned_about_cq_from" : { "type" : "string" }, + "learned_about_cq_from_other" : { + "type" : "string" + }, "phone" : { "type" : "string" }