From e20a7e92338e9925a1c8894891a87fd4bedc38de Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 20 Nov 2024 04:59:59 -0500 Subject: [PATCH] fix: Generate CloudQuery Go API Client from `spec.json` (#248) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 16 ++++++++++++++++ spec.json | 3 +++ 2 files changed, 19 insertions(+) diff --git a/models.gen.go b/models.gen.go index 8a8c866..399d374 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2741,6 +2741,7 @@ type UpdateCustomerRequest struct { 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:"-"` } @@ -5167,6 +5168,14 @@ func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { delete(object, "learned_about_cq_from") } + if raw, found := object["phone"]; found { + err = json.Unmarshal(raw, &a.Phone) + if err != nil { + return fmt.Errorf("error reading 'phone': %w", err) + } + delete(object, "phone") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -5210,6 +5219,13 @@ func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { } } + if a.Phone != nil { + object["phone"], err = json.Marshal(a.Phone) + if err != nil { + return nil, fmt.Errorf("error marshaling 'phone': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { diff --git a/spec.json b/spec.json index 1c444b1..f484f33 100644 --- a/spec.json +++ b/spec.json @@ -10997,6 +10997,9 @@ }, "learned_about_cq_from" : { "type" : "string" + }, + "phone" : { + "type" : "string" } }, "required" : [ "first_name", "last_name" ]