Skip to content
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
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ docs/RbmMessageContentFile.md
docs/RbmMessageContentRichCard.md
docs/RbmMessageContentText.md
docs/RbmMessageMedia.md
docs/RbmOpenUrlEnum.md
docs/RbmStandaloneCard.md
docs/RbmSuggestionResponse.md
docs/RbmWebViewEnum.md
docs/RecordingAvailableCallback.md
docs/RecordingCompleteCallback.md
docs/RecordingStateEnum.md
Expand Down Expand Up @@ -356,8 +358,10 @@ src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java
src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java
src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java
src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java
src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java
src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java
src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java
src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java
src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java
src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ Class | Method | HTTP request | Description
- [RbmMessageContentRichCard](docs/RbmMessageContentRichCard.md)
- [RbmMessageContentText](docs/RbmMessageContentText.md)
- [RbmMessageMedia](docs/RbmMessageMedia.md)
- [RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md)
- [RbmStandaloneCard](docs/RbmStandaloneCard.md)
- [RbmSuggestionResponse](docs/RbmSuggestionResponse.md)
- [RbmWebViewEnum](docs/RbmWebViewEnum.md)
- [RecordingAvailableCallback](docs/RecordingAvailableCallback.md)
- [RecordingCompleteCallback](docs/RecordingCompleteCallback.md)
- [RecordingStateEnum](docs/RecordingStateEnum.md)
Expand Down
24 changes: 24 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8994,6 +8994,26 @@ components:
- REQUEST_LOCATION
example: REPLY
type: string
rbmOpenUrlEnum:
description: "Specifies how the URL should be opened on a mobile device.\n-\
\ `BROWSER` Opens the URL in the device's default browser. If application\
\ is not set or the device doesn’t support WebView, this option is used by\
\ default. \n- `WEBVIEW` Opens the URL in an in-app WebView."
enum:
- BROWSER
- WEBVIEW
example: WEBVIEW
type: string
rbmWebViewEnum:
description: "Defines the layout of the WebView on a mobile device. It must\
\ be defined when application is set to `WEBVIEW`\n- `FULL` WebView takes\
\ the full screen. \n- `HALF` WebView takes half of the screen.\n- `TALL`\
\ WebView takes three-quarters of the screen."
enum:
- FULL
- HALF
- TALL
type: string
rbmActionText:
description: Displayed text for user to click
example: Hello world
Expand Down Expand Up @@ -9112,6 +9132,10 @@ components:
format: uri
maxLength: 2048
type: string
application:
$ref: "#/components/schemas/rbmOpenUrlEnum"
webviewViewMode:
$ref: "#/components/schemas/rbmWebViewEnum"
required:
- url
title: Open URL
Expand Down
33 changes: 33 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2378,6 +2378,35 @@ components:
- OPEN_URL
- REQUEST_LOCATION
example: REPLY
rbmOpenUrlEnum:
type: string
description: >-
Specifies how the URL should be opened on a mobile device.

- `BROWSER` Opens the URL in the device's default browser. If
application is not set or the device doesn’t support WebView, this
option is used by default.

- `WEBVIEW` Opens the URL in an in-app WebView.
enum:
- BROWSER
- WEBVIEW
example: WEBVIEW
rbmWebViewEnum:
type: string
description: >-
Defines the layout of the WebView on a mobile device. It must be defined
when application is set to `WEBVIEW`

- `FULL` WebView takes the full screen.

- `HALF` WebView takes half of the screen.

- `TALL` WebView takes three-quarters of the screen.
enum:
- FULL
- HALF
- TALL
rbmActionText:
title: Text
type: string
Expand Down Expand Up @@ -2482,6 +2511,10 @@ components:
description: The URL to open in browser.
example: https://dev.bandwidth.com
maxLength: 2048
application:
$ref: '#/components/schemas/rbmOpenUrlEnum'
webviewViewMode:
$ref: '#/components/schemas/rbmWebViewEnum'
required:
- url
multiChannelFullActions:
Expand Down
2 changes: 2 additions & 0 deletions docs/MultiChannelAction.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
|**endTime** | **OffsetDateTime** | The end time of the event. | |
|**description** | **String** | The description of the event. | [optional] |
|**url** | **URI** | The URL to open in browser. | |
|**application** | **RbmOpenUrlEnum** | | [optional] |
|**webviewViewMode** | **RbmWebViewEnum** | | [optional] |



2 changes: 2 additions & 0 deletions docs/RbmActionOpenUrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
|**text** | **String** | Displayed text for user to click | |
|**postbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | |
|**url** | **URI** | The URL to open in browser. | |
|**application** | **RbmOpenUrlEnum** | | [optional] |
|**webviewViewMode** | **RbmWebViewEnum** | | [optional] |



13 changes: 13 additions & 0 deletions docs/RbmOpenUrlEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# RbmOpenUrlEnum

## Enum


* `BROWSER` (value: `"BROWSER"`)

* `WEBVIEW` (value: `"WEBVIEW"`)



15 changes: 15 additions & 0 deletions docs/RbmWebViewEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# RbmWebViewEnum

## Enum


* `FULL` (value: `"FULL"`)

* `HALF` (value: `"HALF"`)

