From 9e68bfcc28245fa9e33b37e0b5ecfeeb43873d72 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 9 Jan 2024 15:03:16 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version 7.1.0 --- .openapi-generator/VERSION | 2 +- README.md | 1 - api/openapi.yaml | 230 +++++++++--------- build.gradle | 8 +- build.sbt | 2 +- openapitools.json | 2 +- .../java/com/bandwidth/sdk/ApiException.java | 2 +- .../java/com/bandwidth/sdk/Configuration.java | 2 +- src/main/java/com/bandwidth/sdk/Pair.java | 2 +- .../java/com/bandwidth/sdk/StringUtil.java | 2 +- .../com/bandwidth/sdk/auth/ApiKeyAuth.java | 2 +- .../bandwidth/sdk/auth/HttpBearerAuth.java | 2 +- .../sdk/model/AbstractOpenApiSchema.java | 2 +- .../sdk/model/AccountStatistics.java | 3 +- .../bandwidth/sdk/model/AnswerCallback.java | 7 +- .../sdk/model/BridgeCompleteCallback.java | 7 +- .../model/BridgeTargetCompleteCallback.java | 7 +- .../sdk/model/CallDirectionEnum.java | 6 + .../sdk/model/CallRecordingMetadata.java | 11 +- .../com/bandwidth/sdk/model/CallState.java | 7 +- .../bandwidth/sdk/model/CallStateEnum.java | 6 + .../sdk/model/CallbackMethodEnum.java | 6 + .../com/bandwidth/sdk/model/CodeRequest.java | 3 +- .../com/bandwidth/sdk/model/Conference.java | 7 +- .../model/ConferenceCompletedCallback.java | 3 +- .../sdk/model/ConferenceCreatedCallback.java | 3 +- .../bandwidth/sdk/model/ConferenceMember.java | 3 +- .../model/ConferenceMemberExitCallback.java | 3 +- .../model/ConferenceMemberJoinCallback.java | 3 +- .../ConferenceRecordingAvailableCallback.java | 7 +- .../model/ConferenceRecordingMetadata.java | 7 +- .../sdk/model/ConferenceRedirectCallback.java | 3 +- .../sdk/model/ConferenceStateEnum.java | 6 + .../com/bandwidth/sdk/model/CreateCall.java | 15 +- .../sdk/model/CreateCallResponse.java | 11 +- .../sdk/model/CreateLookupResponse.java | 7 +- .../sdk/model/CreateMessageRequestError.java | 3 +- .../bandwidth/sdk/model/DeferredResult.java | 3 +- .../sdk/model/DisconnectCallback.java | 7 +- .../com/bandwidth/sdk/model/Diversion.java | 3 +- .../com/bandwidth/sdk/model/DtmfCallback.java | 7 +- .../com/bandwidth/sdk/model/FieldError.java | 3 +- .../bandwidth/sdk/model/FileFormatEnum.java | 6 + .../bandwidth/sdk/model/GatherCallback.java | 7 +- .../sdk/model/InboundMessageCallback.java | 3 +- .../model/InboundMessageCallbackMessage.java | 9 +- .../bandwidth/sdk/model/InitiateCallback.java | 7 +- .../sdk/model/ListMessageDirectionEnum.java | 6 + .../bandwidth/sdk/model/ListMessageItem.java | 15 +- .../bandwidth/sdk/model/LookupRequest.java | 3 +- .../com/bandwidth/sdk/model/LookupResult.java | 3 +- .../com/bandwidth/sdk/model/LookupStatus.java | 7 +- .../bandwidth/sdk/model/LookupStatusEnum.java | 6 + .../MachineDetectionCompleteCallback.java | 7 +- .../model/MachineDetectionConfiguration.java | 15 +- .../sdk/model/MachineDetectionModeEnum.java | 6 + .../sdk/model/MachineDetectionResult.java | 3 +- .../java/com/bandwidth/sdk/model/Media.java | 3 +- .../java/com/bandwidth/sdk/model/Message.java | 11 +- .../sdk/model/MessageDeliveredCallback.java | 3 +- .../MessageDeliveredCallbackMessage.java | 9 +- .../sdk/model/MessageDirectionEnum.java | 6 + .../sdk/model/MessageFailedCallback.java | 3 +- .../model/MessageFailedCallbackMessage.java | 7 +- .../bandwidth/sdk/model/MessageRequest.java | 7 +- .../sdk/model/MessageSendingCallback.java | 3 +- .../model/MessageSendingCallbackMessage.java | 7 +- .../sdk/model/MessageStatusEnum.java | 6 + .../bandwidth/sdk/model/MessageTypeEnum.java | 6 + .../com/bandwidth/sdk/model/MessagesList.java | 3 +- .../sdk/model/MessagingCodeResponse.java | 3 +- .../sdk/model/MessagingRequestError.java | 3 +- .../sdk/model/MfaForbiddenRequestError.java | 3 +- .../bandwidth/sdk/model/MfaRequestError.java | 3 +- .../model/MfaUnauthorizedRequestError.java | 3 +- .../com/bandwidth/sdk/model/PageInfo.java | 3 +- .../com/bandwidth/sdk/model/PriorityEnum.java | 6 + .../sdk/model/RecordingAvailableCallback.java | 11 +- .../sdk/model/RecordingCompleteCallback.java | 11 +- .../sdk/model/RecordingStateEnum.java | 6 + .../bandwidth/sdk/model/RedirectCallback.java | 7 +- .../sdk/model/RedirectMethodEnum.java | 6 + .../com/bandwidth/sdk/model/StirShaken.java | 3 +- .../java/com/bandwidth/sdk/model/Tag.java | 3 +- .../sdk/model/TnLookupRequestError.java | 3 +- .../sdk/model/TranscribeRecording.java | 7 +- .../bandwidth/sdk/model/Transcription.java | 3 +- .../model/TranscriptionAvailableCallback.java | 11 +- .../sdk/model/TranscriptionList.java | 3 +- .../sdk/model/TranscriptionMetadata.java | 3 +- .../sdk/model/TransferAnswerCallback.java | 7 +- .../sdk/model/TransferCompleteCallback.java | 7 +- .../sdk/model/TransferDisconnectCallback.java | 7 +- .../com/bandwidth/sdk/model/UpdateCall.java | 15 +- .../sdk/model/UpdateCallRecording.java | 5 +- .../bandwidth/sdk/model/UpdateConference.java | 15 +- .../sdk/model/UpdateConferenceMember.java | 3 +- .../sdk/model/VerifyCodeRequest.java | 3 +- .../sdk/model/VerifyCodeResponse.java | 3 +- .../bandwidth/sdk/model/VoiceApiError.java | 3 +- .../sdk/model/VoiceCodeResponse.java | 3 +- 101 files changed, 497 insertions(+), 278 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 41225218..3769235d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/README.md b/README.md index 2b419282..6e724b1f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ Bandwidth - API version: 1.0.0 - - Build date: 2023-11-28T14:02:05.350608Z[Etc/UTC] Bandwidth's Communication APIs diff --git a/api/openapi.yaml b/api/openapi.yaml index e4c10f35..7a30fc8f 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4271,8 +4271,8 @@ components: applicationId: 04e88489-df02-4e34-a0ee-27a91849555f accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - to: +19195551234 - from: +19195554312 + to: "+19195551234" + from: "+19195554312" enqueuedTime: 2022-06-16T13:15:07.160Z callUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 callTimeout: 30 @@ -4347,13 +4347,13 @@ components: summary: Example Number Lookup Request for One Number value: tns: - - +19195551234 + - "+19195551234" multipleNumberRequestExample: summary: Example Number Lookup Request for Multiple Numbers value: tns: - - +19195551234 - - +19195554321 + - "+19195551234" + - "+19195554321" lookupInProgressExample: summary: Example Lookup In Progress Response value: @@ -4365,7 +4365,7 @@ components: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: FAILED failedTelephoneNumbers: - - +191955512345 + - "+191955512345" lookupSingleNumberCompleteExample: summary: Example Single Number Lookup Complete Response value: @@ -4374,7 +4374,7 @@ components: result: - Response Code: 0 Message: NOERROR - E.164 Format: +19195551234 + E.164 Format: "+19195551234" Formatted: (919) 555-1234 Country: US Line Type: Mobile @@ -4389,7 +4389,7 @@ components: result: - Response Code: 0 Message: NOERROR - E.164 Format: +19195551234 + E.164 Format: "+19195551234" Formatted: (919) 555-1234 Country: US Line Type: Mobile @@ -4398,7 +4398,7 @@ components: Mobile Network Code: "010" - Response Code: 0 Message: NOERROR - E.164 Format: +19195554321 + E.164 Format: "+19195554321" Formatted: (919) 555-4321 Country: US Line Type: Mobile @@ -4413,7 +4413,7 @@ components: result: - Response Code: 0 Message: NOERROR - E.164 Format: +19195551234 + E.164 Format: "+19195551234" Formatted: (919) 555-1234 Country: US Line Type: Mobile @@ -4421,7 +4421,7 @@ components: Mobile Country Code: "310" Mobile Network Code: "010" failedTelephoneNumbers: - - +191955512345 + - "+191955512345" lookupSingleNumberCompleteNoInfoExample: summary: Example Single Number Lookup Complete with No Information Response value: @@ -4430,7 +4430,7 @@ components: result: - Response Code: 3 Message: NXDOMAIN - E.164 Format: +19195550000 + E.164 Format: "+19195550000" Formatted: (919) 555-0000 Country: US parameters: @@ -5626,12 +5626,12 @@ components: nextPageToken: GL83PD3C prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 messages: - - sourceTn: +15554443333 + - sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 - destinationTn: +15554442222 + destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z @@ -5643,12 +5643,12 @@ components: campaignClass: T attachmentCount: 1 messageSize: 27 - - sourceTn: +15554443333 + - sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 - destinationTn: +15554442222 + destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z @@ -5677,12 +5677,12 @@ components: type: object listMessageItem: example: - sourceTn: +15554443333 + sourceTn: "+15554443333" messageLength: 18 campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 - destinationTn: +15554442222 + destinationTn: "+15554442222" segmentCount: 1 messageStatus: RECEIVED receiveTime: 2020-04-07T14:03:07Z @@ -5705,11 +5705,11 @@ components: type: string sourceTn: description: The source phone number of the message. - example: +15554443333 + example: "+15554443333" type: string destinationTn: description: The recipient phone number of the message. - example: +15554442222 + example: "+15554442222" type: string messageStatus: $ref: '#/components/schemas/messageStatusEnum' @@ -5850,17 +5850,17 @@ components: type: object message: example: - owner: +15554443333 + owner: "+15554443333" media: - https://dev.bandwidth.com/images/bandwidth-logo.png priority: default segmentCount: 2 - from: +15553332222 + from: "+15553332222" expiration: 2021-02-01T11:29:18-05:00 id: 1589228074636lm4k2je7j7jklbn2 time: 2022-09-14T18:20:16Z to: - - +15552223333 + - "+15552223333" text: Hello world tag: custom tag applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -5872,7 +5872,7 @@ components: type: string owner: description: The Bandwidth phone number associated with the message. - example: +15554443333 + example: "+15554443333" type: string applicationId: description: The application ID associated with the message. @@ -5893,14 +5893,14 @@ components: to: description: The phone number recipients of the message. example: - - +15552223333 + - "+15552223333" items: type: string type: array uniqueItems: true from: description: The phone number the message was sent from. - example: +15553332222 + example: "+15553332222" type: string media: description: The list of media URLs sent in the message. Including a `filename` @@ -5940,8 +5940,8 @@ components: to: description: The phone number(s) the message should be sent to in E164 format. example: - - +15554443333 - - +15552223333 + - "+15554443333" + - "+15552223333" items: type: string type: array @@ -5954,7 +5954,7 @@ components: \ lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore\ \ _ and ampersand &. Alphanumeric Sender IDs must contain at least one\ \ letter." - example: +15551113333 + example: "+15551113333" type: string text: description: The contents of the text message. Must be 2048 characters or @@ -6005,7 +6005,7 @@ components: example: message-received type: string to: - example: +15552223333 + example: "+15552223333" type: string description: example: Incoming message received @@ -6026,7 +6026,7 @@ components: example: 1661365814859loidf7mcwd4qacn7 type: string owner: - example: +15553332222 + example: "+15553332222" type: string applicationId: example: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -6042,13 +6042,13 @@ components: $ref: '#/components/schemas/messageDirectionEnum' to: example: - - +15552223333 + - "+15552223333" items: type: string type: array uniqueItems: true from: - example: +15553332222 + example: "+15553332222" type: string text: example: Hello world @@ -6088,7 +6088,7 @@ components: example: message-sending type: string to: - example: +15552223333 + example: "+15552223333" type: string description: example: Message is sending to carrier @@ -6109,7 +6109,7 @@ components: example: 1661365814859loidf7mcwd4qacn7 type: string owner: - example: +15553332222 + example: "+15553332222" type: string applicationId: example: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -6125,13 +6125,13 @@ components: $ref: '#/components/schemas/messageDirectionEnum' to: example: - - +15552223333 + - "+15552223333" items: type: string type: array uniqueItems: true from: - example: +15553332222 + example: "+15553332222" type: string text: example: Hello world @@ -6173,7 +6173,7 @@ components: example: message-delivered type: string to: - example: +15552223333 + example: "+15552223333" type: string description: example: Message delivered to carrier. @@ -6194,7 +6194,7 @@ components: example: 1661365814859loidf7mcwd4qacn7 type: string owner: - example: +15553332222 + example: "+15553332222" type: string applicationId: example: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -6210,13 +6210,13 @@ components: $ref: '#/components/schemas/messageDirectionEnum' to: example: - - +15552223333 + - "+15552223333" items: type: string type: array uniqueItems: true from: - example: +15553332222 + example: "+15553332222" type: string text: example: Hello world @@ -6257,7 +6257,7 @@ components: example: message-failed type: string to: - example: +15552223333 + example: "+15552223333" type: string description: example: rejected-unallocated-from-number @@ -6282,7 +6282,7 @@ components: example: 1661365814859loidf7mcwd4qacn7 type: string owner: - example: +15553332222 + example: "+15553332222" type: string applicationId: example: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -6298,13 +6298,13 @@ components: $ref: '#/components/schemas/messageDirectionEnum' to: example: - - +15552223333 + - "+15552223333" items: type: string type: array uniqueItems: true from: - example: +15553332222 + example: "+15553332222" type: string text: example: Hello world @@ -6423,14 +6423,14 @@ components: description: |- The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). - example: +19195551234 + example: "+19195551234" type: string from: description: |- A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`, or be one of the following strings: `Restricted`, `Anonymous`, `Private`, or `Unavailable`). - example: +19195554321 + example: "+19195554321" type: string displayName: description: "The caller display name to use when the call is created. \n\ @@ -6591,9 +6591,9 @@ components: answerMethod: POST enqueuedTime: 2022-06-16T13:15:07.16Z disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect - from: +19195554321 + from: "+19195554321" fallbackPassword: mySecretPassword1! - to: +19195551234 + to: "+19195551234" tag: My custom tag value applicationId: 04e88489-df02-4e34-a0ee-27a91849555f username: mySecretUsername @@ -6613,11 +6613,11 @@ components: type: string to: description: Recipient of the outgoing call. - example: +19195551234 + example: "+19195551234" type: string from: description: Phone number that created the outbound call. - example: +19195554321 + example: "+19195554321" type: string enqueuedTime: description: The time at which the call was accepted into the queue. @@ -6727,7 +6727,7 @@ components: originatingId: abc123 from: "19195554321" startTime: 2022-06-16T13:15:07.16Z - to: +19195551234 + to: "+19195551234" state: disconnected endTime: 2022-06-16T13:15:18.314Z errorId: errorId @@ -6755,7 +6755,7 @@ components: to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555), or if the call was to a SIP URI, the SIP URI." - example: +19195551234 + example: "+19195551234" type: string from: description: "The phone number that made the call, in E.164 format (e.g.\ @@ -6967,14 +6967,14 @@ components: url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription status: completed parentCallId: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d - transferCallerId: +15555555555 + transferCallerId: "+15555555555" transferTo: +15555555555) duration: PT13.67S accountId: "920012" channels: 1 - from: +15555555555 + from: "+15555555555" startTime: 2022-06-17T22:19:40.375Z - to: +15555555555 + to: "+15555555555" endTime: 2022-06-17T22:20:00Z applicationId: 04e88489-df02-4e34-a0ee-27a91849555f recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 @@ -7007,19 +7007,19 @@ components: to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string from: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string transferCallerId: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -7592,12 +7592,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -7671,12 +7671,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -7765,12 +7765,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -7928,12 +7928,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string callId: description: The call id associated with the event. @@ -7984,12 +7984,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string callId: description: The call id associated with the event. @@ -8152,12 +8152,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string callId: description: The call id associated with the event. @@ -8249,12 +8249,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string callId: description: The call id associated with the event. @@ -8298,7 +8298,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -8344,12 +8344,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8400,7 +8400,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -8448,12 +8448,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8509,12 +8509,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8587,12 +8587,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8666,7 +8666,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -8706,12 +8706,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8791,7 +8791,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -8831,12 +8831,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8882,7 +8882,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -8922,12 +8922,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -8991,7 +8991,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -9036,12 +9036,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -9081,7 +9081,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -9124,12 +9124,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -9169,7 +9169,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -9231,12 +9231,12 @@ components: description: "The provided identifier of the caller: can be a phone number\ \ in E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string direction: $ref: '#/components/schemas/callDirectionEnum' @@ -9287,7 +9287,7 @@ components: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555) or one of Restricted, Anonymous,\ \ Private, or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in\ @@ -9340,13 +9340,13 @@ components: to: description: "The phone number that received the call, in E.164 format (e.g.\ \ +15555555555)." - example: +15555555555 + example: "+15555555555" type: string from: description: "The provided identifier of the caller: can be a phone number in\ \ E.164 format (e.g. +15555555555) or one of Private, Restricted, Unavailable,\ \ or Anonymous." - example: +15555555555 + example: "+15555555555" type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that was\ @@ -9422,7 +9422,7 @@ components: description: "The phone number used as the from field of the B-leg call, in\ \ E.164 format (e.g. +15555555555) or one of Restricted, Anonymous, Private,\ \ or Unavailable." - example: +15555555555 + example: "+15555555555" type: string transferTo: description: "The phone number used as the to field of the B-leg call, in E.164\ @@ -9523,7 +9523,7 @@ components: origTo: description: Always present. Indicates the last telephone number that the call was diverted from. - example: +15558884444 + example: "+15558884444" type: string type: object transcription: @@ -9564,12 +9564,12 @@ components: properties: to: description: The phone number to send the mfa code to. - example: +19195551234 + example: "+19195551234" pattern: "^\\+[1-9]\\d{1,14}$" type: string from: description: "The application phone number, the sender of the mfa code." - example: +19195554321 + example: "+19195554321" maxLength: 32 pattern: "^\\+[1-9]\\d{1,14}$" type: string @@ -9631,7 +9631,7 @@ components: properties: to: description: The phone number to send the mfa code to. - example: +19195551234 + example: "+19195551234" pattern: "^\\+[1-9]\\d{1,14}$" type: string scope: @@ -9735,7 +9735,7 @@ components: \ was available for the TN." example: result: - - E.164 Format: +19195551234 + - E.164 Format: "+19195551234" Formatted: (919) 555-1234 Line Provider: Verizon Wireless Message: NOERROR @@ -9744,7 +9744,7 @@ components: Mobile Country Code: "310" Mobile Network Code: "010" Response Code: 0 - - E.164 Format: +19195551234 + - E.164 Format: "+19195551234" Formatted: (919) 555-1234 Line Provider: Verizon Wireless Message: NOERROR @@ -9755,7 +9755,7 @@ components: Response Code: 0 requestId: 004223a0-8b17-41b1-bf81-20732adf5590 failedTelephoneNumbers: - - +191955512345 + - "+191955512345" status: COMPLETE properties: requestId: @@ -9773,7 +9773,7 @@ components: failedTelephoneNumbers: description: The telephone numbers whose lookup failed. example: - - +191955512345 + - "+191955512345" items: type: string type: array @@ -9781,7 +9781,7 @@ components: lookupResult: description: Carrier information results for the specified telephone number. example: - E.164 Format: +19195551234 + E.164 Format: "+19195551234" Formatted: (919) 555-1234 Line Provider: Verizon Wireless Message: NOERROR @@ -9801,7 +9801,7 @@ components: type: string E.164 Format: description: The telephone number in E.164 format. - example: +19195551234 + example: "+19195551234" type: string Formatted: description: The formatted version of the telephone number. diff --git a/build.gradle b/build.gradle index f00a66d6..b1118cec 100644 --- a/build.gradle +++ b/build.gradle @@ -62,9 +62,9 @@ if(hasProperty('target') && target == 'android') { def task = project.tasks.create "jar${variant.name.capitalize()}", Jar task.description = "Create jar artifact for ${variant.name}" task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" artifacts.add('archives', task) } } @@ -111,7 +111,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' + implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'javax.ws.rs:jsr311-api:1.1.1' implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' diff --git a/build.sbt b/build.sbt index b836076c..60ebf161 100644 --- a/build.sbt +++ b/build.sbt @@ -17,7 +17,7 @@ lazy val root = (project in file(".")). "javax.ws.rs" % "jsr311-api" % "1.1.1", "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", diff --git a/openapitools.json b/openapitools.json index 3015568c..15fef607 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.0.0" + "version": "7.1.0" } } diff --git a/src/main/java/com/bandwidth/sdk/ApiException.java b/src/main/java/com/bandwidth/sdk/ApiException.java index c63d1148..55fe2953 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/com/bandwidth/sdk/Configuration.java b/src/main/java/com/bandwidth/sdk/Configuration.java index edefb18f..f4cf608f 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -13,7 +13,7 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { public static final String VERSION = "9.0.0"; diff --git a/src/main/java/com/bandwidth/sdk/Pair.java b/src/main/java/com/bandwidth/sdk/Pair.java index d8ed83af..93fad347 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,7 +13,7 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/bandwidth/sdk/StringUtil.java b/src/main/java/com/bandwidth/sdk/StringUtil.java index 9fa04966..29277114 100644 --- a/src/main/java/com/bandwidth/sdk/StringUtil.java +++ b/src/main/java/com/bandwidth/sdk/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java index b28a8b90..6cf0d0c8 100644 --- a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java index 787ab7b7..8773cf97 100644 --- a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 5833a0e6..dbe969d8 100644 --- a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java @@ -23,7 +23,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java index 0af6942b..f79ebb1d 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index 76030451..9717f021 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -584,6 +583,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index 89863acc..3d5feba4 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -639,6 +638,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index d34af701..c1099b6f 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -555,6 +554,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java index c6e3ed0e..4fb49d6d 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public CallDirectionEnum read(final JsonReader jsonReader) throws IOException { return CallDirectionEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CallDirectionEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java index 22d91ff1..a2d02bab 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -48,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -56,7 +55,7 @@ /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -713,6 +712,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/CallState.java b/src/main/java/com/bandwidth/sdk/model/CallState.java index afadbc6b..631fdb03 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -55,7 +54,7 @@ /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -708,6 +707,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java index ce57cbb3..fc05a9d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public CallStateEnum read(final JsonReader jsonReader) throws IOException { return CallStateEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CallStateEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java index f571f1a4..3bb13518 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public CallbackMethodEnum read(final JsonReader jsonReader) throws IOException { return CallbackMethodEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CallbackMethodEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java index c594ef1a..8da66a85 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 49074149..926f518e 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -49,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -57,7 +56,7 @@ /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -421,6 +420,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("conferenceEventUrl") != null && !jsonObj.get("conferenceEventUrl").isJsonNull()) && !jsonObj.get("conferenceEventUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); } + // validate the optional field `conferenceEventMethod` + if (jsonObj.get("conferenceEventMethod") != null && !jsonObj.get("conferenceEventMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("conferenceEventMethod")); + } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index 01fd6aad..d9c7c585 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index 96aec455..d2560e83 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java index e606fd86..18661870 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 128413b1..0221b2bb 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index bc5e3b8f..3da4ebc1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index c60dd83d..5a6e59d8 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -587,6 +586,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java index 82cc7ca9..9b015753 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -500,6 +499,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index 2fe981bc..e61361a0 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java index 91161993..cc15b6cb 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public ConferenceStateEnum read(final JsonReader jsonReader) throws IOException return ConferenceStateEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConferenceStateEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index 700b0933..9c609a4b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -772,6 +771,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("answerUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } + // validate the optional field `answerMethod` + if (jsonObj.get("answerMethod") != null && !jsonObj.get("answerMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } @@ -781,6 +784,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } + // validate the optional field `answerFallbackMethod` + if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); + } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } @@ -790,6 +797,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } + // validate the optional field `disconnectMethod` + if (jsonObj.get("disconnectMethod") != null && !jsonObj.get("disconnectMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); + } // validate the optional field `machineDetection` if (jsonObj.get("machineDetection") != null && !jsonObj.get("machineDetection").isJsonNull()) { MachineDetectionConfiguration.validateJsonElement(jsonObj.get("machineDetection")); diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java index f4fc52cb..822cbfc4 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -802,12 +801,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } + // validate the required field `answerMethod` + CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); if (!jsonObj.get("answerUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } + // validate the optional field `answerFallbackMethod` + if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); + } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } + // validate the required field `disconnectMethod` + CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java index 863b9aa7..0fa8f19f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java @@ -43,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -51,7 +50,7 @@ /** * The request has been accepted for processing but not yet finished and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateLookupResponse { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -222,6 +221,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + LookupStatusEnum.validateJsonElement(jsonObj.get("status")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index 85f33079..da1eb7d0 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/DeferredResult.java b/src/main/java/com/bandwidth/sdk/model/DeferredResult.java index cefb5c67..62c21e3a 100644 --- a/src/main/java/com/bandwidth/sdk/model/DeferredResult.java +++ b/src/main/java/com/bandwidth/sdk/model/DeferredResult.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * DeferredResult */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DeferredResult { public static final String SERIALIZED_NAME_RESULT = "result"; @SerializedName(SERIALIZED_NAME_RESULT) diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index c027d2f7..a5571076 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * The Disconnect event is fired when a call ends, for any reason. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -670,6 +669,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/Diversion.java b/src/main/java/com/bandwidth/sdk/model/Diversion.java index 3978fd48..ceae5db2 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index 267a50cb..44e200a3 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -670,6 +669,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("digit") != null && !jsonObj.get("digit").isJsonNull()) && !jsonObj.get("digit").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/FieldError.java b/src/main/java/com/bandwidth/sdk/model/FieldError.java index 72087950..49ccba96 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) diff --git a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java index 43aaf62c..28fdbe91 100644 --- a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public FileFormatEnum read(final JsonReader jsonReader) throws IOException { return FileFormatEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileFormatEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index c6e84fe7..d9d80c50 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -695,6 +694,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/InboundMessageCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundMessageCallback.java index e3faac64..6bbaba14 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundMessageCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundMessageCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * Inbound Message Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class InboundMessageCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/InboundMessageCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundMessageCallbackMessage.java index 6c4ba90e..63ce6902 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundMessageCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundMessageCallbackMessage.java @@ -50,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -58,7 +57,7 @@ /** * Inbound Message Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class InboundMessageCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -547,6 +546,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("applicationId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } + // validate the required field `direction` + MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -566,6 +567,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 07400f0f..82228b24 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * The Initiate event is fired when an inbound call is received for a Telephone Number on your Account. It is sent to the URL specified in the application associated with the location (sip-peer) that the called telephone number belongs to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -517,6 +516,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java index 600543bf..632ff5c4 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public ListMessageDirectionEnum read(final JsonReader jsonReader) throws IOExcep return ListMessageDirectionEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ListMessageDirectionEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index e3a865e0..03792cfd 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -55,7 +54,7 @@ /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -666,6 +665,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("destinationTn") != null && !jsonObj.get("destinationTn").isJsonNull()) && !jsonObj.get("destinationTn").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); } + // validate the optional field `messageStatus` + if (jsonObj.get("messageStatus") != null && !jsonObj.get("messageStatus").isJsonNull()) { + MessageStatusEnum.validateJsonElement(jsonObj.get("messageStatus")); + } + // validate the optional field `messageDirection` + if (jsonObj.get("messageDirection") != null && !jsonObj.get("messageDirection").isJsonNull()) { + ListMessageDirectionEnum.validateJsonElement(jsonObj.get("messageDirection")); + } + // validate the optional field `messageType` + if (jsonObj.get("messageType") != null && !jsonObj.get("messageType").isJsonNull()) { + MessageTypeEnum.validateJsonElement(jsonObj.get("messageType")); + } if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java index d7a57db6..22b7c1f4 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * Create phone number lookup request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class LookupRequest { public static final String SERIALIZED_NAME_TNS = "tns"; @SerializedName(SERIALIZED_NAME_TNS) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index fce3f9f3..7e8eab77 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class LookupResult { public static final String SERIALIZED_NAME_RESPONSE_CODE = "Response Code"; @SerializedName(SERIALIZED_NAME_RESPONSE_CODE) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java index cb6883f3..e5b436ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * If requestId exists, the result for that request is returned. See the Examples for details on the various responses that you can receive. Generally, if you see a Response Code of 0 in a result for a TN, information will be available for it. Any other Response Code will indicate no information was available for the TN. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class LookupStatus { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -297,6 +296,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + LookupStatusEnum.validateJsonElement(jsonObj.get("status")); + } if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); if (jsonArrayresult != null) { diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java index 205bb514..5fa41466 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +73,10 @@ public LookupStatusEnum read(final JsonReader jsonReader) throws IOException { return LookupStatusEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LookupStatusEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index e850f341..bc81066f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -584,6 +583,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java index 0a4486dd..28b18ddf 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -597,9 +596,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `mode` + if (jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) { + MachineDetectionModeEnum.validateJsonElement(jsonObj.get("mode")); + } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } + // validate the optional field `callbackMethod` + if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } @@ -609,6 +616,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("fallbackUrl") != null && !jsonObj.get("fallbackUrl").isJsonNull()) && !jsonObj.get("fallbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); } + // validate the optional field `fallbackMethod` + if (jsonObj.get("fallbackMethod") != null && !jsonObj.get("fallbackMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("fallbackMethod")); + } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java index a8dfc31b..69c43ccb 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public MachineDetectionModeEnum read(final JsonReader jsonReader) throws IOExcep return MachineDetectionModeEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MachineDetectionModeEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java index 6610f95b..2ea89640 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/bandwidth/sdk/model/Media.java b/src/main/java/com/bandwidth/sdk/model/Media.java index 7daddd24..77e63732 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/com/bandwidth/sdk/model/Message.java b/src/main/java/com/bandwidth/sdk/model/Message.java index 5a29d5a8..2387d8af 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -55,7 +54,7 @@ /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -556,6 +555,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } // ensure the optional json data is an array if present if (jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull() && !jsonObj.get("to").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); @@ -573,6 +576,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallback.java b/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallback.java index 3f7d8e34..7083dc25 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * Message Delivered Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageDeliveredCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallbackMessage.java index 2604af9e..1878c68e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDeliveredCallbackMessage.java @@ -50,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -58,7 +57,7 @@ /** * Message Delivered Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageDeliveredCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -548,6 +547,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("applicationId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } + // validate the required field `direction` + MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -567,6 +568,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java index 16e61c8a..467f82e6 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public MessageDirectionEnum read(final JsonReader jsonReader) throws IOException return MessageDirectionEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MessageDirectionEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallback.java b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallback.java index 00a22cc7..74d188b2 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * Message Failed Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageFailedCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java index d038592d..a322989f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageFailedCallbackMessage.java @@ -50,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -58,7 +57,7 @@ /** * Message Failed Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageFailedCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -549,6 +548,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("applicationId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } + // validate the required field `direction` + MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -568,6 +569,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } + // validate the required field `priority` + PriorityEnum.validateJsonElement(jsonObj.get("priority")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java index b1eaba90..050fa610 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -49,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -57,7 +56,7 @@ /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -441,6 +440,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallback.java b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallback.java index 58b79354..3f7a6903 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallback.java @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -52,7 +51,7 @@ /** * Message Sending Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageSendingCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java index 98a401aa..99f7d021 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageSendingCallbackMessage.java @@ -50,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -58,7 +57,7 @@ /** * Message Sending Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessageSendingCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -549,6 +548,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("applicationId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } + // validate the required field `direction` + MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -570,6 +571,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } else if (!jsonObj.get("media").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } + // validate the required field `priority` + PriorityEnum.validateJsonElement(jsonObj.get("priority")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java index c21f19c4..b91559c4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -80,5 +81,10 @@ public MessageStatusEnum read(final JsonReader jsonReader) throws IOException { return MessageStatusEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MessageStatusEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java index 268f4c42..1c630edb 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public MessageTypeEnum read(final JsonReader jsonReader) throws IOException { return MessageTypeEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MessageTypeEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/MessagesList.java b/src/main/java/com/bandwidth/sdk/model/MessagesList.java index 0c55c78b..f8e2c974 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java index 51fd0e69..d3797b94 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java index f5180aa3..fa734e13 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java index 5acc52df..9308917e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java index 61c2b574..e561f369 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java index 17a1a663..13f7d07a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/PageInfo.java b/src/main/java/com/bandwidth/sdk/model/PageInfo.java index 1e220d15..bc3f6658 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java index b50b8e8b..fcf7e1e5 100644 --- a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public PriorityEnum read(final JsonReader jsonReader) throws IOException { return PriorityEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriorityEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index ed52a9fa..642c178e 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -55,7 +54,7 @@ /** * The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -809,6 +808,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } @@ -827,6 +830,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("channels") != null && !jsonObj.get("channels").isJsonNull()) && !jsonObj.get("channels").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channels` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channels").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index 54428bcf..2f6e5bcf 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -47,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -55,7 +54,7 @@ /** * The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -809,6 +808,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } @@ -827,6 +830,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java index ef78e6d6..2a9d633d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public RecordingStateEnum read(final JsonReader jsonReader) throws IOException { return RecordingStateEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RecordingStateEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index d75551a6..fb3d346f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -639,6 +638,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java index 2a524bc8..0f4b944c 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java @@ -18,6 +18,7 @@ import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +69,10 @@ public RedirectMethodEnum read(final JsonReader jsonReader) throws IOException { return RedirectMethodEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RedirectMethodEnum.fromValue(value); + } } diff --git a/src/main/java/com/bandwidth/sdk/model/StirShaken.java b/src/main/java/com/bandwidth/sdk/model/StirShaken.java index 09399d14..e61a1582 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) diff --git a/src/main/java/com/bandwidth/sdk/model/Tag.java b/src/main/java/com/bandwidth/sdk/model/Tag.java index 54787e17..4296e0c1 100644 --- a/src/main/java/com/bandwidth/sdk/model/Tag.java +++ b/src/main/java/com/bandwidth/sdk/model/Tag.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Tag { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java index ab561ee0..1e3101e4 100644 --- a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * TnLookupRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TnLookupRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index ffaabb38..c3fbc692 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -377,6 +376,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } + // validate the optional field `callbackMethod` + if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { + CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/Transcription.java b/src/main/java/com/bandwidth/sdk/model/Transcription.java index 94d222c3..6b4aedcd 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index 317c86e3..adf617c7 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -48,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -56,7 +55,7 @@ /** * The Transcription Available event is sent when the recording transcription is available to be downloaded. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -782,6 +781,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } @@ -800,6 +803,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } + // validate the optional field `fileFormat` + if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { + FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); + } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionList.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionList.java index 27af0ded..fa70f331 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionList.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionList.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * TranscriptionList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TranscriptionList { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionMetadata.java index 8c447213..1b1cd8ea 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionMetadata.java @@ -43,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -51,7 +50,7 @@ /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index b06f5978..649e51e6 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -611,6 +610,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index 10c65605..e58bf83a 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -695,6 +694,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index 5ac7987c..a00b73ca 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -751,6 +750,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java index c9c5044d..fa5196eb 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -457,9 +456,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + CallStateEnum.validateJsonElement(jsonObj.get("state")); + } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } + // validate the optional field `redirectMethod` + if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { + RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } @@ -469,6 +476,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } + // validate the optional field `redirectFallbackMethod` + if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { + RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); + } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java index 465b250e..e28d539e 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -43,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -51,7 +50,7 @@ /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -199,6 +198,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `state` + RecordingStateEnum.validateJsonElement(jsonObj.get("state")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java index 59772a85..4ef5804e 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -54,7 +53,7 @@ /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -429,9 +428,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + ConferenceStateEnum.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } + // validate the optional field `redirectMethod` + if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { + RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); + } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } @@ -441,6 +448,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } + // validate the optional field `redirectFallbackMethod` + if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { + RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); + } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java index b565ba3b..b50dcdb9 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -53,7 +52,7 @@ /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java index 0e11b235..74e0b678 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -43,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -51,7 +50,7 @@ /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java index da311a5d..ea3820f9 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java index 3e0caae5..7eacdfd5 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -43,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -51,7 +50,7 @@ /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java index e54c78b8..e6572369 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -42,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import com.bandwidth.sdk.JSON; @@ -50,7 +49,7 @@ /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-28T14:02:05.350608Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID)