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 {