* `TALL` (value: `"TALL"`)



Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import com.bandwidth.sdk.model.RbmActionOpenUrl;
import com.bandwidth.sdk.model.RbmActionTypeEnum;
import com.bandwidth.sdk.model.RbmActionViewLocation;
import com.bandwidth.sdk.model.RbmOpenUrlEnum;
import com.bandwidth.sdk.model.RbmWebViewEnum;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Expand Down
68 changes: 65 additions & 3 deletions src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.util.Objects;
import java.util.Locale;
import com.bandwidth.sdk.model.RbmActionTypeEnum;
import com.bandwidth.sdk.model.RbmOpenUrlEnum;
import com.bandwidth.sdk.model.RbmWebViewEnum;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -74,6 +76,16 @@ public class RbmActionOpenUrl {
@javax.annotation.Nonnull
private URI url;

public static final String SERIALIZED_NAME_APPLICATION = "application";
@SerializedName(SERIALIZED_NAME_APPLICATION)
@javax.annotation.Nullable
private RbmOpenUrlEnum application;

public static final String SERIALIZED_NAME_WEBVIEW_VIEW_MODE = "webviewViewMode";
@SerializedName(SERIALIZED_NAME_WEBVIEW_VIEW_MODE)
@javax.annotation.Nullable
private RbmWebViewEnum webviewViewMode;

public RbmActionOpenUrl() {
}

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


public RbmActionOpenUrl application(@javax.annotation.Nullable RbmOpenUrlEnum application) {
this.application = application;
return this;
}

/**
* Get application
* @return application
*/
@javax.annotation.Nullable
public RbmOpenUrlEnum getApplication() {
return application;
}

public void setApplication(@javax.annotation.Nullable RbmOpenUrlEnum application) {
this.application = application;
}


public RbmActionOpenUrl webviewViewMode(@javax.annotation.Nullable RbmWebViewEnum webviewViewMode) {
this.webviewViewMode = webviewViewMode;
return this;
}

/**
* Get webviewViewMode
* @return webviewViewMode
*/
@javax.annotation.Nullable
public RbmWebViewEnum getWebviewViewMode() {
return webviewViewMode;
}

public void setWebviewViewMode(@javax.annotation.Nullable RbmWebViewEnum webviewViewMode) {
this.webviewViewMode = webviewViewMode;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -210,13 +260,15 @@ public boolean equals(Object o) {
return Objects.equals(this.type, rbmActionOpenUrl.type) &&
Objects.equals(this.text, rbmActionOpenUrl.text) &&
Arrays.equals(this.postbackData, rbmActionOpenUrl.postbackData) &&
Objects.equals(this.url, rbmActionOpenUrl.url)&&
Objects.equals(this.url, rbmActionOpenUrl.url) &&
Objects.equals(this.application, rbmActionOpenUrl.application) &&
Objects.equals(this.webviewViewMode, rbmActionOpenUrl.webviewViewMode)&&
Objects.equals(this.additionalProperties, rbmActionOpenUrl.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(type, text, Arrays.hashCode(postbackData), url, additionalProperties);
return Objects.hash(type, text, Arrays.hashCode(postbackData), url, application, webviewViewMode, additionalProperties);
}

@Override
Expand All @@ -227,6 +279,8 @@ public String toString() {
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append(" postbackData: ").append(toIndentedString(postbackData)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" application: ").append(toIndentedString(application)).append("\n");
sb.append(" webviewViewMode: ").append(toIndentedString(webviewViewMode)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand All @@ -249,7 +303,7 @@ private String toIndentedString(Object o) {

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

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("type", "text", "postbackData", "url"));
Expand Down Expand Up @@ -283,6 +337,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (!jsonObj.get("url").isJsonPrimitive()) {
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()));
}
// validate the optional field `application`
if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) {
RbmOpenUrlEnum.validateJsonElement(jsonObj.get("application"));
}
// validate the optional field `webviewViewMode`
if (jsonObj.get("webviewViewMode") != null && !jsonObj.get("webviewViewMode").isJsonNull()) {
RbmWebViewEnum.validateJsonElement(jsonObj.get("webviewViewMode"));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
80 changes: 80 additions & 0 deletions src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Bandwidth
* Bandwidth's Communication APIs
*
* The version of the OpenAPI document: 1.0.0
* Contact: letstalk@bandwidth.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package com.bandwidth.sdk.model;

import java.util.Objects;
import java.util.Locale;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import java.util.Locale;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
* Specifies how the URL should be opened on a mobile device. - &#x60;BROWSER&#x60; Opens the URL in the device&#39;s default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - &#x60;WEBVIEW&#x60; Opens the URL in an in-app WebView.
*/
@JsonAdapter(RbmOpenUrlEnum.Adapter.class)
public enum RbmOpenUrlEnum {

BROWSER("BROWSER"),

WEBVIEW("WEBVIEW");

private String value;

RbmOpenUrlEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static RbmOpenUrlEnum fromValue(String value) {
for (RbmOpenUrlEnum b : RbmOpenUrlEnum.values()) {
if (b.value.equalsIgnoreCase(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<RbmOpenUrlEnum> {
@Override
public void write(final JsonWriter jsonWriter, final RbmOpenUrlEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public RbmOpenUrlEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return RbmOpenUrlEnum.fromValue(value);
}
}

public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
RbmOpenUrlEnum.fromValue(value);
}
}

Loading