diff --git a/api/openapi.yaml b/api/openapi.yaml index f553c016..cafcd1e3 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -9998,6 +9998,8 @@ components: title: RBM Media type: object rbmCardContent: + description: "Must contain at least one of title, description, or media to be\ + \ valid." properties: title: description: The title of the card. Must be 200 characters or less. @@ -10036,7 +10038,6 @@ components: required: - cardContent - orientation - - thumbnailImageAlignment title: Standalone Card type: object standaloneCardOrientationEnum: @@ -10046,8 +10047,8 @@ components: example: VERTICAL type: string thumbnailAlignmentEnum: - description: The alignment of the thumbnail image in the card. Only applicable - if the card using horizontal orientation. + description: The alignment of the thumbnail image in the card. Required when + orientation is HORIZONTAL. enum: - LEFT - RIGHT @@ -10061,6 +10062,7 @@ components: items: $ref: "#/components/schemas/rbmCardContent" maxItems: 10 + minItems: 2 type: array suggestions: description: An array of suggested actions for the recipient. @@ -10132,7 +10134,9 @@ components: type: string rbmWebViewEnum: description: |- - Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` + Defines the layout of the WebView on a mobile device. It must be defined + when application is set to `WEBVIEW` and must not be set when application + is set to `BROWSER`. - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. @@ -10200,12 +10204,14 @@ components: - $ref: "#/components/schemas/rbmActionBase" - properties: latitude: - description: The latitude of the location. + description: "The latitude of the location. Must be in range [-90.000000,\ + \ 90.000000]." example: "37.7749" format: double type: string longitude: - description: The longitude of the location. + description: "The longitude of the location. Must be in range [-180.000000,\ + \ 180.000000]." example: "-122.4194" format: double type: string @@ -10229,12 +10235,14 @@ components: maxLength: 100 type: string startTime: - description: The start time of the event. + description: "The start time of the event. Must be a valid RFC-3339 value,\ + \ e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00." example: 2022-09-14T18:20:16Z format: date-time type: string endTime: - description: The end time of the event. + description: "The end time of the event. Must be a valid RFC-3339 value,\ + \ e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00." example: 2022-09-14T18:20:16Z format: date-time type: string @@ -10254,7 +10262,8 @@ components: - $ref: "#/components/schemas/rbmActionBase" - properties: url: - description: The URL to open in browser. + description: The URL to open in browser. Must use http:// or https:// + scheme. example: https://dev.bandwidth.com format: uri maxLength: 2048 diff --git a/bandwidth.yml b/bandwidth.yml index 84e00b33..5927a5e8 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2436,6 +2436,7 @@ components: - media rbmCardContent: type: object + description: Must contain at least one of title, description, or media to be valid. properties: title: type: string @@ -2478,7 +2479,6 @@ components: $ref: '#/components/schemas/multiChannelFullActions' required: - orientation - - thumbnailImageAlignment - cardContent standaloneCardOrientationEnum: type: string @@ -2489,8 +2489,8 @@ components: thumbnailAlignmentEnum: type: string description: >- - The alignment of the thumbnail image in the card. Only applicable if the - card using horizontal orientation. + The alignment of the thumbnail image in the card. Required when + orientation is HORIZONTAL. enum: - LEFT - RIGHT @@ -2505,6 +2505,7 @@ components: type: array items: $ref: '#/components/schemas/rbmCardContent' + minItems: 2 maxItems: 10 suggestions: $ref: '#/components/schemas/multiChannelFullActions' @@ -2568,7 +2569,11 @@ components: type: string description: >- Defines the layout of the WebView on a mobile device. It must be defined - when application is set to `WEBVIEW` + + when application is set to `WEBVIEW` and must not be set when + application + + is set to `BROWSER`. - `FULL` WebView takes the full screen. @@ -2626,12 +2631,16 @@ components: latitude: type: string format: double - description: The latitude of the location. + description: >- + The latitude of the location. Must be in range [-90.000000, + 90.000000]. example: '37.7749' longitude: type: string format: double - description: The longitude of the location. + description: >- + The longitude of the location. Must be in range [-180.000000, + 180.000000]. example: '-122.4194' label: type: string @@ -2655,12 +2664,16 @@ components: startTime: type: string format: date-time - description: The start time of the event. + description: >- + The start time of the event. Must be a valid RFC-3339 value, + e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. example: 2022-09-14T18:20:16.000Z endTime: type: string format: date-time - description: The end time of the event. + description: >- + The end time of the event. Must be a valid RFC-3339 value, e.g., + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. example: 2022-09-14T18:20:16.000Z description: type: string @@ -2680,7 +2693,7 @@ components: url: type: string format: uri - description: The URL to open in browser. + description: The URL to open in browser. Must use http:// or https:// scheme. example: https://dev.bandwidth.com maxLength: 2048 application: diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index d34f2786..5722238b 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -11,14 +11,14 @@ |**text** | **String** | Displayed text for user to click | | |**postbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | | |**phoneNumber** | **String** | The phone number to dial. Must be E164 format. | | -|**latitude** | **Double** | The latitude of the location. | | -|**longitude** | **Double** | The longitude of the location. | | +|**latitude** | **Double** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | | +|**longitude** | **Double** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | | |**label** | **String** | The label of the location. | [optional] | |**title** | **String** | The title of the event. | | -|**startTime** | **OffsetDateTime** | The start time of the event. | | -|**endTime** | **OffsetDateTime** | The end time of the event. | | +|**startTime** | **OffsetDateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | +|**endTime** | **OffsetDateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | |**description** | **String** | The description of the event. | [optional] | -|**url** | **URI** | The URL to open in browser. | | +|**url** | **URI** | The URL to open in browser. Must use http:// or https:// scheme. | | |**application** | **RbmOpenUrlEnum** | | [optional] | |**webviewViewMode** | **RbmWebViewEnum** | | [optional] | diff --git a/docs/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md index acf9dcf3..f84cebfc 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -11,8 +11,8 @@ |**text** | **String** | Displayed text for user to click | | |**postbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | | |**title** | **String** | The title of the event. | | -|**startTime** | **OffsetDateTime** | The start time of the event. | | -|**endTime** | **OffsetDateTime** | The end time of the event. | | +|**startTime** | **OffsetDateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | +|**endTime** | **OffsetDateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | |**description** | **String** | The description of the event. | [optional] | diff --git a/docs/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/MultiChannelChannelListRBMObjectAllOfContent.md index 740b8ea0..55869495 100644 --- a/docs/MultiChannelChannelListRBMObjectAllOfContent.md +++ b/docs/MultiChannelChannelListRBMObjectAllOfContent.md @@ -12,7 +12,7 @@ The content of the message. |**suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | |**media** | [**List<RbmMessageContentFile>**](RbmMessageContentFile.md) | | | |**orientation** | **StandaloneCardOrientationEnum** | | | -|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | | +|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | [optional] | |**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | | |**cardWidth** | **CardWidthEnum** | | | |**cardContents** | [**List<RbmCardContent>**](RbmCardContent.md) | | | diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index fe27d6b0..8059c738 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -10,7 +10,7 @@ |**type** | **RbmActionTypeEnum** | | | |**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. | | +|**url** | **URI** | The URL to open in browser. Must use http:// or https:// scheme. | | |**application** | **RbmOpenUrlEnum** | | [optional] | |**webviewViewMode** | **RbmWebViewEnum** | | [optional] | diff --git a/docs/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md index dd57d3f8..8e00e99d 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -10,8 +10,8 @@ |**type** | **RbmActionTypeEnum** | | | |**text** | **String** | Displayed text for user to click | | |**postbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | | -|**latitude** | **Double** | The latitude of the location. | | -|**longitude** | **Double** | The longitude of the location. | | +|**latitude** | **Double** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | | +|**longitude** | **Double** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | | |**label** | **String** | The label of the location. | [optional] | diff --git a/docs/RbmCardContent.md b/docs/RbmCardContent.md index 46414305..d9d40373 100644 --- a/docs/RbmCardContent.md +++ b/docs/RbmCardContent.md @@ -2,6 +2,7 @@ # RbmCardContent +Must contain at least one of title, description, or media to be valid. ## Properties diff --git a/docs/RbmMessageContentRichCard.md b/docs/RbmMessageContentRichCard.md index 52551728..52db6c58 100644 --- a/docs/RbmMessageContentRichCard.md +++ b/docs/RbmMessageContentRichCard.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**orientation** | **StandaloneCardOrientationEnum** | | | -|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | | +|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | [optional] | |**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | | |**suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | |**cardWidth** | **CardWidthEnum** | | | diff --git a/docs/RbmStandaloneCard.md b/docs/RbmStandaloneCard.md index 140aa93a..9ee3ebfd 100644 --- a/docs/RbmStandaloneCard.md +++ b/docs/RbmStandaloneCard.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**orientation** | **StandaloneCardOrientationEnum** | | | -|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | | +|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | [optional] | |**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | | |**suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index c2e9f2bc..64c14e06 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -174,7 +174,7 @@ public MultiChannelActionCalendarEvent startTime(@javax.annotation.Nonnull Offse } /** - * The start time of the event. + * The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. * @return startTime */ @javax.annotation.Nonnull @@ -193,7 +193,7 @@ public MultiChannelActionCalendarEvent endTime(@javax.annotation.Nonnull OffsetD } /** - * The end time of the event. + * The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. * @return endTime */ @javax.annotation.Nonnull diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java index 99f8b4a0..a302ec52 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -152,7 +152,7 @@ public RbmActionOpenUrl url(@javax.annotation.Nonnull URI url) { } /** - * The URL to open in browser. + * The URL to open in browser. Must use http:// or https:// scheme. * @return url */ @javax.annotation.Nonnull diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java index df95ca61..0b762256 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -149,7 +149,7 @@ public RbmActionViewLocation latitude(@javax.annotation.Nonnull Double latitude) } /** - * The latitude of the location. + * The latitude of the location. Must be in range [-90.000000, 90.000000]. * @return latitude */ @javax.annotation.Nonnull @@ -168,7 +168,7 @@ public RbmActionViewLocation longitude(@javax.annotation.Nonnull Double longitud } /** - * The longitude of the location. + * The longitude of the location. Must be in range [-180.000000, 180.000000]. * @return longitude */ @javax.annotation.Nonnull diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java index 4f2aa932..cc63c6f8 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -52,7 +52,7 @@ import com.bandwidth.sdk.JSON; /** - * RbmCardContent + * Must contain at least one of title, description, or media to be valid. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmCardContent { diff --git a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index bad48f96..dca067ed 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -65,7 +65,7 @@ public class RbmStandaloneCard { public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_ALIGNMENT = "thumbnailImageAlignment"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_ALIGNMENT) - @javax.annotation.Nonnull + @javax.annotation.Nullable private ThumbnailAlignmentEnum thumbnailImageAlignment; public static final String SERIALIZED_NAME_CARD_CONTENT = "cardContent"; @@ -100,7 +100,7 @@ public void setOrientation(@javax.annotation.Nonnull StandaloneCardOrientationEn } - public RbmStandaloneCard thumbnailImageAlignment(@javax.annotation.Nonnull ThumbnailAlignmentEnum thumbnailImageAlignment) { + public RbmStandaloneCard thumbnailImageAlignment(@javax.annotation.Nullable ThumbnailAlignmentEnum thumbnailImageAlignment) { this.thumbnailImageAlignment = thumbnailImageAlignment; return this; } @@ -109,12 +109,12 @@ public RbmStandaloneCard thumbnailImageAlignment(@javax.annotation.Nonnull Thumb * Get thumbnailImageAlignment * @return thumbnailImageAlignment */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ThumbnailAlignmentEnum getThumbnailImageAlignment() { return thumbnailImageAlignment; } - public void setThumbnailImageAlignment(@javax.annotation.Nonnull ThumbnailAlignmentEnum thumbnailImageAlignment) { + public void setThumbnailImageAlignment(@javax.annotation.Nullable ThumbnailAlignmentEnum thumbnailImageAlignment) { this.thumbnailImageAlignment = thumbnailImageAlignment; } @@ -264,7 +264,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent")); + openapiRequiredFields = new HashSet(Arrays.asList("orientation", "cardContent")); } /** @@ -289,8 +289,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `orientation` StandaloneCardOrientationEnum.validateJsonElement(jsonObj.get("orientation")); - // validate the required field `thumbnailImageAlignment` - ThumbnailAlignmentEnum.validateJsonElement(jsonObj.get("thumbnailImageAlignment")); + // validate the optional field `thumbnailImageAlignment` + if (jsonObj.get("thumbnailImageAlignment") != null && !jsonObj.get("thumbnailImageAlignment").isJsonNull()) { + ThumbnailAlignmentEnum.validateJsonElement(jsonObj.get("thumbnailImageAlignment")); + } // validate the required field `cardContent` RbmCardContent.validateJsonElement(jsonObj.get("cardContent")); if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { diff --git a/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java index 66d6526a..c0950ea5 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java @@ -26,7 +26,7 @@ import com.google.gson.stream.JsonWriter; /** - * 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. + * Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` and must not be set when application is set to `BROWSER`. - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. */ @JsonAdapter(RbmWebViewEnum.Adapter.class) public enum RbmWebViewEnum { diff --git a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java index 999b112a..0c859510 100644 --- a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java @@ -26,7 +26,7 @@ import com.google.gson.stream.JsonWriter; /** - * The alignment of the thumbnail image in the card. Only applicable if the card using horizontal orientation. + * The alignment of the thumbnail image in the card. Required when orientation is HORIZONTAL. */ @JsonAdapter(ThumbnailAlignmentEnum.Adapter.class) public enum ThumbnailAlignmentEnum {