Skip to content

Commit 5896f7e

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-9205 Update SDK Based on Recent Spec Changes (#218)
* Generate SDK with OpenAPI Generator Version * use 7.17 * unit tests * rename for spelling mistake --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent 0d0773d commit 5896f7e

File tree

15 files changed

+404
-4
lines changed

15 files changed

+404
-4
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ docs/RbmMessageContentFile.md
136136
docs/RbmMessageContentRichCard.md
137137
docs/RbmMessageContentText.md
138138
docs/RbmMessageMedia.md
139+
docs/RbmOpenUrlEnum.md
139140
docs/RbmStandaloneCard.md
140141
docs/RbmSuggestionResponse.md
142+
docs/RbmWebViewEnum.md
141143
docs/RecordingAvailableCallback.md
142144
docs/RecordingCompleteCallback.md
143145
docs/RecordingStateEnum.md
@@ -356,8 +358,10 @@ src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java
356358
src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java
357359
src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java
358360
src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java
361+
src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
359362
src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java
360363
src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java
364+
src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java
361365
src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java
362366
src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java
363367
src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,10 @@ Class | Method | HTTP request | Description
309309
- [RbmMessageContentRichCard](docs/RbmMessageContentRichCard.md)
310310
- [RbmMessageContentText](docs/RbmMessageContentText.md)
311311
- [RbmMessageMedia](docs/RbmMessageMedia.md)
312+
- [RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md)
312313
- [RbmStandaloneCard](docs/RbmStandaloneCard.md)
313314
- [RbmSuggestionResponse](docs/RbmSuggestionResponse.md)
315+
- [RbmWebViewEnum](docs/RbmWebViewEnum.md)
314316
- [RecordingAvailableCallback](docs/RecordingAvailableCallback.md)
315317
- [RecordingCompleteCallback](docs/RecordingCompleteCallback.md)
316318
- [RecordingStateEnum](docs/RecordingStateEnum.md)

api/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8994,6 +8994,26 @@ components:
89948994
- REQUEST_LOCATION
89958995
example: REPLY
89968996
type: string
8997+
rbmOpenUrlEnum:
8998+
description: "Specifies how the URL should be opened on a mobile device.\n-\
8999+
\ `BROWSER` Opens the URL in the device's default browser. If application\
9000+
\ is not set or the device doesn’t support WebView, this option is used by\
9001+
\ default. \n- `WEBVIEW` Opens the URL in an in-app WebView."
9002+
enum:
9003+
- BROWSER
9004+
- WEBVIEW
9005+
example: WEBVIEW
9006+
type: string
9007+
rbmWebViewEnum:
9008+
description: "Defines the layout of the WebView on a mobile device. It must\
9009+
\ be defined when application is set to `WEBVIEW`\n- `FULL` WebView takes\
9010+
\ the full screen. \n- `HALF` WebView takes half of the screen.\n- `TALL`\
9011+
\ WebView takes three-quarters of the screen."
9012+
enum:
9013+
- FULL
9014+
- HALF
9015+
- TALL
9016+
type: string
89979017
rbmActionText:
89989018
description: Displayed text for user to click
89999019
example: Hello world
@@ -9112,6 +9132,10 @@ components:
91129132
format: uri
91139133
maxLength: 2048
91149134
type: string
9135+
application:
9136+
$ref: "#/components/schemas/rbmOpenUrlEnum"
9137+
webviewViewMode:
9138+
$ref: "#/components/schemas/rbmWebViewEnum"
91159139
required:
91169140
- url
91179141
title: Open URL

bandwidth.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,35 @@ components:
23782378
- OPEN_URL
23792379
- REQUEST_LOCATION
23802380
example: REPLY
2381+
rbmOpenUrlEnum:
2382+
type: string
2383+
description: >-
2384+
Specifies how the URL should be opened on a mobile device.
2385+
2386+
- `BROWSER` Opens the URL in the device's default browser. If
2387+
application is not set or the device doesn’t support WebView, this
2388+
option is used by default.
2389+
2390+
- `WEBVIEW` Opens the URL in an in-app WebView.
2391+
enum:
2392+
- BROWSER
2393+
- WEBVIEW
2394+
example: WEBVIEW
2395+
rbmWebViewEnum:
2396+
type: string
2397+
description: >-
2398+
Defines the layout of the WebView on a mobile device. It must be defined
2399+
when application is set to `WEBVIEW`
2400+
2401+
- `FULL` WebView takes the full screen.
2402+
2403+
- `HALF` WebView takes half of the screen.
2404+
2405+
- `TALL` WebView takes three-quarters of the screen.
2406+
enum:
2407+
- FULL
2408+
- HALF
2409+
- TALL
23812410
rbmActionText:
23822411
title: Text
23832412
type: string
@@ -2482,6 +2511,10 @@ components:
24822511
description: The URL to open in browser.
24832512
example: https://dev.bandwidth.com
24842513
maxLength: 2048
2514+
application:
2515+
$ref: '#/components/schemas/rbmOpenUrlEnum'
2516+
webviewViewMode:
2517+
$ref: '#/components/schemas/rbmWebViewEnum'
24852518
required:
24862519
- url
24872520
multiChannelFullActions:

docs/MultiChannelAction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
|**endTime** | **OffsetDateTime** | The end time of the event. | |
2020
|**description** | **String** | The description of the event. | [optional] |
2121
|**url** | **URI** | The URL to open in browser. | |
22+
|**application** | **RbmOpenUrlEnum** | | [optional] |
23+
|**webviewViewMode** | **RbmWebViewEnum** | | [optional] |
2224

2325

2426

docs/RbmActionOpenUrl.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
|**text** | **String** | Displayed text for user to click | |
1212
|**postbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | |
1313
|**url** | **URI** | The URL to open in browser. | |
14+
|**application** | **RbmOpenUrlEnum** | | [optional] |
15+
|**webviewViewMode** | **RbmWebViewEnum** | | [optional] |
1416

1517

1618

docs/RbmOpenUrlEnum.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# RbmOpenUrlEnum
4+
5+
## Enum
6+
7+
8+
* `BROWSER` (value: `"BROWSER"`)
9+
10+
* `WEBVIEW` (value: `"WEBVIEW"`)
11+
12+
13+

docs/RbmWebViewEnum.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# RbmWebViewEnum
4+
5+
## Enum
6+
7+
8+
* `FULL` (value: `"FULL"`)
9+
10+
* `HALF` (value: `"HALF"`)
11+
12+
* `TALL` (value: `"TALL"`)
13+
14+
15+

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import com.bandwidth.sdk.model.RbmActionOpenUrl;
2222
import com.bandwidth.sdk.model.RbmActionTypeEnum;
2323
import com.bandwidth.sdk.model.RbmActionViewLocation;
24+
import com.bandwidth.sdk.model.RbmOpenUrlEnum;
25+
import com.bandwidth.sdk.model.RbmWebViewEnum;
2426
import com.google.gson.TypeAdapter;
2527
import com.google.gson.annotations.JsonAdapter;
2628
import com.google.gson.annotations.SerializedName;

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

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import java.util.Objects;
1717
import java.util.Locale;
1818
import com.bandwidth.sdk.model.RbmActionTypeEnum;
19+
import com.bandwidth.sdk.model.RbmOpenUrlEnum;
20+
import com.bandwidth.sdk.model.RbmWebViewEnum;
1921
import com.google.gson.TypeAdapter;
2022
import com.google.gson.annotations.JsonAdapter;
2123
import com.google.gson.annotations.SerializedName;
@@ -74,6 +76,16 @@ public class RbmActionOpenUrl {
7476
@javax.annotation.Nonnull
7577
private URI url;
7678

79+
public static final String SERIALIZED_NAME_APPLICATION = "application";
80+
@SerializedName(SERIALIZED_NAME_APPLICATION)
81+
@javax.annotation.Nullable
82+
private RbmOpenUrlEnum application;
83+
84+
public static final String SERIALIZED_NAME_WEBVIEW_VIEW_MODE = "webviewViewMode";
85+
@SerializedName(SERIALIZED_NAME_WEBVIEW_VIEW_MODE)
86+
@javax.annotation.Nullable
87+
private RbmWebViewEnum webviewViewMode;
88+
7789
public RbmActionOpenUrl() {
7890
}
7991

@@ -152,6 +164,44 @@ public void setUrl(@javax.annotation.Nonnull URI url) {
152164
this.url = url;
153165
}
154166

167+
168+
public RbmActionOpenUrl application(@javax.annotation.Nullable RbmOpenUrlEnum application) {
169+
this.application = application;
170+
return this;
171+
}
172+
173+
/**
174+
* Get application
175+
* @return application
176+
*/
177+
@javax.annotation.Nullable
178+
public RbmOpenUrlEnum getApplication() {
179+
return application;
180+
}
181+
182+
public void setApplication(@javax.annotation.Nullable RbmOpenUrlEnum application) {
183+
this.application = application;
184+
}
185+
186+
187+
public RbmActionOpenUrl webviewViewMode(@javax.annotation.Nullable RbmWebViewEnum webviewViewMode) {
188+
this.webviewViewMode = webviewViewMode;
189+
return this;
190+
}
191+
192+
/**
193+
* Get webviewViewMode
194+
* @return webviewViewMode
195+
*/
196+
@javax.annotation.Nullable
197+
public RbmWebViewEnum getWebviewViewMode() {
198+
return webviewViewMode;
199+
}
200+
201+
public void setWebviewViewMode(@javax.annotation.Nullable RbmWebViewEnum webviewViewMode) {
202+
this.webviewViewMode = webviewViewMode;
203+
}
204+
155205
/**
156206
* A container for additional, undeclared properties.
157207
* This is a holder for any undeclared properties as specified with
@@ -210,13 +260,15 @@ public boolean equals(Object o) {
210260
return Objects.equals(this.type, rbmActionOpenUrl.type) &&
211261
Objects.equals(this.text, rbmActionOpenUrl.text) &&
212262
Arrays.equals(this.postbackData, rbmActionOpenUrl.postbackData) &&
213-
Objects.equals(this.url, rbmActionOpenUrl.url)&&
263+
Objects.equals(this.url, rbmActionOpenUrl.url) &&
264+
Objects.equals(this.application, rbmActionOpenUrl.application) &&
265+
Objects.equals(this.webviewViewMode, rbmActionOpenUrl.webviewViewMode)&&
214266
Objects.equals(this.additionalProperties, rbmActionOpenUrl.additionalProperties);
215267
}
216268

217269
@Override
218270
public int hashCode() {
219-
return Objects.hash(type, text, Arrays.hashCode(postbackData), url, additionalProperties);
271+
return Objects.hash(type, text, Arrays.hashCode(postbackData), url, application, webviewViewMode, additionalProperties);
220272
}
221273

222274
@Override
@@ -227,6 +279,8 @@ public String toString() {
227279
sb.append(" text: ").append(toIndentedString(text)).append("\n");
228280
sb.append(" postbackData: ").append(toIndentedString(postbackData)).append("\n");
229281
sb.append(" url: ").append(toIndentedString(url)).append("\n");
282+
sb.append(" application: ").append(toIndentedString(application)).append("\n");
283+
sb.append(" webviewViewMode: ").append(toIndentedString(webviewViewMode)).append("\n");
230284
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
231285
sb.append("}");
232286
return sb.toString();
@@ -249,7 +303,7 @@ private String toIndentedString(Object o) {
249303

250304
static {
251305
// a set of all properties/fields (JSON key names)
252-
openapiFields = new HashSet<String>(Arrays.asList("type", "text", "postbackData", "url"));
306+
openapiFields = new HashSet<String>(Arrays.asList("type", "text", "postbackData", "url", "application", "webviewViewMode"));
253307

254308
// a set of required properties/fields (JSON key names)
255309
openapiRequiredFields = new HashSet<String>(Arrays.asList("type", "text", "postbackData", "url"));
@@ -283,6 +337,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
283337
if (!jsonObj.get("url").isJsonPrimitive()) {
284338
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString()));
285339
}
340+
// validate the optional field `application`
341+
if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) {
342+
RbmOpenUrlEnum.validateJsonElement(jsonObj.get("application"));
343+
}
344+
// validate the optional field `webviewViewMode`
345+
if (jsonObj.get("webviewViewMode") != null && !jsonObj.get("webviewViewMode").isJsonNull()) {
346+
RbmWebViewEnum.validateJsonElement(jsonObj.get("webviewViewMode"));
347+
}
286348
}
287349

288350
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

0 commit comments

Comments
 (0)