Skip to content

Commit 188d819

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-7376 Update SDK Based on Recent Spec Changes (#179)
* Generate SDK with OpenAPI Generator Version * update unit test --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 1c9caf1 commit 188d819

File tree

5 files changed

+70
-3
lines changed

5 files changed

+70
-3
lines changed

api/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10056,6 +10056,14 @@ components:
1005610056
$ref: '#/components/schemas/diversion'
1005710057
stirShaken:
1005810058
$ref: '#/components/schemas/stirShaken'
10059+
uui:
10060+
description: "The value of the `User-To-User` header to send within the\
10061+
\ initial `INVITE`. Must include the encoding parameter as specified in\
10062+
\ RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed.\
10063+
\ This value, including the encoding specifier, may not exceed 256 characters."
10064+
example: bXktdXVp
10065+
maxLength: 256
10066+
type: string
1005910067
type: object
1006010068
machineDetectionCompleteCallback:
1006110069
description: "This event is sent to the url informed when requesting a machine\
@@ -11135,6 +11143,14 @@ components:
1113511143
example: 99759086-1335-11ed-9bcf-5f7d464e91af
1113611144
type: string
1113711145
type: object
11146+
uui:
11147+
description: "The value of the `User-To-User` header to send within the initial\
11148+
\ `INVITE`. Must include the encoding parameter as specified in RFC 7433.\
11149+
\ Only `base64`, `jwt` and `hex` encoding are currently allowed. This value,\
11150+
\ including the encoding specifier, may not exceed 256 characters."
11151+
example: bXktdXVp
11152+
maxLength: 256
11153+
type: string
1113811154
codeRequest:
1113911155
properties:
1114011156
to:

bandwidth.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,6 +3801,8 @@ components:
38013801
$ref: '#/components/schemas/diversion'
38023802
stirShaken:
38033803
$ref: '#/components/schemas/stirShaken'
3804+
uui:
3805+
$ref: '#/components/schemas/uui'
38043806
machineDetectionCompleteCallback:
38053807
type: object
38063808
description: >-
@@ -4435,6 +4437,15 @@ components:
44354437
type: string
44364438
description: (optional) A unique origination identifier.
44374439
example: 99759086-1335-11ed-9bcf-5f7d464e91af
4440+
uui:
4441+
type: string
4442+
description: >-
4443+
The value of the `User-To-User` header to send within the initial
4444+
`INVITE`. Must include the encoding parameter as specified in RFC 7433.
4445+
Only `base64`, `jwt` and `hex` encoding are currently allowed. This
4446+
value, including the encoding specifier, may not exceed 256 characters.
4447+
example: bXktdXVp
4448+
maxLength: 256
44384449
codeRequest:
44394450
type: object
44404451
properties:

docs/InitiateCallback.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The Initiate event is fired when an inbound call is received for a Telephone Num
2020
|**startTime** | **OffsetDateTime** | Time the call was started, in ISO 8601 format. | [optional] |
2121
|**diversion** | [**Diversion**](Diversion.md) | | [optional] |
2222
|**stirShaken** | [**StirShaken**](StirShaken.md) | | [optional] |
23+
|**uui** | **String** | The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] |
2324

2425

2526

src/main/java/com/bandwidth/sdk/model/InitiateCallback.java

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public class InitiateCallback {
115115
@javax.annotation.Nullable
116116
private StirShaken stirShaken;
117117

118+
public static final String SERIALIZED_NAME_UUI = "uui";
119+
@SerializedName(SERIALIZED_NAME_UUI)
120+
@javax.annotation.Nullable
121+
private String uui;
122+
118123
public InitiateCallback() {
119124
}
120125

@@ -345,6 +350,25 @@ public void setStirShaken(@javax.annotation.Nullable StirShaken stirShaken) {
345350
this.stirShaken = stirShaken;
346351
}
347352

353+
354+
public InitiateCallback uui(@javax.annotation.Nullable String uui) {
355+
this.uui = uui;
356+
return this;
357+
}
358+
359+
/**
360+
* The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.
361+
* @return uui
362+
*/
363+
@javax.annotation.Nullable
364+
public String getUui() {
365+
return uui;
366+
}
367+
368+
public void setUui(@javax.annotation.Nullable String uui) {
369+
this.uui = uui;
370+
}
371+
348372
/**
349373
* A container for additional, undeclared properties.
350374
* This is a holder for any undeclared properties as specified with
@@ -411,13 +435,14 @@ public boolean equals(Object o) {
411435
Objects.equals(this.callUrl, initiateCallback.callUrl) &&
412436
Objects.equals(this.startTime, initiateCallback.startTime) &&
413437
Objects.equals(this.diversion, initiateCallback.diversion) &&
414-
Objects.equals(this.stirShaken, initiateCallback.stirShaken)&&
438+
Objects.equals(this.stirShaken, initiateCallback.stirShaken) &&
439+
Objects.equals(this.uui, initiateCallback.uui)&&
415440
Objects.equals(this.additionalProperties, initiateCallback.additionalProperties);
416441
}
417442

418443
@Override
419444
public int hashCode() {
420-
return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, startTime, diversion, stirShaken, additionalProperties);
445+
return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, startTime, diversion, stirShaken, uui, additionalProperties);
421446
}
422447

423448
@Override
@@ -436,6 +461,7 @@ public String toString() {
436461
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
437462
sb.append(" diversion: ").append(toIndentedString(diversion)).append("\n");
438463
sb.append(" stirShaken: ").append(toIndentedString(stirShaken)).append("\n");
464+
sb.append(" uui: ").append(toIndentedString(uui)).append("\n");
439465
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
440466
sb.append("}");
441467
return sb.toString();
@@ -471,6 +497,7 @@ private String toIndentedString(Object o) {
471497
openapiFields.add("startTime");
472498
openapiFields.add("diversion");
473499
openapiFields.add("stirShaken");
500+
openapiFields.add("uui");
474501

475502
// a set of required properties/fields (JSON key names)
476503
openapiRequiredFields = new HashSet<String>();
@@ -522,6 +549,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
522549
if (jsonObj.get("stirShaken") != null && !jsonObj.get("stirShaken").isJsonNull()) {
523550
StirShaken.validateJsonElement(jsonObj.get("stirShaken"));
524551
}
552+
if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) {
553+
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()));
554+
}
525555
}
526556

527557
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public class InitiateCallbackTest {
4040
.callUrl(URI.create("https://bandwidth.com"))
4141
.startTime(OffsetDateTime.now())
4242
.diversion(new Diversion())
43-
.stirShaken(new StirShaken());
43+
.stirShaken(new StirShaken())
44+
.uui("uui");
4445

4546
/**
4647
* Model tests for InitiateCallback
@@ -146,4 +147,12 @@ public void stirShakenTest() {
146147
assertThat(model.getStirShaken(), instanceOf(StirShaken.class));
147148
}
148149

150+
/**
151+
* Test the property 'uui'
152+
*/
153+
@Test
154+
public void uuiTest() {
155+
assertThat(model.getUui(), instanceOf(String.class));
156+
}
157+
149158
}

0 commit comments

Comments
 (0)