diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 8a6ae885..0da4f8c5 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -11,6 +11,10 @@ docs/AsyncLookupRequest.md
docs/BlockedWebhook.md
docs/BridgeCompleteCallback.md
docs/BridgeTargetCompleteCallback.md
+docs/BrtcError.md
+docs/BrtcErrorResponse.md
+docs/BrtcErrorSource.md
+docs/BrtcLink.md
docs/BusinessEntityTypeEnum.md
docs/BusinessRegistrationTypeEnum.md
docs/CallDirectionEnum.md
@@ -67,9 +71,7 @@ docs/EndpointStatusEnum.md
docs/EndpointTypeEnum.md
docs/Endpoints.md
docs/EndpointsApi.md
-docs/Error.md
docs/ErrorObject.md
-docs/ErrorResponse.md
docs/ErrorSource.md
docs/FailureWebhook.md
docs/FieldError.md
@@ -207,6 +209,7 @@ docs/VoiceApiError.md
docs/VoiceCodeResponse.md
docs/WebhookSubscription.md
docs/WebhookSubscriptionBasicAuthentication.md
+docs/WebhookSubscriptionError.md
docs/WebhookSubscriptionRequestSchema.md
docs/WebhookSubscriptionTypeEnum.md
docs/WebhookSubscriptionsListBody.md
@@ -261,6 +264,10 @@ src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java
src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java
src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java
src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java
+src/main/java/com/bandwidth/sdk/model/BrtcError.java
+src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java
+src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java
+src/main/java/com/bandwidth/sdk/model/BrtcLink.java
src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java
src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java
src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java
@@ -314,9 +321,7 @@ src/main/java/com/bandwidth/sdk/model/EndpointResponse.java
src/main/java/com/bandwidth/sdk/model/EndpointStatusEnum.java
src/main/java/com/bandwidth/sdk/model/EndpointTypeEnum.java
src/main/java/com/bandwidth/sdk/model/Endpoints.java
-src/main/java/com/bandwidth/sdk/model/Error.java
src/main/java/com/bandwidth/sdk/model/ErrorObject.java
-src/main/java/com/bandwidth/sdk/model/ErrorResponse.java
src/main/java/com/bandwidth/sdk/model/ErrorSource.java
src/main/java/com/bandwidth/sdk/model/FailureWebhook.java
src/main/java/com/bandwidth/sdk/model/FieldError.java
@@ -444,6 +449,7 @@ src/main/java/com/bandwidth/sdk/model/VoiceApiError.java
src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java
src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java
src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java
+src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java
src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java
src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java
src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java
diff --git a/README.md b/README.md
index 34bf15dc..0f80d7dc 100644
--- a/README.md
+++ b/README.md
@@ -196,6 +196,10 @@ Class | Method | HTTP request | Description
- [BlockedWebhook](docs/BlockedWebhook.md)
- [BridgeCompleteCallback](docs/BridgeCompleteCallback.md)
- [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md)
+ - [BrtcError](docs/BrtcError.md)
+ - [BrtcErrorResponse](docs/BrtcErrorResponse.md)
+ - [BrtcErrorSource](docs/BrtcErrorSource.md)
+ - [BrtcLink](docs/BrtcLink.md)
- [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md)
- [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md)
- [CallDirectionEnum](docs/CallDirectionEnum.md)
@@ -249,9 +253,7 @@ Class | Method | HTTP request | Description
- [EndpointStatusEnum](docs/EndpointStatusEnum.md)
- [EndpointTypeEnum](docs/EndpointTypeEnum.md)
- [Endpoints](docs/Endpoints.md)
- - [Error](docs/Error.md)
- [ErrorObject](docs/ErrorObject.md)
- - [ErrorResponse](docs/ErrorResponse.md)
- [ErrorSource](docs/ErrorSource.md)
- [FailureWebhook](docs/FailureWebhook.md)
- [FieldError](docs/FieldError.md)
@@ -380,6 +382,7 @@ Class | Method | HTTP request | Description
- [VoiceCodeResponse](docs/VoiceCodeResponse.md)
- [WebhookSubscription](docs/WebhookSubscription.md)
- [WebhookSubscriptionBasicAuthentication](docs/WebhookSubscriptionBasicAuthentication.md)
+ - [WebhookSubscriptionError](docs/WebhookSubscriptionError.md)
- [WebhookSubscriptionRequestSchema](docs/WebhookSubscriptionRequestSchema.md)
- [WebhookSubscriptionTypeEnum](docs/WebhookSubscriptionTypeEnum.md)
- [WebhookSubscriptionsListBody](docs/WebhookSubscriptionsListBody.md)
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 62525cc2..cf852266 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -5907,7 +5907,7 @@ paths:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
"401":
content:
@@ -5916,7 +5916,7 @@ paths:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
"403":
content:
@@ -5925,7 +5925,7 @@ paths:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
"404":
content:
@@ -5934,7 +5934,7 @@ paths:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
"405":
content:
@@ -5943,7 +5943,7 @@ paths:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
"415":
content:
@@ -5952,7 +5952,7 @@ paths:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
"429":
content:
@@ -5961,8 +5961,18 @@ paths:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
"500":
content:
application/json:
@@ -5970,7 +5980,7 @@ paths:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
summary: List Endpoints
tags:
@@ -6015,7 +6025,7 @@ paths:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
"401":
content:
@@ -6024,7 +6034,7 @@ paths:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
"403":
content:
@@ -6033,7 +6043,7 @@ paths:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
"404":
content:
@@ -6042,7 +6052,7 @@ paths:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
"405":
content:
@@ -6051,7 +6061,7 @@ paths:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
"415":
content:
@@ -6060,7 +6070,7 @@ paths:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
"429":
content:
@@ -6069,8 +6079,18 @@ paths:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
"500":
content:
application/json:
@@ -6078,7 +6098,7 @@ paths:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
summary: Create Endpoint
tags:
@@ -6126,7 +6146,7 @@ paths:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
"401":
content:
@@ -6135,7 +6155,7 @@ paths:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
"403":
content:
@@ -6144,7 +6164,7 @@ paths:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
"404":
content:
@@ -6153,7 +6173,7 @@ paths:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
"405":
content:
@@ -6162,7 +6182,7 @@ paths:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
"415":
content:
@@ -6171,7 +6191,7 @@ paths:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
"429":
content:
@@ -6180,8 +6200,18 @@ paths:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
"500":
content:
application/json:
@@ -6189,7 +6219,7 @@ paths:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
summary: Delete Endpoint
tags:
@@ -6238,7 +6268,7 @@ paths:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
"401":
content:
@@ -6247,7 +6277,7 @@ paths:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
"403":
content:
@@ -6256,7 +6286,7 @@ paths:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
"404":
content:
@@ -6265,7 +6295,7 @@ paths:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
"405":
content:
@@ -6274,7 +6304,7 @@ paths:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
"415":
content:
@@ -6283,7 +6313,7 @@ paths:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
"429":
content:
@@ -6292,8 +6322,18 @@ paths:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
"500":
content:
application/json:
@@ -6301,7 +6341,7 @@ paths:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
summary: Get Endpoint
tags:
@@ -6349,7 +6389,7 @@ paths:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
"401":
content:
@@ -6358,7 +6398,7 @@ paths:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
"403":
content:
@@ -6367,7 +6407,7 @@ paths:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
"404":
content:
@@ -6376,7 +6416,7 @@ paths:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
"405":
content:
@@ -6385,7 +6425,7 @@ paths:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
"415":
content:
@@ -6394,7 +6434,7 @@ paths:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
"429":
content:
@@ -6403,8 +6443,18 @@ paths:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
"500":
content:
application/json:
@@ -6412,7 +6462,7 @@ paths:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
summary: Update Endpoint BXML
tags:
@@ -7249,11 +7299,9 @@ components:
links: []
data: null
errors:
- - id: 59512d87-7a92-4040-8e4a-78fb772019b9
- type: too_many_requests
- description: The client has sent too many requests in a given amount of
- time.
- code: "429"
+ - type: too_many_endpoints
+ description: Too many endpoints. Please delete an existing endpoint or wait
+ 24 hours for an endpoint to be removed.
serviceUnavailableErrorExample:
summary: Service Unavailable Error Example
value:
@@ -8978,7 +9026,7 @@ components:
badRequestErrorExample:
$ref: "#/components/examples/badRequestErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Bad Request
unauthorizedErrorResponse:
content:
@@ -8987,7 +9035,7 @@ components:
unauthorizedErrorExample:
$ref: "#/components/examples/unauthorizedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unauthorized
forbiddenErrorResponse:
content:
@@ -8996,7 +9044,7 @@ components:
forbiddenErrorExample:
$ref: "#/components/examples/forbiddenErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Forbidden
notFoundErrorResponse:
content:
@@ -9005,7 +9053,7 @@ components:
notFoundErrorExample:
$ref: "#/components/examples/notFoundErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Not Found
methodNotAllowedErrorResponse:
content:
@@ -9014,7 +9062,7 @@ components:
methodNotAllowedErrorExample:
$ref: "#/components/examples/methodNotAllowedErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Method Not Allowed
unsupportedMediaTypeErrorResponse:
content:
@@ -9023,7 +9071,7 @@ components:
unsuppotedMediaTypeErrorExample:
$ref: "#/components/examples/unsupportedMediaTypeErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Unsupported Media Type
tooManyRequestsErrorResponse:
content:
@@ -9032,8 +9080,18 @@ components:
tooManyRequestsErrorExample:
$ref: "#/components/examples/tooManyRequestsErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: The number of seconds the client should wait before making
+ another request.
+ explode: false
+ required: true
+ schema:
+ example: 900
+ type: integer
+ style: simple
serviceUnavailableErrorResponse:
content:
application/json:
@@ -9041,7 +9099,7 @@ components:
serviceUnavailableErrorExample:
$ref: "#/components/examples/serviceUnavailableErrorExample"
schema:
- $ref: "#/components/schemas/errorResponse"
+ $ref: "#/components/schemas/brtcErrorResponse"
description: Service Unavailable
schemas:
applicationId:
@@ -9770,9 +9828,6 @@ components:
type: array
type: object
link:
- example:
- rel: rel
- href: href
properties:
rel:
type: string
@@ -10074,7 +10129,7 @@ components:
rbmOpenUrlEnum:
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.
+ - `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
@@ -11067,9 +11122,9 @@ components:
May be cleared by setting `tag=""`
- Max length 256 characters.
+ Max length 4096 characters.
example: arbitrary text here
- maxLength: 256
+ maxLength: 4096
nullable: true
type: string
required:
@@ -11430,11 +11485,11 @@ components:
May be cleared by setting `tag=""`.
- Max length 256 characters.
+ Max length 4096 characters.
Not allowed if `state` is `completed`.
example: My Custom Tag
- maxLength: 256
+ maxLength: 4096
nullable: true
type: string
type: object
@@ -15663,7 +15718,7 @@ components:
$ref: "#/components/schemas/linksObject"
errors:
items:
- $ref: "#/components/schemas/error"
+ $ref: "#/components/schemas/webhookSubscriptionError"
type: array
data:
items:
@@ -15695,7 +15750,7 @@ components:
\ return the last page of result."
type: string
type: object
- error:
+ webhookSubscriptionError:
example:
code: 0
telephoneNumbers:
@@ -16326,6 +16381,25 @@ components:
- eventType
type: object
description: An event that occurred on an endpoint.
+ brtcLink:
+ example:
+ method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ properties:
+ href:
+ description: The full URL of the link.
+ example: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ type: string
+ rel:
+ description: The relationship of the link to the current resource.
+ example: self
+ type: string
+ method:
+ description: The HTTP method to use when making the request.
+ example: GET
+ type: string
+ type: object
page:
example:
pageNumber: 0
@@ -16356,6 +16430,66 @@ components:
required:
- pageSize
type: object
+ brtcError:
+ example:
+ code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
+ properties:
+ id:
+ description: A unique identifier for the error.
+ example: 59512d87-7a92-4040-8e4a-78fb772019b9
+ format: uuid
+ type: string
+ type:
+ description: The type of error.
+ example: resource.not_found
+ type: string
+ description:
+ description: A description of the error.
+ example: The requested resource was not found.
+ type: string
+ code:
+ description: A code that uniquely identifies the error.
+ example: "404"
+ type: string
+ source:
+ $ref: "#/components/schemas/brtcErrorSource"
+ required:
+ - description
+ - type
+ type: object
+ brtcErrorSource:
+ example:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ properties:
+ parameter:
+ description: The URI parameter that caused the error.
+ example: accountId
+ type: string
+ field:
+ description: The request body field that caused the error.
+ example: accountId
+ type: string
+ header:
+ description: The header that caused the error.
+ example: Authorization
+ type: string
+ reference:
+ description: The resource ID or path to the resource (or non-existent resource)
+ causing the error.
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ type: string
+ type: object
listEndpointsResponse:
example:
data:
@@ -16372,30 +16506,40 @@ components:
type: WEBRTC
status: CONNECTED
links:
- - rel: rel
- href: href
- - rel: rel
- href: href
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
page:
pageNumber: 0
totalPages: 10
pageSize: 10
totalElements: 100
errors:
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
properties:
links:
items:
- $ref: "#/components/schemas/link"
+ $ref: "#/components/schemas/brtcLink"
type: array
page:
$ref: "#/components/schemas/page"
@@ -16405,7 +16549,7 @@ components:
type: array
errors:
items:
- $ref: "#/components/schemas/error"
+ $ref: "#/components/schemas/brtcError"
type: array
required:
- data
@@ -16431,31 +16575,41 @@ components:
type: WEBRTC
status: CONNECTED
links:
- - rel: rel
- href: href
- - rel: rel
- href: href
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
errors:
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
properties:
links:
items:
- $ref: "#/components/schemas/link"
+ $ref: "#/components/schemas/brtcLink"
type: array
data:
$ref: "#/components/schemas/endpoint"
errors:
items:
- $ref: "#/components/schemas/error"
+ $ref: "#/components/schemas/brtcError"
type: array
required:
- data
@@ -16482,60 +16636,80 @@ components:
status: CONNECTED
token: xxxxx.yyyyy.zzzzz
links:
- - rel: rel
- href: href
- - rel: rel
- href: href
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
errors:
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
properties:
links:
items:
- $ref: "#/components/schemas/link"
+ $ref: "#/components/schemas/brtcLink"
type: array
data:
$ref: "#/components/schemas/createEndpointResponseData"
errors:
items:
- $ref: "#/components/schemas/error"
+ $ref: "#/components/schemas/brtcError"
type: array
required:
- data
- errors
- links
type: object
- errorResponse:
+ brtcErrorResponse:
example:
data: "{}"
links:
- - rel: rel
- href: href
- - rel: rel
- href: href
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ - method: GET
+ rel: self
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
errors:
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
- - code: 0
- telephoneNumbers:
- - telephoneNumber: telephoneNumber
- - telephoneNumber: telephoneNumber
- description: description
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
+ - code: "404"
+ description: The requested resource was not found.
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ field: accountId
+ parameter: accountId
+ header: Authorization
+ type: resource.not_found
properties:
links:
items:
- $ref: "#/components/schemas/link"
+ $ref: "#/components/schemas/brtcLink"
type: array
data:
additionalProperties: false
@@ -16543,7 +16717,7 @@ components:
type: object
errors:
items:
- $ref: "#/components/schemas/error"
+ $ref: "#/components/schemas/brtcError"
type: array
required:
- data
diff --git a/bandwidth.yml b/bandwidth.yml
index 4378c202..6ad54bc1 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -2571,7 +2571,7 @@ components:
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
+ 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.
@@ -3455,8 +3455,8 @@ components:
May be cleared by setting `tag=""`
- Max length 256 characters.
- maxLength: 256
+ Max length 4096 characters.
+ maxLength: 4096
example: arbitrary text here
createCallResponse:
type: object
@@ -3833,11 +3833,11 @@ components:
May be cleared by setting `tag=""`.
- Max length 256 characters.
+ Max length 4096 characters.
Not allowed if `state` is `completed`.
- maxLength: 256
+ maxLength: 4096
example: My Custom Tag
updateCallRecording:
type: object
@@ -6635,7 +6635,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/webhookSubscriptionError'
data:
items:
$ref: '#/components/schemas/webhookSubscription'
@@ -6661,7 +6661,7 @@ components:
If more results exist than specified by 'size', this link return the
last page of result.
type: string
- error:
+ webhookSubscriptionError:
type: object
properties:
code:
@@ -7060,6 +7060,22 @@ components:
required:
- eventType
- eventTime
+ brtcLink:
+ type: object
+ properties:
+ href:
+ type: string
+ description: The full URL of the link.
+ example: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ rel:
+ type: string
+ description: The relationship of the link to the current resource.
+ example: self
+ method:
+ type: string
+ description: The HTTP method to use when making the request.
+ example: GET
page:
type: object
properties:
@@ -7085,13 +7101,59 @@ components:
example: 0
required:
- pageSize
+ brtcError:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: A unique identifier for the error.
+ example: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type:
+ type: string
+ description: The type of error.
+ example: resource.not_found
+ description:
+ type: string
+ description: A description of the error.
+ example: The requested resource was not found.
+ code:
+ type: string
+ description: A code that uniquely identifies the error.
+ example: '404'
+ source:
+ $ref: '#/components/schemas/brtcErrorSource'
+ required:
+ - type
+ - description
+ brtcErrorSource:
+ type: object
+ properties:
+ parameter:
+ type: string
+ description: The URI parameter that caused the error.
+ example: accountId
+ field:
+ type: string
+ description: The request body field that caused the error.
+ example: accountId
+ header:
+ type: string
+ description: The header that caused the error.
+ example: Authorization
+ reference:
+ type: string
+ description: >-
+ The resource ID or path to the resource (or non-existent resource)
+ causing the error.
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
listEndpointsResponse:
type: object
properties:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
page:
$ref: '#/components/schemas/page'
data:
@@ -7101,7 +7163,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7112,13 +7174,13 @@ components:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
$ref: '#/components/schemas/endpoint'
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7129,24 +7191,24 @@ components:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
$ref: '#/components/schemas/createEndpointResponseData'
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
- errors
- errorResponse:
+ brtcErrorResponse:
type: object
properties:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
type: object
nullable: true
@@ -7154,7 +7216,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7865,7 +7927,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
badRequestErrorExample:
$ref: '#/components/examples/badRequestErrorExample'
@@ -7874,7 +7936,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
unauthorizedErrorExample:
$ref: '#/components/examples/unauthorizedErrorExample'
@@ -7883,7 +7945,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
forbiddenErrorExample:
$ref: '#/components/examples/forbiddenErrorExample'
@@ -7892,7 +7954,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
notFoundErrorExample:
$ref: '#/components/examples/notFoundErrorExample'
@@ -7901,7 +7963,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
methodNotAllowedErrorExample:
$ref: '#/components/examples/methodNotAllowedErrorExample'
@@ -7910,16 +7972,25 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
unsuppotedMediaTypeErrorExample:
$ref: '#/components/examples/unsupportedMediaTypeErrorExample'
tooManyRequestsErrorResponse:
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: >-
+ The number of seconds the client should wait before making another
+ request.
+ required: true
+ schema:
+ type: integer
+ example: 900
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
tooManyRequestsErrorExample:
$ref: '#/components/examples/tooManyRequestsErrorExample'
@@ -7928,7 +7999,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
serviceUnavailableErrorExample:
$ref: '#/components/examples/serviceUnavailableErrorExample'
@@ -9137,10 +9208,10 @@ components:
links: []
data: null
errors:
- - id: 59512d87-7a92-4040-8e4a-78fb772019b9
- type: too_many_requests
- description: The client has sent too many requests in a given amount of time.
- code: '429'
+ - type: too_many_endpoints
+ description: >-
+ Too many endpoints. Please delete an existing endpoint or wait 24
+ hours for an endpoint to be removed.
serviceUnavailableErrorExample:
summary: Service Unavailable Error Example
value:
diff --git a/docs/BrtcError.md b/docs/BrtcError.md
new file mode 100644
index 00000000..29beefb0
--- /dev/null
+++ b/docs/BrtcError.md
@@ -0,0 +1,17 @@
+
+
+# BrtcError
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **UUID** | A unique identifier for the error. | [optional] |
+|**type** | **String** | The type of error. | |
+|**description** | **String** | A description of the error. | |
+|**code** | **String** | A code that uniquely identifies the error. | [optional] |
+|**source** | [**BrtcErrorSource**](BrtcErrorSource.md) | | [optional] |
+
+
+
diff --git a/docs/ErrorResponse.md b/docs/BrtcErrorResponse.md
similarity index 51%
rename from docs/ErrorResponse.md
rename to docs/BrtcErrorResponse.md
index a5409868..163924a1 100644
--- a/docs/ErrorResponse.md
+++ b/docs/BrtcErrorResponse.md
@@ -1,15 +1,15 @@
-# ErrorResponse
+# BrtcErrorResponse
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-|**links** | [**List<Link>**](Link.md) | | |
+|**links** | [**List<BrtcLink>**](BrtcLink.md) | | |
|**data** | **Object** | | |
-|**errors** | [**List<Error>**](Error.md) | | |
+|**errors** | [**List<BrtcError>**](BrtcError.md) | | |
diff --git a/docs/BrtcErrorSource.md b/docs/BrtcErrorSource.md
new file mode 100644
index 00000000..000c5515
--- /dev/null
+++ b/docs/BrtcErrorSource.md
@@ -0,0 +1,16 @@
+
+
+# BrtcErrorSource
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**parameter** | **String** | The URI parameter that caused the error. | [optional] |
+|**field** | **String** | The request body field that caused the error. | [optional] |
+|**header** | **String** | The header that caused the error. | [optional] |
+|**reference** | **String** | The resource ID or path to the resource (or non-existent resource) causing the error. | [optional] |
+
+
+
diff --git a/docs/BrtcLink.md b/docs/BrtcLink.md
new file mode 100644
index 00000000..d9aa3828
--- /dev/null
+++ b/docs/BrtcLink.md
@@ -0,0 +1,15 @@
+
+
+# BrtcLink
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**href** | **String** | The full URL of the link. | [optional] |
+|**rel** | **String** | The relationship of the link to the current resource. | [optional] |
+|**method** | **String** | The HTTP method to use when making the request. | [optional] |
+
+
+
diff --git a/docs/CreateCall.md b/docs/CreateCall.md
index 7937060a..2561841f 100644
--- a/docs/CreateCall.md
+++ b/docs/CreateCall.md
@@ -27,7 +27,7 @@
|**callbackTimeout** | **Double** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional] |
|**machineDetection** | [**MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional] |
|**priority** | **Integer** | The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. | [optional] |
-|**tag** | **String** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters. | [optional] |
+|**tag** | **String** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. | [optional] |
diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md
index 3c481b31..1a55313d 100644
--- a/docs/CreateEndpointResponse.md
+++ b/docs/CreateEndpointResponse.md
@@ -7,9 +7,9 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-|**links** | [**List<Link>**](Link.md) | | |
+|**links** | [**List<BrtcLink>**](BrtcLink.md) | | |
|**data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | | |
-|**errors** | [**List<Error>**](Error.md) | | |
+|**errors** | [**List<BrtcError>**](BrtcError.md) | | |
diff --git a/docs/CreateEndpointResponseObject.md b/docs/CreateEndpointResponseObject.md
deleted file mode 100644
index 4506e590..00000000
--- a/docs/CreateEndpointResponseObject.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-# CreateEndpointResponseObject
-
-
-## Properties
-
-| Name | Type | Description | Notes |
-|------------ | ------------- | ------------- | -------------|
-|**endpointId** | **String** | The unique ID of the endpoint. | |
-|**type** | **EndpointTypeEnum** | | |
-|**status** | **EndpointStatusEnum** | | |
-|**creationTimestamp** | **OffsetDateTime** | The time the endpoint was created. In ISO-8601 format. | |
-|**expirationTimestamp** | **OffsetDateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | |
-|**tag** | **String** | A tag for the endpoint. | [optional] |
-|**devices** | [**List<Device>**](Device.md) | | [optional] |
-|**token** | **String** | The json web token specific to the endpoint. Used to authenticate the client with the media gateway. | |
-
-
-
diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md
index 2240efed..9c3f932d 100644
--- a/docs/EndpointResponse.md
+++ b/docs/EndpointResponse.md
@@ -7,9 +7,9 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-|**links** | [**List<Link>**](Link.md) | | |
+|**links** | [**List<BrtcLink>**](BrtcLink.md) | | |
|**data** | [**Endpoint**](Endpoint.md) | | |
-|**errors** | [**List<Error>**](Error.md) | | |
+|**errors** | [**List<BrtcError>**](BrtcError.md) | | |
diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md
index 41586cc2..81e89c9b 100644
--- a/docs/EndpointsApi.md
+++ b/docs/EndpointsApi.md
@@ -90,7 +90,7 @@ public class Example {
| **404** | Not Found | - |
| **405** | Method Not Allowed | - |
| **415** | Unsupported Media Type | - |
-| **429** | Too Many Requests | - |
+| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
| **500** | Service Unavailable | - |
@@ -171,7 +171,7 @@ null (empty response body)
| **404** | Not Found | - |
| **405** | Method Not Allowed | - |
| **415** | Unsupported Media Type | - |
-| **429** | Too Many Requests | - |
+| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
| **500** | Service Unavailable | - |
@@ -253,7 +253,7 @@ public class Example {
| **404** | Not Found | - |
| **405** | Method Not Allowed | - |
| **415** | Unsupported Media Type | - |
-| **429** | Too Many Requests | - |
+| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
| **500** | Service Unavailable | - |
@@ -341,7 +341,7 @@ public class Example {
| **404** | Not Found | - |
| **405** | Method Not Allowed | - |
| **415** | Unsupported Media Type | - |
-| **429** | Too Many Requests | - |
+| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
| **500** | Service Unavailable | - |
@@ -424,6 +424,6 @@ null (empty response body)
| **404** | Not Found | - |
| **405** | Method Not Allowed | - |
| **415** | Unsupported Media Type | - |
-| **429** | Too Many Requests | - |
+| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
| **500** | Service Unavailable | - |
diff --git a/docs/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md
index 2ab178bf..7aacc62d 100644
--- a/docs/ListEndpointsResponse.md
+++ b/docs/ListEndpointsResponse.md
@@ -7,10 +7,10 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-|**links** | [**List<Link>**](Link.md) | | |
+|**links** | [**List<BrtcLink>**](BrtcLink.md) | | |
|**page** | [**Page**](Page.md) | | [optional] |
|**data** | [**List<Endpoints>**](Endpoints.md) | | |
-|**errors** | [**List<Error>**](Error.md) | | |
+|**errors** | [**List<BrtcError>**](BrtcError.md) | | |
diff --git a/docs/LookupResult.md b/docs/LookupResult.md
index 8da97817..f411de19 100644
--- a/docs/LookupResult.md
+++ b/docs/LookupResult.md
@@ -17,7 +17,7 @@ Carrier information results for the specified telephone number.
|**deactivationDate** | **String** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] |
|**deactivationEvent** | **DeactivationEventEnum** | | [optional] |
|**latestMessageDeliveryStatus** | **LatestMessageDeliveryStatusEnum** | | [optional] |
-|**initialMessageDeliveryStatusDate** | **LocalDate** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] |
+|**initialMessageDeliveryStatusDate** | **LocalDate** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] |
|**latestMessageDeliveryStatusDate** | **LocalDate** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] |
|**rcsEnabled** | **Boolean** | [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. | [optional] |
diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md
index 98184a4f..37374086 100644
--- a/docs/UpdateCall.md
+++ b/docs/UpdateCall.md
@@ -16,7 +16,7 @@
|**redirectFallbackMethod** | **RedirectMethodEnum** | | [optional] |
|**fallbackUsername** | **String** | Basic auth username. | [optional] |
|**fallbackPassword** | **String** | Basic auth password. | [optional] |
-|**tag** | **String** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`. | [optional] |
+|**tag** | **String** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. | [optional] |
diff --git a/docs/Error.md b/docs/WebhookSubscriptionError.md
similarity index 92%
rename from docs/Error.md
rename to docs/WebhookSubscriptionError.md
index cfd9d775..3d761bef 100644
--- a/docs/Error.md
+++ b/docs/WebhookSubscriptionError.md
@@ -1,6 +1,6 @@
-# Error
+# WebhookSubscriptionError
## Properties
diff --git a/docs/WebhookSubscriptionsListBody.md b/docs/WebhookSubscriptionsListBody.md
index 4390f0e2..038a852e 100644
--- a/docs/WebhookSubscriptionsListBody.md
+++ b/docs/WebhookSubscriptionsListBody.md
@@ -9,7 +9,7 @@ A list of all webhook subscriptions registered for this account ID for this part
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**links** | [**LinksObject**](LinksObject.md) | | [optional] |
-|**errors** | [**List<Error>**](Error.md) | | [optional] |
+|**errors** | [**List<WebhookSubscriptionError>**](WebhookSubscriptionError.md) | | [optional] |
|**data** | [**List<WebhookSubscription>**](WebhookSubscription.md) | | |
diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java
index 72af1af4..f2a30beb 100644
--- a/src/main/java/com/bandwidth/sdk/JSON.java
+++ b/src/main/java/com/bandwidth/sdk/JSON.java
@@ -160,6 +160,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BlockedWebhook.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeCompleteCallback.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeTargetCompleteCallback.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BrtcError.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BrtcErrorResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BrtcErrorSource.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BrtcLink.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CallRecordingMetadata.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CallState.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CallTranscription.CustomTypeAdapterFactory());
@@ -197,9 +201,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.EndpointEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.EndpointResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Endpoints.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Error.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ErrorObject.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ErrorResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ErrorSource.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.FailureWebhook.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.FieldError.CustomTypeAdapterFactory());
@@ -304,6 +306,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.VoiceCodeResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.WebhookSubscription.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.WebhookSubscriptionBasicAuthentication.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.WebhookSubscriptionError.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.WebhookSubscriptionRequestSchema.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.WebhookSubscriptionsListBody.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
diff --git a/src/main/java/com/bandwidth/sdk/api/EndpointsApi.java b/src/main/java/com/bandwidth/sdk/api/EndpointsApi.java
index 807ba1ce..ded30ee3 100644
--- a/src/main/java/com/bandwidth/sdk/api/EndpointsApi.java
+++ b/src/main/java/com/bandwidth/sdk/api/EndpointsApi.java
@@ -27,12 +27,12 @@
import java.io.IOException;
+import com.bandwidth.sdk.model.BrtcErrorResponse;
import com.bandwidth.sdk.model.CreateEndpointResponse;
import com.bandwidth.sdk.model.CreateWebRtcConnectionRequest;
import com.bandwidth.sdk.model.EndpointResponse;
import com.bandwidth.sdk.model.EndpointStatusEnum;
import com.bandwidth.sdk.model.EndpointTypeEnum;
-import com.bandwidth.sdk.model.ErrorResponse;
import com.bandwidth.sdk.model.ListEndpointsResponse;
import java.lang.reflect.Type;
@@ -96,7 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -180,7 +180,7 @@ private okhttp3.Call createEndpointValidateBeforeCall(@javax.annotation.Nonnull
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -207,7 +207,7 @@ public CreateEndpointResponse createEndpoint(@javax.annotation.Nonnull String ac
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -236,7 +236,7 @@ public ApiResponse createEndpointWithHttpInfo(@javax.ann
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -265,7 +265,7 @@ public okhttp3.Call createEndpointAsync(@javax.annotation.Nonnull String account
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -348,7 +348,7 @@ private okhttp3.Call deleteEndpointValidateBeforeCall(@javax.annotation.Nonnull
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -374,7 +374,7 @@ public void deleteEndpoint(@javax.annotation.Nonnull String accountId, @javax.an
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -402,7 +402,7 @@ public ApiResponse deleteEndpointWithHttpInfo(@javax.annotation.Nonnull St
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -430,7 +430,7 @@ public okhttp3.Call deleteEndpointAsync(@javax.annotation.Nonnull String account
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -514,7 +514,7 @@ private okhttp3.Call getEndpointValidateBeforeCall(@javax.annotation.Nonnull Str
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -541,7 +541,7 @@ public EndpointResponse getEndpoint(@javax.annotation.Nonnull String accountId,
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -570,7 +570,7 @@ public ApiResponse getEndpointWithHttpInfo(@javax.annotation.N
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -602,7 +602,7 @@ public okhttp3.Call getEndpointAsync(@javax.annotation.Nonnull String accountId,
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -699,7 +699,7 @@ private okhttp3.Call listEndpointsValidateBeforeCall(@javax.annotation.Nonnull S
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -729,7 +729,7 @@ public ListEndpointsResponse listEndpoints(@javax.annotation.Nonnull String acco
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -761,7 +761,7 @@ public ApiResponse listEndpointsWithHttpInfo(@javax.annot
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -791,7 +791,7 @@ public okhttp3.Call listEndpointsAsync(@javax.annotation.Nonnull String accountI
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -881,7 +881,7 @@ private okhttp3.Call updateEndpointBxmlValidateBeforeCall(@javax.annotation.Nonn
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -908,7 +908,7 @@ public void updateEndpointBxml(@javax.annotation.Nonnull String accountId, @java
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
@@ -937,7 +937,7 @@ public ApiResponse updateEndpointBxmlWithHttpInfo(@javax.annotation.Nonnul
| 404 | Not Found | - |
| 405 | Method Not Allowed | - |
| 415 | Unsupported Media Type | - |
- | 429 | Too Many Requests | - |
+ | 429 | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request. |
| 500 | Service Unavailable | - |
*/
diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcError.java b/src/main/java/com/bandwidth/sdk/model/BrtcError.java
new file mode 100644
index 00000000..5a7b1f6e
--- /dev/null
+++ b/src/main/java/com/bandwidth/sdk/model/BrtcError.java
@@ -0,0 +1,414 @@
+/*
+ * 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.bandwidth.sdk.model.BrtcErrorSource;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.UUID;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Locale;
+
+import com.bandwidth.sdk.JSON;
+
+/**
+ * BrtcError
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
+public class BrtcError {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ @javax.annotation.Nullable
+ private UUID id;
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ @javax.annotation.Nonnull
+ private String type;
+
+ public static final String SERIALIZED_NAME_DESCRIPTION = "description";
+ @SerializedName(SERIALIZED_NAME_DESCRIPTION)
+ @javax.annotation.Nonnull
+ private String description;
+
+ public static final String SERIALIZED_NAME_CODE = "code";
+ @SerializedName(SERIALIZED_NAME_CODE)
+ @javax.annotation.Nullable
+ private String code;
+
+ public static final String SERIALIZED_NAME_SOURCE = "source";
+ @SerializedName(SERIALIZED_NAME_SOURCE)
+ @javax.annotation.Nullable
+ private BrtcErrorSource source;
+
+ public BrtcError() {
+ }
+
+ public BrtcError id(@javax.annotation.Nullable UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * A unique identifier for the error.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(@javax.annotation.Nullable UUID id) {
+ this.id = id;
+ }
+
+
+ public BrtcError type(@javax.annotation.Nonnull String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of error.
+ * @return type
+ */
+ @javax.annotation.Nonnull
+ public String getType() {
+ return type;
+ }
+
+ public void setType(@javax.annotation.Nonnull String type) {
+ this.type = type;
+ }
+
+
+ public BrtcError description(@javax.annotation.Nonnull String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the error.
+ * @return description
+ */
+ @javax.annotation.Nonnull
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(@javax.annotation.Nonnull String description) {
+ this.description = description;
+ }
+
+
+ public BrtcError code(@javax.annotation.Nullable String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * A code that uniquely identifies the error.
+ * @return code
+ */
+ @javax.annotation.Nullable
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(@javax.annotation.Nullable String code) {
+ this.code = code;
+ }
+
+
+ public BrtcError source(@javax.annotation.Nullable BrtcErrorSource source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get source
+ * @return source
+ */
+ @javax.annotation.Nullable
+ public BrtcErrorSource getSource() {
+ return source;
+ }
+
+ public void setSource(@javax.annotation.Nullable BrtcErrorSource source) {
+ this.source = source;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BrtcError instance itself
+ */
+ public BrtcError putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BrtcError brtcError = (BrtcError) o;
+ return Objects.equals(this.id, brtcError.id) &&
+ Objects.equals(this.type, brtcError.type) &&
+ Objects.equals(this.description, brtcError.description) &&
+ Objects.equals(this.code, brtcError.code) &&
+ Objects.equals(this.source, brtcError.source)&&
+ Objects.equals(this.additionalProperties, brtcError.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, description, code, source, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BrtcError {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" source: ").append(toIndentedString(source)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet(Arrays.asList("id", "type", "description", "code", "source"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("type", "description"));
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BrtcError
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BrtcError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcError is not found in the empty JSON string", BrtcError.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : BrtcError.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ if (!jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ if (!jsonObj.get("description").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
+ }
+ if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString()));
+ }
+ // validate the optional field `source`
+ if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) {
+ BrtcErrorSource.validateJsonElement(jsonObj.get("source"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BrtcError.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BrtcError' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BrtcError.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BrtcError value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BrtcError read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ BrtcError instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BrtcError given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BrtcError
+ * @throws IOException if the JSON string is invalid with respect to BrtcError
+ */
+ public static BrtcError fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BrtcError.class);
+ }
+
+ /**
+ * Convert an instance of BrtcError to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java
similarity index 79%
rename from src/main/java/com/bandwidth/sdk/model/ErrorResponse.java
rename to src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java
index 506e1d91..b54a27a5 100644
--- a/src/main/java/com/bandwidth/sdk/model/ErrorResponse.java
+++ b/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java
@@ -15,8 +15,8 @@
import java.util.Objects;
import java.util.Locale;
-import com.bandwidth.sdk.model.Error;
-import com.bandwidth.sdk.model.Link;
+import com.bandwidth.sdk.model.BrtcError;
+import com.bandwidth.sdk.model.BrtcLink;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -52,14 +52,14 @@
import com.bandwidth.sdk.JSON;
/**
- * ErrorResponse
+ * BrtcErrorResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
-public class ErrorResponse {
+public class BrtcErrorResponse {
public static final String SERIALIZED_NAME_LINKS = "links";
@SerializedName(SERIALIZED_NAME_LINKS)
@javax.annotation.Nonnull
- private List links = new ArrayList<>();
+ private List links = new ArrayList<>();
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName(SERIALIZED_NAME_DATA)
@@ -69,17 +69,17 @@ public class ErrorResponse {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
@javax.annotation.Nonnull
- private List errors = new ArrayList<>();
+ private List errors = new ArrayList<>();
- public ErrorResponse() {
+ public BrtcErrorResponse() {
}
- public ErrorResponse links(@javax.annotation.Nonnull List links) {
+ public BrtcErrorResponse links(@javax.annotation.Nonnull List links) {
this.links = links;
return this;
}
- public ErrorResponse addLinksItem(Link linksItem) {
+ public BrtcErrorResponse addLinksItem(BrtcLink linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
@@ -92,16 +92,16 @@ public ErrorResponse addLinksItem(Link linksItem) {
* @return links
*/
@javax.annotation.Nonnull
- public List getLinks() {
+ public List getLinks() {
return links;
}
- public void setLinks(@javax.annotation.Nonnull List links) {
+ public void setLinks(@javax.annotation.Nonnull List links) {
this.links = links;
}
- public ErrorResponse data(@javax.annotation.Nullable Object data) {
+ public BrtcErrorResponse data(@javax.annotation.Nullable Object data) {
this.data = data;
return this;
}
@@ -120,12 +120,12 @@ public void setData(@javax.annotation.Nullable Object data) {
}
- public ErrorResponse errors(@javax.annotation.Nonnull List errors) {
+ public BrtcErrorResponse errors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
return this;
}
- public ErrorResponse addErrorsItem(Error errorsItem) {
+ public BrtcErrorResponse addErrorsItem(BrtcError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
@@ -138,11 +138,11 @@ public ErrorResponse addErrorsItem(Error errorsItem) {
* @return errors
*/
@javax.annotation.Nonnull
- public List getErrors() {
+ public List getErrors() {
return errors;
}
- public void setErrors(@javax.annotation.Nonnull List errors) {
+ public void setErrors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
}
@@ -159,9 +159,9 @@ public void setErrors(@javax.annotation.Nonnull List errors) {
*
* @param key name of the property
* @param value value of the property
- * @return the ErrorResponse instance itself
+ * @return the BrtcErrorResponse instance itself
*/
- public ErrorResponse putAdditionalProperty(String key, Object value) {
+ public BrtcErrorResponse putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
@@ -200,11 +200,11 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- ErrorResponse errorResponse = (ErrorResponse) o;
- return Objects.equals(this.links, errorResponse.links) &&
- Objects.equals(this.data, errorResponse.data) &&
- Objects.equals(this.errors, errorResponse.errors)&&
- Objects.equals(this.additionalProperties, errorResponse.additionalProperties);
+ BrtcErrorResponse brtcErrorResponse = (BrtcErrorResponse) o;
+ return Objects.equals(this.links, brtcErrorResponse.links) &&
+ Objects.equals(this.data, brtcErrorResponse.data) &&
+ Objects.equals(this.errors, brtcErrorResponse.errors)&&
+ Objects.equals(this.additionalProperties, brtcErrorResponse.additionalProperties);
}
@Override
@@ -215,7 +215,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class ErrorResponse {\n");
+ sb.append("class BrtcErrorResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
@@ -251,17 +251,17 @@ private String toIndentedString(Object o) {
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to ErrorResponse
+ * @throws IOException if the JSON Element is invalid with respect to BrtcErrorResponse
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!ErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorResponse is not found in the empty JSON string", ErrorResponse.openapiRequiredFields.toString()));
+ if (!BrtcErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcErrorResponse is not found in the empty JSON string", BrtcErrorResponse.openapiRequiredFields.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : ErrorResponse.openapiRequiredFields) {
+ for (String requiredField : BrtcErrorResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
@@ -275,7 +275,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links");
// validate the required field `links` (array)
for (int i = 0; i < jsonArraylinks.size(); i++) {
- Link.validateJsonElement(jsonArraylinks.get(i));
+ BrtcLink.validateJsonElement(jsonArraylinks.get(i));
};
// ensure the json data is an array
if (!jsonObj.get("errors").isJsonArray()) {
@@ -285,7 +285,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors");
// validate the required field `errors` (array)
for (int i = 0; i < jsonArrayerrors.size(); i++) {
- Error.validateJsonElement(jsonArrayerrors.get(i));
+ BrtcError.validateJsonElement(jsonArrayerrors.get(i));
};
}
@@ -293,16 +293,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'ErrorResponse' and its subtypes
+ if (!BrtcErrorResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BrtcErrorResponse' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class));
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BrtcErrorResponse.class));
- return (TypeAdapter) new TypeAdapter() {
+ return (TypeAdapter) new TypeAdapter() {
@Override
- public void write(JsonWriter out, ErrorResponse value) throws IOException {
+ public void write(JsonWriter out, BrtcErrorResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// serialize additional properties
@@ -330,12 +330,12 @@ else if (entry.getValue() instanceof Character)
}
@Override
- public ErrorResponse read(JsonReader in) throws IOException {
+ public BrtcErrorResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
JsonObject jsonObj = jsonElement.getAsJsonObject();
// store additional fields in the deserialized instance
- ErrorResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ BrtcErrorResponse instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
@@ -362,18 +362,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
}
/**
- * Create an instance of ErrorResponse given an JSON string
+ * Create an instance of BrtcErrorResponse given an JSON string
*
* @param jsonString JSON string
- * @return An instance of ErrorResponse
- * @throws IOException if the JSON string is invalid with respect to ErrorResponse
+ * @return An instance of BrtcErrorResponse
+ * @throws IOException if the JSON string is invalid with respect to BrtcErrorResponse
*/
- public static ErrorResponse fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, ErrorResponse.class);
+ public static BrtcErrorResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BrtcErrorResponse.class);
}
/**
- * Convert an instance of ErrorResponse to an JSON string
+ * Convert an instance of BrtcErrorResponse to an JSON string
*
* @return JSON string
*/
diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java b/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java
new file mode 100644
index 00000000..74092329
--- /dev/null
+++ b/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java
@@ -0,0 +1,375 @@
+/*
+ * 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.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Locale;
+
+import com.bandwidth.sdk.JSON;
+
+/**
+ * BrtcErrorSource
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
+public class BrtcErrorSource {
+ public static final String SERIALIZED_NAME_PARAMETER = "parameter";
+ @SerializedName(SERIALIZED_NAME_PARAMETER)
+ @javax.annotation.Nullable
+ private String parameter;
+
+ public static final String SERIALIZED_NAME_FIELD = "field";
+ @SerializedName(SERIALIZED_NAME_FIELD)
+ @javax.annotation.Nullable
+ private String field;
+
+ public static final String SERIALIZED_NAME_HEADER = "header";
+ @SerializedName(SERIALIZED_NAME_HEADER)
+ @javax.annotation.Nullable
+ private String header;
+
+ public static final String SERIALIZED_NAME_REFERENCE = "reference";
+ @SerializedName(SERIALIZED_NAME_REFERENCE)
+ @javax.annotation.Nullable
+ private String reference;
+
+ public BrtcErrorSource() {
+ }
+
+ public BrtcErrorSource parameter(@javax.annotation.Nullable String parameter) {
+ this.parameter = parameter;
+ return this;
+ }
+
+ /**
+ * The URI parameter that caused the error.
+ * @return parameter
+ */
+ @javax.annotation.Nullable
+ public String getParameter() {
+ return parameter;
+ }
+
+ public void setParameter(@javax.annotation.Nullable String parameter) {
+ this.parameter = parameter;
+ }
+
+
+ public BrtcErrorSource field(@javax.annotation.Nullable String field) {
+ this.field = field;
+ return this;
+ }
+
+ /**
+ * The request body field that caused the error.
+ * @return field
+ */
+ @javax.annotation.Nullable
+ public String getField() {
+ return field;
+ }
+
+ public void setField(@javax.annotation.Nullable String field) {
+ this.field = field;
+ }
+
+
+ public BrtcErrorSource header(@javax.annotation.Nullable String header) {
+ this.header = header;
+ return this;
+ }
+
+ /**
+ * The header that caused the error.
+ * @return header
+ */
+ @javax.annotation.Nullable
+ public String getHeader() {
+ return header;
+ }
+
+ public void setHeader(@javax.annotation.Nullable String header) {
+ this.header = header;
+ }
+
+
+ public BrtcErrorSource reference(@javax.annotation.Nullable String reference) {
+ this.reference = reference;
+ return this;
+ }
+
+ /**
+ * The resource ID or path to the resource (or non-existent resource) causing the error.
+ * @return reference
+ */
+ @javax.annotation.Nullable
+ public String getReference() {
+ return reference;
+ }
+
+ public void setReference(@javax.annotation.Nullable String reference) {
+ this.reference = reference;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BrtcErrorSource instance itself
+ */
+ public BrtcErrorSource putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BrtcErrorSource brtcErrorSource = (BrtcErrorSource) o;
+ return Objects.equals(this.parameter, brtcErrorSource.parameter) &&
+ Objects.equals(this.field, brtcErrorSource.field) &&
+ Objects.equals(this.header, brtcErrorSource.header) &&
+ Objects.equals(this.reference, brtcErrorSource.reference)&&
+ Objects.equals(this.additionalProperties, brtcErrorSource.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(parameter, field, header, reference, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BrtcErrorSource {\n");
+ sb.append(" parameter: ").append(toIndentedString(parameter)).append("\n");
+ sb.append(" field: ").append(toIndentedString(field)).append("\n");
+ sb.append(" header: ").append(toIndentedString(header)).append("\n");
+ sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet(Arrays.asList("parameter", "field", "header", "reference"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(0);
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BrtcErrorSource
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BrtcErrorSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcErrorSource is not found in the empty JSON string", BrtcErrorSource.openapiRequiredFields.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("parameter") != null && !jsonObj.get("parameter").isJsonNull()) && !jsonObj.get("parameter").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString()));
+ }
+ if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString()));
+ }
+ if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString()));
+ }
+ if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BrtcErrorSource.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BrtcErrorSource' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BrtcErrorSource.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BrtcErrorSource value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BrtcErrorSource read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ BrtcErrorSource instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BrtcErrorSource given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BrtcErrorSource
+ * @throws IOException if the JSON string is invalid with respect to BrtcErrorSource
+ */
+ public static BrtcErrorSource fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BrtcErrorSource.class);
+ }
+
+ /**
+ * Convert an instance of BrtcErrorSource to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcLink.java b/src/main/java/com/bandwidth/sdk/model/BrtcLink.java
new file mode 100644
index 00000000..b8e5fb67
--- /dev/null
+++ b/src/main/java/com/bandwidth/sdk/model/BrtcLink.java
@@ -0,0 +1,346 @@
+/*
+ * 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.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Locale;
+
+import com.bandwidth.sdk.JSON;
+
+/**
+ * BrtcLink
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
+public class BrtcLink {
+ public static final String SERIALIZED_NAME_HREF = "href";
+ @SerializedName(SERIALIZED_NAME_HREF)
+ @javax.annotation.Nullable
+ private String href;
+
+ public static final String SERIALIZED_NAME_REL = "rel";
+ @SerializedName(SERIALIZED_NAME_REL)
+ @javax.annotation.Nullable
+ private String rel;
+
+ public static final String SERIALIZED_NAME_METHOD = "method";
+ @SerializedName(SERIALIZED_NAME_METHOD)
+ @javax.annotation.Nullable
+ private String method;
+
+ public BrtcLink() {
+ }
+
+ public BrtcLink href(@javax.annotation.Nullable String href) {
+ this.href = href;
+ return this;
+ }
+
+ /**
+ * The full URL of the link.
+ * @return href
+ */
+ @javax.annotation.Nullable
+ public String getHref() {
+ return href;
+ }
+
+ public void setHref(@javax.annotation.Nullable String href) {
+ this.href = href;
+ }
+
+
+ public BrtcLink rel(@javax.annotation.Nullable String rel) {
+ this.rel = rel;
+ return this;
+ }
+
+ /**
+ * The relationship of the link to the current resource.
+ * @return rel
+ */
+ @javax.annotation.Nullable
+ public String getRel() {
+ return rel;
+ }
+
+ public void setRel(@javax.annotation.Nullable String rel) {
+ this.rel = rel;
+ }
+
+
+ public BrtcLink method(@javax.annotation.Nullable String method) {
+ this.method = method;
+ return this;
+ }
+
+ /**
+ * The HTTP method to use when making the request.
+ * @return method
+ */
+ @javax.annotation.Nullable
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(@javax.annotation.Nullable String method) {
+ this.method = method;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BrtcLink instance itself
+ */
+ public BrtcLink putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BrtcLink brtcLink = (BrtcLink) o;
+ return Objects.equals(this.href, brtcLink.href) &&
+ Objects.equals(this.rel, brtcLink.rel) &&
+ Objects.equals(this.method, brtcLink.method)&&
+ Objects.equals(this.additionalProperties, brtcLink.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(href, rel, method, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BrtcLink {\n");
+ sb.append(" href: ").append(toIndentedString(href)).append("\n");
+ sb.append(" rel: ").append(toIndentedString(rel)).append("\n");
+ sb.append(" method: ").append(toIndentedString(method)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet(Arrays.asList("href", "rel", "method"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(0);
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BrtcLink
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BrtcLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcLink is not found in the empty JSON string", BrtcLink.openapiRequiredFields.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString()));
+ }
+ if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString()));
+ }
+ if ((jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) && !jsonObj.get("method").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BrtcLink.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BrtcLink' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BrtcLink.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BrtcLink value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BrtcLink read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ BrtcLink instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BrtcLink given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BrtcLink
+ * @throws IOException if the JSON string is invalid with respect to BrtcLink
+ */
+ public static BrtcLink fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BrtcLink.class);
+ }
+
+ /**
+ * Convert an instance of BrtcLink to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java
index 71a13117..bca06f12 100644
--- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java
+++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java
@@ -556,7 +556,7 @@ public CreateCall tag(@javax.annotation.Nullable String tag) {
}
/**
- * A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters.
+ * A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters.
* @return tag
*/
@javax.annotation.Nullable
diff --git a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java
index 117e9259..081e24fc 100644
--- a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java
+++ b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java
@@ -15,9 +15,9 @@
import java.util.Objects;
import java.util.Locale;
+import com.bandwidth.sdk.model.BrtcError;
+import com.bandwidth.sdk.model.BrtcLink;
import com.bandwidth.sdk.model.CreateEndpointResponseData;
-import com.bandwidth.sdk.model.Error;
-import com.bandwidth.sdk.model.Link;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -60,7 +60,7 @@ public class CreateEndpointResponse {
public static final String SERIALIZED_NAME_LINKS = "links";
@SerializedName(SERIALIZED_NAME_LINKS)
@javax.annotation.Nonnull
- private List links = new ArrayList<>();
+ private List links = new ArrayList<>();
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName(SERIALIZED_NAME_DATA)
@@ -70,17 +70,17 @@ public class CreateEndpointResponse {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
@javax.annotation.Nonnull
- private List errors = new ArrayList<>();
+ private List errors = new ArrayList<>();
public CreateEndpointResponse() {
}
- public CreateEndpointResponse links(@javax.annotation.Nonnull List links) {
+ public CreateEndpointResponse links(@javax.annotation.Nonnull List links) {
this.links = links;
return this;
}
- public CreateEndpointResponse addLinksItem(Link linksItem) {
+ public CreateEndpointResponse addLinksItem(BrtcLink linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
@@ -93,11 +93,11 @@ public CreateEndpointResponse addLinksItem(Link linksItem) {
* @return links
*/
@javax.annotation.Nonnull
- public List getLinks() {
+ public List getLinks() {
return links;
}
- public void setLinks(@javax.annotation.Nonnull List links) {
+ public void setLinks(@javax.annotation.Nonnull List links) {
this.links = links;
}
@@ -121,12 +121,12 @@ public void setData(@javax.annotation.Nonnull CreateEndpointResponseData data) {
}
- public CreateEndpointResponse errors(@javax.annotation.Nonnull List errors) {
+ public CreateEndpointResponse errors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
return this;
}
- public CreateEndpointResponse addErrorsItem(Error errorsItem) {
+ public CreateEndpointResponse addErrorsItem(BrtcError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
@@ -139,11 +139,11 @@ public CreateEndpointResponse addErrorsItem(Error errorsItem) {
* @return errors
*/
@javax.annotation.Nonnull
- public List getErrors() {
+ public List getErrors() {
return errors;
}
- public void setErrors(@javax.annotation.Nonnull List errors) {
+ public void setErrors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
}
@@ -276,7 +276,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links");
// validate the required field `links` (array)
for (int i = 0; i < jsonArraylinks.size(); i++) {
- Link.validateJsonElement(jsonArraylinks.get(i));
+ BrtcLink.validateJsonElement(jsonArraylinks.get(i));
};
// validate the required field `data`
CreateEndpointResponseData.validateJsonElement(jsonObj.get("data"));
@@ -288,7 +288,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors");
// validate the required field `errors` (array)
for (int i = 0; i < jsonArrayerrors.size(); i++) {
- Error.validateJsonElement(jsonArrayerrors.get(i));
+ BrtcError.validateJsonElement(jsonArrayerrors.get(i));
};
}
diff --git a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseObject.java b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseObject.java
deleted file mode 100644
index e951cbac..00000000
--- a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseObject.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * 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.bandwidth.sdk.model.Device;
-import com.bandwidth.sdk.model.EndpointStatusEnum;
-import com.bandwidth.sdk.model.EndpointTypeEnum;
-import com.google.gson.TypeAdapter;
-import com.google.gson.annotations.JsonAdapter;
-import com.google.gson.annotations.SerializedName;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import java.io.IOException;
-import java.time.OffsetDateTime;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParseException;
-import com.google.gson.TypeAdapterFactory;
-import com.google.gson.reflect.TypeToken;
-import com.google.gson.TypeAdapter;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import java.io.IOException;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Locale;
-
-import com.bandwidth.sdk.JSON;
-
-/**
- * CreateEndpointResponseObject
- */
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
-public class CreateEndpointResponseObject {
- public static final String SERIALIZED_NAME_ENDPOINT_ID = "endpointId";
- @SerializedName(SERIALIZED_NAME_ENDPOINT_ID)
- @javax.annotation.Nonnull
- private String endpointId;
-
- public static final String SERIALIZED_NAME_TYPE = "type";
- @SerializedName(SERIALIZED_NAME_TYPE)
- @javax.annotation.Nonnull
- private EndpointTypeEnum type;
-
- public static final String SERIALIZED_NAME_STATUS = "status";
- @SerializedName(SERIALIZED_NAME_STATUS)
- @javax.annotation.Nonnull
- private EndpointStatusEnum status;
-
- public static final String SERIALIZED_NAME_CREATION_TIMESTAMP = "creationTimestamp";
- @SerializedName(SERIALIZED_NAME_CREATION_TIMESTAMP)
- @javax.annotation.Nonnull
- private OffsetDateTime creationTimestamp;
-
- public static final String SERIALIZED_NAME_EXPIRATION_TIMESTAMP = "expirationTimestamp";
- @SerializedName(SERIALIZED_NAME_EXPIRATION_TIMESTAMP)
- @javax.annotation.Nonnull
- private OffsetDateTime expirationTimestamp;
-
- public static final String SERIALIZED_NAME_TAG = "tag";
- @SerializedName(SERIALIZED_NAME_TAG)
- @javax.annotation.Nullable
- private String tag;
-
- public static final String SERIALIZED_NAME_DEVICES = "devices";
- @SerializedName(SERIALIZED_NAME_DEVICES)
- @javax.annotation.Nullable
- private List devices = new ArrayList<>();
-
- public static final String SERIALIZED_NAME_TOKEN = "token";
- @SerializedName(SERIALIZED_NAME_TOKEN)
- @javax.annotation.Nonnull
- private String token;
-
- public CreateEndpointResponseObject() {
- }
-
- public CreateEndpointResponseObject endpointId(@javax.annotation.Nonnull String endpointId) {
- this.endpointId = endpointId;
- return this;
- }
-
- /**
- * The unique ID of the endpoint.
- * @return endpointId
- */
- @javax.annotation.Nonnull
- public String getEndpointId() {
- return endpointId;
- }
-
- public void setEndpointId(@javax.annotation.Nonnull String endpointId) {
- this.endpointId = endpointId;
- }
-
-
- public CreateEndpointResponseObject type(@javax.annotation.Nonnull EndpointTypeEnum type) {
- this.type = type;
- return this;
- }
-
- /**
- * Get type
- * @return type
- */
- @javax.annotation.Nonnull
- public EndpointTypeEnum getType() {
- return type;
- }
-
- public void setType(@javax.annotation.Nonnull EndpointTypeEnum type) {
- this.type = type;
- }
-
-
- public CreateEndpointResponseObject status(@javax.annotation.Nonnull EndpointStatusEnum status) {
- this.status = status;
- return this;
- }
-
- /**
- * Get status
- * @return status
- */
- @javax.annotation.Nonnull
- public EndpointStatusEnum getStatus() {
- return status;
- }
-
- public void setStatus(@javax.annotation.Nonnull EndpointStatusEnum status) {
- this.status = status;
- }
-
-
- public CreateEndpointResponseObject creationTimestamp(@javax.annotation.Nonnull OffsetDateTime creationTimestamp) {
- this.creationTimestamp = creationTimestamp;
- return this;
- }
-
- /**
- * The time the endpoint was created. In ISO-8601 format.
- * @return creationTimestamp
- */
- @javax.annotation.Nonnull
- public OffsetDateTime getCreationTimestamp() {
- return creationTimestamp;
- }
-
- public void setCreationTimestamp(@javax.annotation.Nonnull OffsetDateTime creationTimestamp) {
- this.creationTimestamp = creationTimestamp;
- }
-
-
- public CreateEndpointResponseObject expirationTimestamp(@javax.annotation.Nonnull OffsetDateTime expirationTimestamp) {
- this.expirationTimestamp = expirationTimestamp;
- return this;
- }
-
- /**
- * The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours.
- * @return expirationTimestamp
- */
- @javax.annotation.Nonnull
- public OffsetDateTime getExpirationTimestamp() {
- return expirationTimestamp;
- }
-
- public void setExpirationTimestamp(@javax.annotation.Nonnull OffsetDateTime expirationTimestamp) {
- this.expirationTimestamp = expirationTimestamp;
- }
-
-
- public CreateEndpointResponseObject tag(@javax.annotation.Nullable String tag) {
- this.tag = tag;
- return this;
- }
-
- /**
- * A tag for the endpoint.
- * @return tag
- */
- @javax.annotation.Nullable
- public String getTag() {
- return tag;
- }
-
- public void setTag(@javax.annotation.Nullable String tag) {
- this.tag = tag;
- }
-
-
- public CreateEndpointResponseObject devices(@javax.annotation.Nullable List devices) {
- this.devices = devices;
- return this;
- }
-
- public CreateEndpointResponseObject addDevicesItem(Device devicesItem) {
- if (this.devices == null) {
- this.devices = new ArrayList<>();
- }
- this.devices.add(devicesItem);
- return this;
- }
-
- /**
- * Get devices
- * @return devices
- */
- @javax.annotation.Nullable
- public List getDevices() {
- return devices;
- }
-
- public void setDevices(@javax.annotation.Nullable List devices) {
- this.devices = devices;
- }
-
-
- public CreateEndpointResponseObject token(@javax.annotation.Nonnull String token) {
- this.token = token;
- return this;
- }
-
- /**
- * The json web token specific to the endpoint. Used to authenticate the client with the media gateway.
- * @return token
- */
- @javax.annotation.Nonnull
- public String getToken() {
- return token;
- }
-
- public void setToken(@javax.annotation.Nonnull String token) {
- this.token = token;
- }
-
- /**
- * A container for additional, undeclared properties.
- * This is a holder for any undeclared properties as specified with
- * the 'additionalProperties' keyword in the OAS document.
- */
- private Map additionalProperties;
-
- /**
- * Set the additional (undeclared) property with the specified name and value.
- * If the property does not already exist, create it otherwise replace it.
- *
- * @param key name of the property
- * @param value value of the property
- * @return the CreateEndpointResponseObject instance itself
- */
- public CreateEndpointResponseObject putAdditionalProperty(String key, Object value) {
- if (this.additionalProperties == null) {
- this.additionalProperties = new HashMap();
- }
- this.additionalProperties.put(key, value);
- return this;
- }
-
- /**
- * Return the additional (undeclared) property.
- *
- * @return a map of objects
- */
- public Map getAdditionalProperties() {
- return additionalProperties;
- }
-
- /**
- * Return the additional (undeclared) property with the specified name.
- *
- * @param key name of the property
- * @return an object
- */
- public Object getAdditionalProperty(String key) {
- if (this.additionalProperties == null) {
- return null;
- }
- return this.additionalProperties.get(key);
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CreateEndpointResponseObject createEndpointResponseObject = (CreateEndpointResponseObject) o;
- return Objects.equals(this.endpointId, createEndpointResponseObject.endpointId) &&
- Objects.equals(this.type, createEndpointResponseObject.type) &&
- Objects.equals(this.status, createEndpointResponseObject.status) &&
- Objects.equals(this.creationTimestamp, createEndpointResponseObject.creationTimestamp) &&
- Objects.equals(this.expirationTimestamp, createEndpointResponseObject.expirationTimestamp) &&
- Objects.equals(this.tag, createEndpointResponseObject.tag) &&
- Objects.equals(this.devices, createEndpointResponseObject.devices) &&
- Objects.equals(this.token, createEndpointResponseObject.token)&&
- Objects.equals(this.additionalProperties, createEndpointResponseObject.additionalProperties);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(endpointId, type, status, creationTimestamp, expirationTimestamp, tag, devices, token, additionalProperties);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class CreateEndpointResponseObject {\n");
- sb.append(" endpointId: ").append(toIndentedString(endpointId)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append(" creationTimestamp: ").append(toIndentedString(creationTimestamp)).append("\n");
- sb.append(" expirationTimestamp: ").append(toIndentedString(expirationTimestamp)).append("\n");
- sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
- sb.append(" devices: ").append(toIndentedString(devices)).append("\n");
- sb.append(" token: ").append(toIndentedString(token)).append("\n");
- sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-
- public static HashSet openapiFields;
- public static HashSet openapiRequiredFields;
-
- static {
- // a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("endpointId", "type", "status", "creationTimestamp", "expirationTimestamp", "tag", "devices", "token"));
-
- // a set of required properties/fields (JSON key names)
- openapiRequiredFields = new HashSet(Arrays.asList("endpointId", "type", "status", "creationTimestamp", "expirationTimestamp", "token"));
- }
-
- /**
- * Validates the JSON Element and throws an exception if issues found
- *
- * @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to CreateEndpointResponseObject
- */
- public static void validateJsonElement(JsonElement jsonElement) throws IOException {
- if (jsonElement == null) {
- if (!CreateEndpointResponseObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateEndpointResponseObject is not found in the empty JSON string", CreateEndpointResponseObject.openapiRequiredFields.toString()));
- }
- }
-
- // check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : CreateEndpointResponseObject.openapiRequiredFields) {
- if (jsonElement.getAsJsonObject().get(requiredField) == null) {
- throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
- }
- }
- JsonObject jsonObj = jsonElement.getAsJsonObject();
- if (!jsonObj.get("endpointId").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString()));
- }
- // validate the required field `type`
- EndpointTypeEnum.validateJsonElement(jsonObj.get("type"));
- // validate the required field `status`
- EndpointStatusEnum.validateJsonElement(jsonObj.get("status"));
- if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString()));
- }
- if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) {
- JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices");
- if (jsonArraydevices != null) {
- // ensure the json data is an array
- if (!jsonObj.get("devices").isJsonArray()) {
- throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString()));
- }
-
- // validate the optional field `devices` (array)
- for (int i = 0; i < jsonArraydevices.size(); i++) {
- Device.validateJsonElement(jsonArraydevices.get(i));
- };
- }
- }
- if (!jsonObj.get("token").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString()));
- }
- }
-
- public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
- @SuppressWarnings("unchecked")
- @Override
- public TypeAdapter create(Gson gson, TypeToken type) {
- if (!CreateEndpointResponseObject.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'CreateEndpointResponseObject' and its subtypes
- }
- final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(CreateEndpointResponseObject.class));
-
- return (TypeAdapter) new TypeAdapter() {
- @Override
- public void write(JsonWriter out, CreateEndpointResponseObject value) throws IOException {
- JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
- obj.remove("additionalProperties");
- // serialize additional properties
- if (value.getAdditionalProperties() != null) {
- for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
- if (entry.getValue() instanceof String)
- obj.addProperty(entry.getKey(), (String) entry.getValue());
- else if (entry.getValue() instanceof Number)
- obj.addProperty(entry.getKey(), (Number) entry.getValue());
- else if (entry.getValue() instanceof Boolean)
- obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
- else if (entry.getValue() instanceof Character)
- obj.addProperty(entry.getKey(), (Character) entry.getValue());
- else {
- JsonElement jsonElement = gson.toJsonTree(entry.getValue());
- if (jsonElement.isJsonArray()) {
- obj.add(entry.getKey(), jsonElement.getAsJsonArray());
- } else {
- obj.add(entry.getKey(), jsonElement.getAsJsonObject());
- }
- }
- }
- }
- elementAdapter.write(out, obj);
- }
-
- @Override
- public CreateEndpointResponseObject read(JsonReader in) throws IOException {
- JsonElement jsonElement = elementAdapter.read(in);
- validateJsonElement(jsonElement);
- JsonObject jsonObj = jsonElement.getAsJsonObject();
- // store additional fields in the deserialized instance
- CreateEndpointResponseObject instance = thisAdapter.fromJsonTree(jsonObj);
- for (Map.Entry entry : jsonObj.entrySet()) {
- if (!openapiFields.contains(entry.getKey())) {
- if (entry.getValue().isJsonPrimitive()) { // primitive type
- if (entry.getValue().getAsJsonPrimitive().isString())
- instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
- else if (entry.getValue().getAsJsonPrimitive().isNumber())
- instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
- else if (entry.getValue().getAsJsonPrimitive().isBoolean())
- instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
- else
- throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
- } else if (entry.getValue().isJsonArray()) {
- instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
- } else { // JSON object
- instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
- }
- }
- }
- return instance;
- }
-
- }.nullSafe();
- }
- }
-
- /**
- * Create an instance of CreateEndpointResponseObject given an JSON string
- *
- * @param jsonString JSON string
- * @return An instance of CreateEndpointResponseObject
- * @throws IOException if the JSON string is invalid with respect to CreateEndpointResponseObject
- */
- public static CreateEndpointResponseObject fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, CreateEndpointResponseObject.class);
- }
-
- /**
- * Convert an instance of CreateEndpointResponseObject to an JSON string
- *
- * @return JSON string
- */
- public String toJson() {
- return JSON.getGson().toJson(this);
- }
-}
-
diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java b/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java
index 1a59b799..e0bb35e0 100644
--- a/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java
+++ b/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java
@@ -15,9 +15,9 @@
import java.util.Objects;
import java.util.Locale;
+import com.bandwidth.sdk.model.BrtcError;
+import com.bandwidth.sdk.model.BrtcLink;
import com.bandwidth.sdk.model.Endpoint;
-import com.bandwidth.sdk.model.Error;
-import com.bandwidth.sdk.model.Link;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -60,7 +60,7 @@ public class EndpointResponse {
public static final String SERIALIZED_NAME_LINKS = "links";
@SerializedName(SERIALIZED_NAME_LINKS)
@javax.annotation.Nonnull
- private List links = new ArrayList<>();
+ private List links = new ArrayList<>();
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName(SERIALIZED_NAME_DATA)
@@ -70,17 +70,17 @@ public class EndpointResponse {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
@javax.annotation.Nonnull
- private List errors = new ArrayList<>();
+ private List errors = new ArrayList<>();
public EndpointResponse() {
}
- public EndpointResponse links(@javax.annotation.Nonnull List links) {
+ public EndpointResponse links(@javax.annotation.Nonnull List links) {
this.links = links;
return this;
}
- public EndpointResponse addLinksItem(Link linksItem) {
+ public EndpointResponse addLinksItem(BrtcLink linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
@@ -93,11 +93,11 @@ public EndpointResponse addLinksItem(Link linksItem) {
* @return links
*/
@javax.annotation.Nonnull
- public List getLinks() {
+ public List getLinks() {
return links;
}
- public void setLinks(@javax.annotation.Nonnull List links) {
+ public void setLinks(@javax.annotation.Nonnull List links) {
this.links = links;
}
@@ -121,12 +121,12 @@ public void setData(@javax.annotation.Nonnull Endpoint data) {
}
- public EndpointResponse errors(@javax.annotation.Nonnull List errors) {
+ public EndpointResponse errors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
return this;
}
- public EndpointResponse addErrorsItem(Error errorsItem) {
+ public EndpointResponse addErrorsItem(BrtcError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
@@ -139,11 +139,11 @@ public EndpointResponse addErrorsItem(Error errorsItem) {
* @return errors
*/
@javax.annotation.Nonnull
- public List getErrors() {
+ public List getErrors() {
return errors;
}
- public void setErrors(@javax.annotation.Nonnull List errors) {
+ public void setErrors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
}
@@ -276,7 +276,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links");
// validate the required field `links` (array)
for (int i = 0; i < jsonArraylinks.size(); i++) {
- Link.validateJsonElement(jsonArraylinks.get(i));
+ BrtcLink.validateJsonElement(jsonArraylinks.get(i));
};
// validate the required field `data`
Endpoint.validateJsonElement(jsonObj.get("data"));
@@ -288,7 +288,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors");
// validate the required field `errors` (array)
for (int i = 0; i < jsonArrayerrors.size(); i++) {
- Error.validateJsonElement(jsonArrayerrors.get(i));
+ BrtcError.validateJsonElement(jsonArrayerrors.get(i));
};
}
diff --git a/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java b/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java
index ceba96e9..c6aa8069 100644
--- a/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java
+++ b/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java
@@ -15,9 +15,9 @@
import java.util.Objects;
import java.util.Locale;
+import com.bandwidth.sdk.model.BrtcError;
+import com.bandwidth.sdk.model.BrtcLink;
import com.bandwidth.sdk.model.Endpoints;
-import com.bandwidth.sdk.model.Error;
-import com.bandwidth.sdk.model.Link;
import com.bandwidth.sdk.model.Page;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
@@ -61,7 +61,7 @@ public class ListEndpointsResponse {
public static final String SERIALIZED_NAME_LINKS = "links";
@SerializedName(SERIALIZED_NAME_LINKS)
@javax.annotation.Nonnull
- private List links = new ArrayList<>();
+ private List links = new ArrayList<>();
public static final String SERIALIZED_NAME_PAGE = "page";
@SerializedName(SERIALIZED_NAME_PAGE)
@@ -76,17 +76,17 @@ public class ListEndpointsResponse {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
@javax.annotation.Nonnull
- private List errors = new ArrayList<>();
+ private List errors = new ArrayList<>();
public ListEndpointsResponse() {
}
- public ListEndpointsResponse links(@javax.annotation.Nonnull List links) {
+ public ListEndpointsResponse links(@javax.annotation.Nonnull List links) {
this.links = links;
return this;
}
- public ListEndpointsResponse addLinksItem(Link linksItem) {
+ public ListEndpointsResponse addLinksItem(BrtcLink linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
@@ -99,11 +99,11 @@ public ListEndpointsResponse addLinksItem(Link linksItem) {
* @return links
*/
@javax.annotation.Nonnull
- public List getLinks() {
+ public List getLinks() {
return links;
}
- public void setLinks(@javax.annotation.Nonnull List links) {
+ public void setLinks(@javax.annotation.Nonnull List links) {
this.links = links;
}
@@ -154,12 +154,12 @@ public void setData(@javax.annotation.Nonnull List data) {
}
- public ListEndpointsResponse errors(@javax.annotation.Nonnull List errors) {
+ public ListEndpointsResponse errors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
return this;
}
- public ListEndpointsResponse addErrorsItem(Error errorsItem) {
+ public ListEndpointsResponse addErrorsItem(BrtcError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
@@ -172,11 +172,11 @@ public ListEndpointsResponse addErrorsItem(Error errorsItem) {
* @return errors
*/
@javax.annotation.Nonnull
- public List getErrors() {
+ public List getErrors() {
return errors;
}
- public void setErrors(@javax.annotation.Nonnull List errors) {
+ public void setErrors(@javax.annotation.Nonnull List errors) {
this.errors = errors;
}
@@ -311,7 +311,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links");
// validate the required field `links` (array)
for (int i = 0; i < jsonArraylinks.size(); i++) {
- Link.validateJsonElement(jsonArraylinks.get(i));
+ BrtcLink.validateJsonElement(jsonArraylinks.get(i));
};
// validate the optional field `page`
if (jsonObj.get("page") != null && !jsonObj.get("page").isJsonNull()) {
@@ -335,7 +335,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors");
// validate the required field `errors` (array)
for (int i = 0; i < jsonArrayerrors.size(); i++) {
- Error.validateJsonElement(jsonArrayerrors.get(i));
+ BrtcError.validateJsonElement(jsonArrayerrors.get(i));
};
}
diff --git a/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
index ebad86e5..a65398bb 100644
--- a/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
+++ b/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java
@@ -26,7 +26,7 @@
import com.google.gson.stream.JsonWriter;
/**
- * 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.
+ * 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.
*/
@JsonAdapter(RbmOpenUrlEnum.Adapter.class)
public enum RbmOpenUrlEnum {
diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java
index f83fa2eb..cbf1a363 100644
--- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java
+++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java
@@ -286,7 +286,7 @@ public UpdateCall tag(@javax.annotation.Nullable String tag) {
}
/**
- * A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`.
+ * A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`.
* @return tag
*/
@javax.annotation.Nullable
diff --git a/src/main/java/com/bandwidth/sdk/model/Error.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java
similarity index 82%
rename from src/main/java/com/bandwidth/sdk/model/Error.java
rename to src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java
index 3df93d39..2e001483 100644
--- a/src/main/java/com/bandwidth/sdk/model/Error.java
+++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java
@@ -51,10 +51,10 @@
import com.bandwidth.sdk.JSON;
/**
- * Error
+ * WebhookSubscriptionError
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0")
-public class Error {
+public class WebhookSubscriptionError {
public static final String SERIALIZED_NAME_CODE = "code";
@SerializedName(SERIALIZED_NAME_CODE)
@javax.annotation.Nullable
@@ -70,10 +70,10 @@ public class Error {
@javax.annotation.Nullable
private List telephoneNumbers = new ArrayList<>();
- public Error() {
+ public WebhookSubscriptionError() {
}
- public Error code(@javax.annotation.Nullable Integer code) {
+ public WebhookSubscriptionError code(@javax.annotation.Nullable Integer code) {
this.code = code;
return this;
}
@@ -92,7 +92,7 @@ public void setCode(@javax.annotation.Nullable Integer code) {
}
- public Error description(@javax.annotation.Nullable String description) {
+ public WebhookSubscriptionError description(@javax.annotation.Nullable String description) {
this.description = description;
return this;
}
@@ -111,12 +111,12 @@ public void setDescription(@javax.annotation.Nullable String description) {
}
- public Error telephoneNumbers(@javax.annotation.Nullable List telephoneNumbers) {
+ public WebhookSubscriptionError telephoneNumbers(@javax.annotation.Nullable List telephoneNumbers) {
this.telephoneNumbers = telephoneNumbers;
return this;
}
- public Error addTelephoneNumbersItem(TelephoneNumber telephoneNumbersItem) {
+ public WebhookSubscriptionError addTelephoneNumbersItem(TelephoneNumber telephoneNumbersItem) {
if (this.telephoneNumbers == null) {
this.telephoneNumbers = new ArrayList<>();
}
@@ -150,9 +150,9 @@ public void setTelephoneNumbers(@javax.annotation.Nullable List
*
* @param key name of the property
* @param value value of the property
- * @return the Error instance itself
+ * @return the WebhookSubscriptionError instance itself
*/
- public Error putAdditionalProperty(String key, Object value) {
+ public WebhookSubscriptionError putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
@@ -191,11 +191,11 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Error error = (Error) o;
- return Objects.equals(this.code, error.code) &&
- Objects.equals(this.description, error.description) &&
- Objects.equals(this.telephoneNumbers, error.telephoneNumbers)&&
- Objects.equals(this.additionalProperties, error.additionalProperties);
+ WebhookSubscriptionError webhookSubscriptionError = (WebhookSubscriptionError) o;
+ return Objects.equals(this.code, webhookSubscriptionError.code) &&
+ Objects.equals(this.description, webhookSubscriptionError.description) &&
+ Objects.equals(this.telephoneNumbers, webhookSubscriptionError.telephoneNumbers)&&
+ Objects.equals(this.additionalProperties, webhookSubscriptionError.additionalProperties);
}
@Override
@@ -206,7 +206,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class Error {\n");
+ sb.append("class WebhookSubscriptionError {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" telephoneNumbers: ").append(toIndentedString(telephoneNumbers)).append("\n");
@@ -242,12 +242,12 @@ private String toIndentedString(Object o) {
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to Error
+ * @throws IOException if the JSON Element is invalid with respect to WebhookSubscriptionError
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString()));
+ if (!WebhookSubscriptionError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionError is not found in the empty JSON string", WebhookSubscriptionError.openapiRequiredFields.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
@@ -274,16 +274,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!Error.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'Error' and its subtypes
+ if (!WebhookSubscriptionError.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'WebhookSubscriptionError' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(Error.class));
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(WebhookSubscriptionError.class));
- return (TypeAdapter) new TypeAdapter() {
+ return (TypeAdapter) new TypeAdapter() {
@Override
- public void write(JsonWriter out, Error value) throws IOException {
+ public void write(JsonWriter out, WebhookSubscriptionError value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// serialize additional properties
@@ -311,12 +311,12 @@ else if (entry.getValue() instanceof Character)
}
@Override
- public Error read(JsonReader in) throws IOException {
+ public WebhookSubscriptionError read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
JsonObject jsonObj = jsonElement.getAsJsonObject();
// store additional fields in the deserialized instance
- Error instance = thisAdapter.fromJsonTree(jsonObj);
+ WebhookSubscriptionError instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
@@ -343,18 +343,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
}
/**
- * Create an instance of Error given an JSON string
+ * Create an instance of WebhookSubscriptionError given an JSON string
*
* @param jsonString JSON string
- * @return An instance of Error
- * @throws IOException if the JSON string is invalid with respect to Error
+ * @return An instance of WebhookSubscriptionError
+ * @throws IOException if the JSON string is invalid with respect to WebhookSubscriptionError
*/
- public static Error fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, Error.class);
+ public static WebhookSubscriptionError fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, WebhookSubscriptionError.class);
}
/**
- * Convert an instance of Error to an JSON string
+ * Convert an instance of WebhookSubscriptionError to an JSON string
*
* @return JSON string
*/
diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java
index b19ed25f..26b8a72f 100644
--- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java
+++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java
@@ -15,9 +15,9 @@
import java.util.Objects;
import java.util.Locale;
-import com.bandwidth.sdk.model.Error;
import com.bandwidth.sdk.model.LinksObject;
import com.bandwidth.sdk.model.WebhookSubscription;
+import com.bandwidth.sdk.model.WebhookSubscriptionError;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -65,7 +65,7 @@ public class WebhookSubscriptionsListBody {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
@javax.annotation.Nullable
- private List errors = new ArrayList<>();
+ private List errors = new ArrayList<>();
public static final String SERIALIZED_NAME_DATA = "data";
@SerializedName(SERIALIZED_NAME_DATA)
@@ -94,12 +94,12 @@ public void setLinks(@javax.annotation.Nullable LinksObject links) {
}
- public WebhookSubscriptionsListBody errors(@javax.annotation.Nullable List errors) {
+ public WebhookSubscriptionsListBody errors(@javax.annotation.Nullable List errors) {
this.errors = errors;
return this;
}
- public WebhookSubscriptionsListBody addErrorsItem(Error errorsItem) {
+ public WebhookSubscriptionsListBody addErrorsItem(WebhookSubscriptionError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
@@ -112,11 +112,11 @@ public WebhookSubscriptionsListBody addErrorsItem(Error errorsItem) {
* @return errors
*/
@javax.annotation.Nullable
- public List getErrors() {
+ public List getErrors() {
return errors;
}
- public void setErrors(@javax.annotation.Nullable List errors) {
+ public void setErrors(@javax.annotation.Nullable List errors) {
this.errors = errors;
}
@@ -282,7 +282,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
// validate the optional field `errors` (array)
for (int i = 0; i < jsonArrayerrors.size(); i++) {
- Error.validateJsonElement(jsonArrayerrors.get(i));
+ WebhookSubscriptionError.validateJsonElement(jsonArrayerrors.get(i));
};
}
}
diff --git a/src/test/java/com/bandwidth/sdk/smoke/EndpointsApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/EndpointsApiTest.java
index 85dc851e..1f2582f3 100644
--- a/src/test/java/com/bandwidth/sdk/smoke/EndpointsApiTest.java
+++ b/src/test/java/com/bandwidth/sdk/smoke/EndpointsApiTest.java
@@ -13,7 +13,6 @@
import com.bandwidth.sdk.model.EndpointDirectionEnum;
import com.bandwidth.sdk.model.EndpointTypeEnum;
import com.bandwidth.sdk.model.EndpointStatusEnum;
-import com.bandwidth.sdk.model.Link;
import com.bandwidth.sdk.model.ListEndpointsResponse;
import com.bandwidth.sdk.model.Page;
import org.junit.jupiter.api.MethodOrderer;
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorResponseTest.java
new file mode 100644
index 00000000..f1155f1e
--- /dev/null
+++ b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorResponseTest.java
@@ -0,0 +1,73 @@
+/*
+ * 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.unit.models;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.ArrayList;
+import com.bandwidth.sdk.model.BrtcErrorResponse;
+import com.bandwidth.sdk.model.BrtcLink;
+import com.bandwidth.sdk.model.BrtcError;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+
+/**
+ * Model tests for BrtcErrorResponse
+ */
+public class BrtcErrorResponseTest {
+ private final BrtcErrorResponse model = new BrtcErrorResponse()
+ .links(new ArrayList(Arrays.asList(new BrtcLink())))
+ .data(null)
+ .errors(new ArrayList(Arrays.asList(new BrtcError())));
+
+ /**
+ * Model tests for BrtcErrorResponse
+ */
+ @Test
+ public void testBrtcErrorResponse() {
+ assertThat(model, instanceOf(BrtcErrorResponse.class));
+ }
+
+ /**
+ * Test the property 'links'
+ */
+ @Test
+ public void linksTest() {
+ assertThat(model.getLinks(), instanceOf(List.class));
+ assertThat(model.getLinks().size(), equalTo(1));
+ }
+
+ /**
+ * Test the property 'data'
+ */
+ @Test
+ public void dataTest() {
+ assertThat(model.getData(), is(nullValue()));
+ }
+
+ /**
+ * Test the property 'errors'
+ */
+ @Test
+ public void errorsTest() {
+ assertThat(model.getErrors(), instanceOf(List.class));
+ assertThat(model.getErrors().size(), equalTo(1));
+ }
+
+}
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorSourceTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorSourceTest.java
new file mode 100644
index 00000000..27f92f9a
--- /dev/null
+++ b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorSourceTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.unit.models;
+
+import org.junit.jupiter.api.Test;
+
+import com.bandwidth.sdk.model.BrtcErrorSource;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Model tests for BrtcErrorSource
+ */
+public class BrtcErrorSourceTest {
+ private final BrtcErrorSource model = new BrtcErrorSource()
+ .parameter("parameter")
+ .field("field")
+ .header("header")
+ .reference("reference");
+
+ /**
+ * Model tests for BrtcErrorSource
+ */
+ @Test
+ public void testBrtcErrorSource() {
+ assertThat(model, instanceOf(BrtcErrorSource.class));
+ }
+
+ /**
+ * Test the property 'parameter'
+ */
+ @Test
+ public void parameterTest() {
+ assertThat(model.getParameter(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'field'
+ */
+ @Test
+ public void fieldTest() {
+ assertThat(model.getField(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'header'
+ */
+ @Test
+ public void headerTest() {
+ assertThat(model.getHeader(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'reference'
+ */
+ @Test
+ public void referenceTest() {
+ assertThat(model.getReference(), instanceOf(String.class));
+ }
+
+}
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorTest.java
new file mode 100644
index 00000000..6dad651f
--- /dev/null
+++ b/src/test/java/com/bandwidth/sdk/unit/models/BrtcErrorTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.unit.models;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.UUID;
+import com.bandwidth.sdk.model.BrtcError;
+import com.bandwidth.sdk.model.BrtcErrorSource;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.CoreMatchers.instanceOf;
+
+/**
+ * Model tests for BrtcError
+ */
+public class BrtcErrorTest {
+ private final BrtcError model = new BrtcError()
+ .id(UUID.fromString("a3cc5a81-9c97-4e22-b2a4-95a86d684bc2"))
+ .type("type")
+ .description("description")
+ .code("code")
+ .source(new BrtcErrorSource());
+
+ /**
+ * Model tests for BrtcError
+ */
+ @Test
+ public void testBrtcError() {
+ assertThat(model, instanceOf(BrtcError.class));
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ public void idTest() {
+ assertThat(model.getId(), instanceOf(UUID.class));
+ }
+
+ /**
+ * Test the property 'type'
+ */
+ @Test
+ public void typeTest() {
+ assertThat(model.getType(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'description'
+ */
+ @Test
+ public void descriptionTest() {
+ assertThat(model.getDescription(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'code'
+ */
+ @Test
+ public void codeTest() {
+ assertThat(model.getCode(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'source'
+ */
+ @Test
+ public void sourceTest() {
+ assertThat(model.getSource(), instanceOf(BrtcErrorSource.class));
+ }
+
+}
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BrtcLinkTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BrtcLinkTest.java
new file mode 100644
index 00000000..a1dec6cd
--- /dev/null
+++ b/src/test/java/com/bandwidth/sdk/unit/models/BrtcLinkTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.unit.models;
+
+import org.junit.jupiter.api.Test;
+
+import com.bandwidth.sdk.model.BrtcLink;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.CoreMatchers.instanceOf;
+
+/**
+ * Model tests for BrtcLink
+ */
+public class BrtcLinkTest {
+ private final BrtcLink model = new BrtcLink()
+ .href("href")
+ .rel("rel")
+ .method("method");
+
+ /**
+ * Model tests for BrtcLink
+ */
+ @Test
+ public void testBrtcLink() {
+ assertThat(model, instanceOf(BrtcLink.class));
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ public void hrefTest() {
+ assertThat(model.getHref(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'rel'
+ */
+ @Test
+ public void relTest() {
+ assertThat(model.getRel(), instanceOf(String.class));
+ }
+
+ /**
+ * Test the property 'method'
+ */
+ @Test
+ public void methodTest() {
+ assertThat(model.getMethod(), instanceOf(String.class));
+ }
+
+}
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseObjectTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseObjectTest.java
deleted file mode 100644
index d3be488f..00000000
--- a/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseObjectTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.unit.models;
-
-import org.junit.jupiter.api.Test;
-
-import java.time.OffsetDateTime;
-import java.util.List;
-import java.util.Arrays;
-import java.util.ArrayList;
-import com.bandwidth.sdk.model.CreateEndpointResponseObject;
-import com.bandwidth.sdk.model.EndpointTypeEnum;
-import com.bandwidth.sdk.model.EndpointStatusEnum;
-import com.bandwidth.sdk.model.Device;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.CoreMatchers.instanceOf;
-
-/**
- * Model tests for CreateEndpointResponseObject
- */
-public class CreateEndpointResponseObjectTest {
- private final CreateEndpointResponseObject model = new CreateEndpointResponseObject()
- .endpointId("endpointId")
- .type(EndpointTypeEnum.WEBRTC)
- .status(EndpointStatusEnum.CONNECTED)
- .creationTimestamp(OffsetDateTime.now())
- .expirationTimestamp(OffsetDateTime.now())
- .tag("tag")
- .devices(new ArrayList(Arrays.asList(new Device())))
- .token("token");
-
- /**
- * Model tests for CreateEndpointResponseObject
- */
- @Test
- public void testCreateEndpointResponseObject() {
- assertThat(model, instanceOf(CreateEndpointResponseObject.class));
- }
-
- /**
- * Test the property 'endpointId'
- */
- @Test
- public void endpointIdTest() {
- assertThat(model.getEndpointId(), instanceOf(String.class));
- }
-
- /**
- * Test the property 'type'
- */
- @Test
- public void typeTest() {
- assertThat(model.getType(), instanceOf(EndpointTypeEnum.class));
- }
-
- /**
- * Test the property 'status'
- */
- @Test
- public void statusTest() {
- assertThat(model.getStatus(), instanceOf(EndpointStatusEnum.class));
- }
-
- /**
- * Test the property 'creationTimestamp'
- */
- @Test
- public void creationTimestampTest() {
- assertThat(model.getCreationTimestamp(), instanceOf(OffsetDateTime.class));
- }
-
- /**
- * Test the property 'expirationTimestamp'
- */
- @Test
- public void expirationTimestampTest() {
- assertThat(model.getExpirationTimestamp(), instanceOf(OffsetDateTime.class));
- }
-
- /**
- * Test the property 'tag'
- */
- @Test
- public void tagTest() {
- assertThat(model.getTag(), instanceOf(String.class));
- }
-
- /**
- * Test the property 'devices'
- */
- @Test
- public void devicesTest() {
- assertThat(model.getDevices(), instanceOf(List.class));
- }
-
- /**
- * Test the property 'token'
- */
- @Test
- public void tokenTest() {
- assertThat(model.getToken(), instanceOf(String.class));
- }
-
-}
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseTest.java
index c6f6c036..d6030a48 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/CreateEndpointResponseTest.java
@@ -19,8 +19,8 @@
import java.util.ArrayList;
import com.bandwidth.sdk.model.CreateEndpointResponse;
import com.bandwidth.sdk.model.CreateEndpointResponseData;
-import com.bandwidth.sdk.model.Link;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.BrtcLink;
+import com.bandwidth.sdk.model.BrtcError;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;
@@ -31,9 +31,9 @@
*/
public class CreateEndpointResponseTest {
private final CreateEndpointResponse model = new CreateEndpointResponse()
- .links(new ArrayList(Arrays.asList(new Link())))
+ .links(new ArrayList(Arrays.asList(new BrtcLink())))
.data(new CreateEndpointResponseData())
- .errors(new ArrayList(Arrays.asList(new Error())));
+ .errors(new ArrayList(Arrays.asList(new BrtcError())));
/**
* Model tests for CreateEndpointResponse
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/EndpointResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/EndpointResponseTest.java
index 99735e0d..93eb810b 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/EndpointResponseTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/EndpointResponseTest.java
@@ -19,8 +19,8 @@
import java.util.ArrayList;
import com.bandwidth.sdk.model.EndpointResponse;
import com.bandwidth.sdk.model.Endpoint;
-import com.bandwidth.sdk.model.Link;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.BrtcLink;
+import com.bandwidth.sdk.model.BrtcError;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;
@@ -31,9 +31,9 @@
*/
public class EndpointResponseTest {
private final EndpointResponse model = new EndpointResponse()
- .links(new ArrayList(Arrays.asList(new Link())))
+ .links(new ArrayList(Arrays.asList(new BrtcLink())))
.data(new Endpoint())
- .errors(new ArrayList(Arrays.asList(new Error())));
+ .errors(new ArrayList(Arrays.asList(new BrtcError())));
/**
* Model tests for EndpointResponse
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/ErrorResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/ErrorResponseTest.java
index 2cd932f1..1e49dbd0 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/ErrorResponseTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/ErrorResponseTest.java
@@ -16,9 +16,9 @@
import java.util.ArrayList;
import java.util.List;
-import com.bandwidth.sdk.model.ErrorResponse;
-import com.bandwidth.sdk.model.Link;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.BrtcErrorResponse;
+import com.bandwidth.sdk.model.BrtcLink;
+import com.bandwidth.sdk.model.BrtcError;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;
@@ -27,20 +27,20 @@
import static org.hamcrest.CoreMatchers.equalTo;
/**
- * Model tests for ErrorResponse
+ * Model tests for BrtcErrorResponse
*/
public class ErrorResponseTest {
- private final ErrorResponse model = new ErrorResponse()
- .links(new ArrayList())
+ private final BrtcErrorResponse model = new BrtcErrorResponse()
+ .links(new ArrayList())
.data(null)
- .errors(new ArrayList());
+ .errors(new ArrayList());
/**
* Model tests for ErrorResponse
*/
@Test
public void testErrorResponse() {
- assertThat(model, instanceOf(ErrorResponse.class));
+ assertThat(model, instanceOf(BrtcErrorResponse.class));
}
/**
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/ListEndpointsResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/ListEndpointsResponseTest.java
index 49ead100..59135fe1 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/ListEndpointsResponseTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/ListEndpointsResponseTest.java
@@ -19,8 +19,8 @@
import java.util.ArrayList;
import com.bandwidth.sdk.model.ListEndpointsResponse;
import com.bandwidth.sdk.model.Endpoints;
-import com.bandwidth.sdk.model.Link;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.BrtcLink;
+import com.bandwidth.sdk.model.BrtcError;
import com.bandwidth.sdk.model.Page;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -32,10 +32,10 @@
*/
public class ListEndpointsResponseTest {
private final ListEndpointsResponse model = new ListEndpointsResponse()
- .links(new ArrayList(Arrays.asList(new Link())))
+ .links(new ArrayList(Arrays.asList(new BrtcLink())))
.page(new Page())
.data(new ArrayList(Arrays.asList(new Endpoints())))
- .errors(new ArrayList(Arrays.asList(new Error())));
+ .errors(new ArrayList(Arrays.asList(new BrtcError())));
/**
* Model tests for ListEndpointsResponse
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/ErrorTest.java b/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionErrorTest.java
similarity index 77%
rename from src/test/java/com/bandwidth/sdk/unit/models/ErrorTest.java
rename to src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionErrorTest.java
index dcaf5ec6..cbda91ec 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/ErrorTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionErrorTest.java
@@ -17,27 +17,27 @@
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.WebhookSubscriptionError;
import com.bandwidth.sdk.model.TelephoneNumber;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;
/**
- * Model tests for Error
+ * Model tests for WebhookSubscriptionError
*/
-public class ErrorTest {
- private final Error model = new Error()
+public class WebhookSubscriptionErrorTest {
+ private final WebhookSubscriptionError model = new WebhookSubscriptionError()
.code(1234)
.description("description")
.telephoneNumbers(new ArrayList(Arrays.asList(new TelephoneNumber())));
/**
- * Model tests for Error
+ * Model tests for WebhookSubscriptionError
*/
@Test
- public void testError() {
- assertThat(model, instanceOf(Error.class));
+ public void testWebhookSubscriptionError() {
+ assertThat(model, instanceOf(WebhookSubscriptionError.class));
}
/**
diff --git a/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionsListBodyTest.java b/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionsListBodyTest.java
index a80baef6..4edf48dd 100644
--- a/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionsListBodyTest.java
+++ b/src/test/java/com/bandwidth/sdk/unit/models/WebhookSubscriptionsListBodyTest.java
@@ -18,7 +18,7 @@
import java.util.Arrays;
import java.util.ArrayList;
import com.bandwidth.sdk.model.WebhookSubscriptionsListBody;
-import com.bandwidth.sdk.model.Error;
+import com.bandwidth.sdk.model.WebhookSubscriptionError;
import com.bandwidth.sdk.model.LinksObject;
import com.bandwidth.sdk.model.WebhookSubscription;
@@ -31,7 +31,7 @@
public class WebhookSubscriptionsListBodyTest {
private final WebhookSubscriptionsListBody model = new WebhookSubscriptionsListBody()
.links(new LinksObject())
- .errors(new ArrayList(Arrays.asList(new Error())))
+ .errors(new ArrayList(Arrays.asList(new WebhookSubscriptionError())))
.data(new ArrayList(Arrays.asList(new WebhookSubscription())));
/**