Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-6215 Update SDK Based on Recent Spec Changes #156

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6610,7 +6610,6 @@ components:
- id
- media
- owner
- priority
- segmentCount
- text
- time
Expand Down Expand Up @@ -6782,7 +6781,6 @@ components:
- from
- id
- owner
- priority
- segmentCount
- tag
- text
Expand Down
2 changes: 0 additions & 2 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,6 @@ components:
- from
- text
- media
- priority
messageDeliveredCallback:
description: Message Delivered Callback
type: object
Expand Down Expand Up @@ -2035,7 +2034,6 @@ components:
- from
- text
- tag
- priority
callbackMethodEnum:
type: string
nullable: true
Expand Down
2 changes: 1 addition & 1 deletion docs/MessageFailedCallbackMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Message Failed Callback Message Schema
|**text** | **String** | | |
|**tag** | **String** | | |
|**media** | **List<URI>** | | [optional] |
|**priority** | **PriorityEnum** | | |
|**priority** | **PriorityEnum** | | [optional] |



2 changes: 1 addition & 1 deletion docs/MessageSendingCallbackMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Message Sending Callback Message Schema
|**text** | **String** | | |
|**tag** | **String** | | [optional] |
|**media** | **List<URI>** | | |
|**priority** | **PriorityEnum** | | |
|**priority** | **PriorityEnum** | | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public MessageFailedCallbackMessage priority(PriorityEnum priority) {
* Get priority
* @return priority
**/
@javax.annotation.Nonnull
@javax.annotation.Nullable
public PriorityEnum getPriority() {
return priority;
}
Expand Down Expand Up @@ -492,7 +492,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields.add("from");
openapiRequiredFields.add("text");
openapiRequiredFields.add("tag");
openapiRequiredFields.add("priority");
}

/**
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public MessageSendingCallbackMessage priority(PriorityEnum priority) {
* Get priority
* @return priority
**/
@javax.annotation.Nonnull
@javax.annotation.Nullable
public PriorityEnum getPriority() {
return priority;
}
Expand Down Expand Up @@ -492,7 +492,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields.add("from");
openapiRequiredFields.add("text");
openapiRequiredFields.add("media");
openapiRequiredFields.add("priority");
}

/**
Expand Down Expand Up @@ -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 {
Expand Down