From 60c8275114f2a285b9533dab62e9e94957140751 Mon Sep 17 00:00:00 2001 From: "band-swi[bot]" <143147434+band-swi[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:44:57 -0400 Subject: [PATCH] Generate SDK with OpenAPI Generator Version 7.6.0 (#156) Co-authored-by: DX-Bandwidth --- api/openapi.yaml | 2 -- bandwidth.yml | 2 -- docs/MessageFailedCallbackMessage.md | 2 +- docs/MessageSendingCallbackMessage.md | 2 +- .../sdk/model/MessageFailedCallbackMessage.java | 9 +++++---- .../sdk/model/MessageSendingCallbackMessage.java | 9 +++++---- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 67afdbb0..35253011 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6610,7 +6610,6 @@ components: - id - media - owner - - priority - segmentCount - text - time @@ -6782,7 +6781,6 @@ components: - from - id - owner - - priority - segmentCount - tag - text diff --git a/bandwidth.yml b/bandwidth.yml index 5362a7c5..c4b1fb2b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -1862,7 +1862,6 @@ components: - from - text - media - - priority messageDeliveredCallback: description: Message Delivered Callback type: object @@ -2035,7 +2034,6 @@ components: - from - text - tag - - priority callbackMethodEnum: type: string nullable: true diff --git a/docs/MessageFailedCallbackMessage.md b/docs/MessageFailedCallbackMessage.md index 3ddfbc1b..8b628350 100644 --- a/docs/MessageFailedCallbackMessage.md +++ b/docs/MessageFailedCallbackMessage.md @@ -19,7 +19,7 @@ Message Failed Callback Message Schema |**text** | **String** | | | |**tag** | **String** | | | |**media** | **List<URI>** | | [optional] | -|**priority** | **PriorityEnum** | | | +|**priority** | **PriorityEnum** | | [optional] | diff --git a/docs/MessageSendingCallbackMessage.md b/docs/MessageSendingCallbackMessage.md index 7611cfb0..1d2bf5ae 100644 --- a/docs/MessageSendingCallbackMessage.md +++ b/docs/MessageSendingCallbackMessage.md @@ -19,7 +19,7 @@ Message Sending Callback Message Schema |**text** | **String** | | | |**tag** | **String** | | [optional] | |**media** | **List<URI>** | | | -|**priority** | **PriorityEnum** | | | +|**priority** | **PriorityEnum** | | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java index 12dc3384..fe2e8fc3 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java @@ -344,7 +344,7 @@ public MessageFailedCallbackMessage priority(PriorityEnum priority) { * Get priority * @return priority **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PriorityEnum getPriority() { return priority; } @@ -492,7 +492,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("from"); openapiRequiredFields.add("text"); openapiRequiredFields.add("tag"); - openapiRequiredFields.add("priority"); } /** @@ -545,8 +544,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } - // validate the required field `priority` - PriorityEnum.validateJsonElement(jsonObj.get("priority")); + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java index 14f30700..02185726 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java @@ -344,7 +344,7 @@ public MessageSendingCallbackMessage priority(PriorityEnum priority) { * Get priority * @return priority **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PriorityEnum getPriority() { return priority; } @@ -492,7 +492,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("from"); openapiRequiredFields.add("text"); openapiRequiredFields.add("media"); - openapiRequiredFields.add("priority"); } /** @@ -547,8 +546,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } else if (!jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } - // validate the required field `priority` - PriorityEnum.validateJsonElement(jsonObj.get("priority")); + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory {