diff --git a/api/openapi.yaml b/api/openapi.yaml index 34b06e36..4e150bf1 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -10056,6 +10056,14 @@ components: $ref: '#/components/schemas/diversion' stirShaken: $ref: '#/components/schemas/stirShaken' + uui: + description: "The value of the `User-To-User` header to send within the\ + \ initial `INVITE`. Must include the encoding parameter as specified in\ + \ RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed.\ + \ This value, including the encoding specifier, may not exceed 256 characters." + example: bXktdXVp + maxLength: 256 + type: string type: object machineDetectionCompleteCallback: description: "This event is sent to the url informed when requesting a machine\ @@ -11135,6 +11143,14 @@ components: example: 99759086-1335-11ed-9bcf-5f7d464e91af type: string type: object + uui: + description: "The value of the `User-To-User` header to send within the initial\ + \ `INVITE`. Must include the encoding parameter as specified in RFC 7433.\ + \ Only `base64`, `jwt` and `hex` encoding are currently allowed. This value,\ + \ including the encoding specifier, may not exceed 256 characters." + example: bXktdXVp + maxLength: 256 + type: string codeRequest: properties: to: diff --git a/bandwidth.yml b/bandwidth.yml index 70ca20d3..801e18f9 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -3801,6 +3801,8 @@ components: $ref: '#/components/schemas/diversion' stirShaken: $ref: '#/components/schemas/stirShaken' + uui: + $ref: '#/components/schemas/uui' machineDetectionCompleteCallback: type: object description: >- @@ -4435,6 +4437,15 @@ components: type: string description: (optional) A unique origination identifier. example: 99759086-1335-11ed-9bcf-5f7d464e91af + uui: + type: string + description: >- + The value of the `User-To-User` header to send within the initial + `INVITE`. Must include the encoding parameter as specified in RFC 7433. + Only `base64`, `jwt` and `hex` encoding are currently allowed. This + value, including the encoding specifier, may not exceed 256 characters. + example: bXktdXVp + maxLength: 256 codeRequest: type: object properties: diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 94d56eb8..9a841ae8 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -20,6 +20,7 @@ The Initiate event is fired when an inbound call is received for a Telephone Num |**startTime** | **OffsetDateTime** | Time the call was started, in ISO 8601 format. | [optional] | |**diversion** | [**Diversion**](Diversion.md) | | [optional] | |**stirShaken** | [**StirShaken**](StirShaken.md) | | [optional] | +|**uui** | **String** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 7012e80b..9d873d99 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -115,6 +115,11 @@ public class InitiateCallback { @javax.annotation.Nullable private StirShaken stirShaken; + public static final String SERIALIZED_NAME_UUI = "uui"; + @SerializedName(SERIALIZED_NAME_UUI) + @javax.annotation.Nullable + private String uui; + public InitiateCallback() { } @@ -345,6 +350,25 @@ public void setStirShaken(@javax.annotation.Nullable StirShaken stirShaken) { this.stirShaken = stirShaken; } + + public InitiateCallback uui(@javax.annotation.Nullable String uui) { + this.uui = uui; + return this; + } + + /** + * The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. + * @return uui + */ + @javax.annotation.Nullable + public String getUui() { + return uui; + } + + public void setUui(@javax.annotation.Nullable String uui) { + this.uui = uui; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -411,13 +435,14 @@ public boolean equals(Object o) { Objects.equals(this.callUrl, initiateCallback.callUrl) && Objects.equals(this.startTime, initiateCallback.startTime) && Objects.equals(this.diversion, initiateCallback.diversion) && - Objects.equals(this.stirShaken, initiateCallback.stirShaken)&& + Objects.equals(this.stirShaken, initiateCallback.stirShaken) && + Objects.equals(this.uui, initiateCallback.uui)&& Objects.equals(this.additionalProperties, initiateCallback.additionalProperties); } @Override public int hashCode() { - return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, startTime, diversion, stirShaken, additionalProperties); + return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, startTime, diversion, stirShaken, uui, additionalProperties); } @Override @@ -436,6 +461,7 @@ public String toString() { sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" diversion: ").append(toIndentedString(diversion)).append("\n"); sb.append(" stirShaken: ").append(toIndentedString(stirShaken)).append("\n"); + sb.append(" uui: ").append(toIndentedString(uui)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -471,6 +497,7 @@ private String toIndentedString(Object o) { openapiFields.add("startTime"); openapiFields.add("diversion"); openapiFields.add("stirShaken"); + openapiFields.add("uui"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -522,6 +549,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("stirShaken") != null && !jsonObj.get("stirShaken").isJsonNull()) { StirShaken.validateJsonElement(jsonObj.get("stirShaken")); } + if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java index b8da33ec..f8e2bd8d 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java @@ -40,7 +40,8 @@ public class InitiateCallbackTest { .callUrl(URI.create("https://bandwidth.com")) .startTime(OffsetDateTime.now()) .diversion(new Diversion()) - .stirShaken(new StirShaken()); + .stirShaken(new StirShaken()) + .uui("uui"); /** * Model tests for InitiateCallback @@ -146,4 +147,12 @@ public void stirShakenTest() { assertThat(model.getStirShaken(), instanceOf(StirShaken.class)); } + /** + * Test the property 'uui' + */ + @Test + public void uuiTest() { + assertThat(model.getUui(), instanceOf(String.class)); + } + }