From 2c354e13a58706bcaf0c7b91a2b54e943d6dae78 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 9 Mar 2022 19:16:43 +0200 Subject: [PATCH] Update OpenAPI spec to add msg_id to attempt output. (#287) --- ChangeLog.md | 3 ++ .../model_message_attempt_endpoint_out.go | 31 ++++++++++++++++++- .../openapi/model_message_attempt_out.go | 31 ++++++++++++++++++- openapi.json | 12 +++++++ 4 files changed, 75 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 461d37bbe..b47ccc29d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,8 @@ # Changelog +## Next +* Libs: Add `msg_id` to attempt list responses (`MessageAttemptOut`) + ## Version 0.51.0 * Libs: Support for passing an idempotency key to post commands * Libs: Add support for filtering by channel diff --git a/go/internal/openapi/model_message_attempt_endpoint_out.go b/go/internal/openapi/model_message_attempt_endpoint_out.go index 1977494cb..cf39487a6 100644 --- a/go/internal/openapi/model_message_attempt_endpoint_out.go +++ b/go/internal/openapi/model_message_attempt_endpoint_out.go @@ -19,6 +19,7 @@ import ( type MessageAttemptEndpointOut struct { EndpointId string `json:"endpointId"` Id string `json:"id"` + MsgId string `json:"msgId"` Response string `json:"response"` ResponseStatusCode int32 `json:"responseStatusCode"` Status MessageStatus `json:"status"` @@ -30,10 +31,11 @@ type MessageAttemptEndpointOut struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMessageAttemptEndpointOut(endpointId string, id string, response string, responseStatusCode int32, status MessageStatus, timestamp time.Time, triggerType MessageAttemptTriggerType) *MessageAttemptEndpointOut { +func NewMessageAttemptEndpointOut(endpointId string, id string, msgId string, response string, responseStatusCode int32, status MessageStatus, timestamp time.Time, triggerType MessageAttemptTriggerType) *MessageAttemptEndpointOut { this := MessageAttemptEndpointOut{} this.EndpointId = endpointId this.Id = id + this.MsgId = msgId this.Response = response this.ResponseStatusCode = responseStatusCode this.Status = status @@ -98,6 +100,30 @@ func (o *MessageAttemptEndpointOut) SetId(v string) { o.Id = v } +// GetMsgId returns the MsgId field value +func (o *MessageAttemptEndpointOut) GetMsgId() string { + if o == nil { + var ret string + return ret + } + + return o.MsgId +} + +// GetMsgIdOk returns a tuple with the MsgId field value +// and a boolean to check if the value has been set. +func (o *MessageAttemptEndpointOut) GetMsgIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MsgId, true +} + +// SetMsgId sets field value +func (o *MessageAttemptEndpointOut) SetMsgId(v string) { + o.MsgId = v +} + // GetResponse returns the Response field value func (o *MessageAttemptEndpointOut) GetResponse() string { if o == nil { @@ -226,6 +252,9 @@ func (o MessageAttemptEndpointOut) MarshalJSON() ([]byte, error) { if true { toSerialize["id"] = o.Id } + if true { + toSerialize["msgId"] = o.MsgId + } if true { toSerialize["response"] = o.Response } diff --git a/go/internal/openapi/model_message_attempt_out.go b/go/internal/openapi/model_message_attempt_out.go index 56c4266e5..843493054 100644 --- a/go/internal/openapi/model_message_attempt_out.go +++ b/go/internal/openapi/model_message_attempt_out.go @@ -19,6 +19,7 @@ import ( type MessageAttemptOut struct { EndpointId string `json:"endpointId"` Id string `json:"id"` + MsgId string `json:"msgId"` Response string `json:"response"` ResponseStatusCode int32 `json:"responseStatusCode"` Status MessageStatus `json:"status"` @@ -30,10 +31,11 @@ type MessageAttemptOut struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMessageAttemptOut(endpointId string, id string, response string, responseStatusCode int32, status MessageStatus, timestamp time.Time, triggerType MessageAttemptTriggerType) *MessageAttemptOut { +func NewMessageAttemptOut(endpointId string, id string, msgId string, response string, responseStatusCode int32, status MessageStatus, timestamp time.Time, triggerType MessageAttemptTriggerType) *MessageAttemptOut { this := MessageAttemptOut{} this.EndpointId = endpointId this.Id = id + this.MsgId = msgId this.Response = response this.ResponseStatusCode = responseStatusCode this.Status = status @@ -98,6 +100,30 @@ func (o *MessageAttemptOut) SetId(v string) { o.Id = v } +// GetMsgId returns the MsgId field value +func (o *MessageAttemptOut) GetMsgId() string { + if o == nil { + var ret string + return ret + } + + return o.MsgId +} + +// GetMsgIdOk returns a tuple with the MsgId field value +// and a boolean to check if the value has been set. +func (o *MessageAttemptOut) GetMsgIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MsgId, true +} + +// SetMsgId sets field value +func (o *MessageAttemptOut) SetMsgId(v string) { + o.MsgId = v +} + // GetResponse returns the Response field value func (o *MessageAttemptOut) GetResponse() string { if o == nil { @@ -226,6 +252,9 @@ func (o MessageAttemptOut) MarshalJSON() ([]byte, error) { if true { toSerialize["id"] = o.Id } + if true { + toSerialize["msgId"] = o.MsgId + } if true { toSerialize["response"] = o.Response } diff --git a/openapi.json b/openapi.json index ccd55cd09..821958a7f 100644 --- a/openapi.json +++ b/openapi.json @@ -1664,6 +1664,11 @@ "title": "Id", "type": "string" }, + "msgId": { + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "title": "Msgid", + "type": "string" + }, "response": { "example": "{}", "title": "Response", @@ -1688,6 +1693,7 @@ }, "required": [ "id", + "msgId", "endpointId", "response", "responseStatusCode", @@ -1884,6 +1890,11 @@ "title": "Id", "type": "string" }, + "msgId": { + "example": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "title": "Msgid", + "type": "string" + }, "response": { "example": "{}", "title": "Response", @@ -1908,6 +1919,7 @@ }, "required": [ "id", + "msgId", "endpointId", "response", "responseStatusCode",