From 94e4bd30b19237128f1db5e59b42dd81a1ec4ba7 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:49:40 -0400 Subject: [PATCH 1/5] SWI-3399 - Update Bandwidth.yml --- .gitignore | 2 + bandwidth.yml | 788 ++++++++++++++++++++++++++++---------------------- 2 files changed, 437 insertions(+), 353 deletions(-) diff --git a/.gitignore b/.gitignore index a530464a..1d10750f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ hs_err_pid* target .gradle build + +.idea diff --git a/bandwidth.yml b/bandwidth.yml index 5904b442..1cbcd06f 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -40,6 +40,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': @@ -70,6 +72,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': @@ -110,6 +114,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': @@ -141,6 +147,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': @@ -167,9 +175,11 @@ paths: - $ref: '#/components/parameters/errorCode' - $ref: '#/components/parameters/fromDateTime' - $ref: '#/components/parameters/toDateTime' + - $ref: '#/components/parameters/campaignId' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/pageToken' - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/limitTotalCount' responses: '200': $ref: '#/components/responses/listMessagesResponse' @@ -210,6 +220,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': @@ -241,7 +253,7 @@ paths: approximately in order, but exact ordering is not guaranteed. operationId: createCall parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' requestBody: $ref: '#/components/requestBodies/createCallRequest' responses: @@ -282,7 +294,7 @@ paths: 7 days, you will get an HTTP 404 response. operationId: getCallState parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' responses: '200': @@ -312,13 +324,13 @@ paths: BXML document. operationId: updateCall parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' requestBody: $ref: '#/components/requestBodies/updateCallRequest' responses: '200': - description: Call Successfully Modified + description: Call was successfully modified. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -346,13 +358,13 @@ paths: description: Interrupts and replaces an active call's BXML document. operationId: updateCallBxml parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' requestBody: $ref: '#/components/requestBodies/updateCallBxmlRequest' responses: '204': - description: Call BXML Successfully Replaced + description: Call BXML was successfully replaced. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -388,7 +400,7 @@ paths: of conference records. operationId: listConferences parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/name' - $ref: '#/components/parameters/minCreatedTime' - $ref: '#/components/parameters/maxCreatedTime' @@ -422,7 +434,7 @@ paths: description: Returns information about the specified conference. operationId: getConference parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' responses: '200': @@ -450,13 +462,13 @@ paths: description: Update the conference state. operationId: updateConference parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' requestBody: $ref: '#/components/requestBodies/updateConferenceRequest' responses: '204': - description: Conference successfully modified + description: Conference was successfully modified. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -482,13 +494,13 @@ paths: description: Update the conference BXML document. operationId: updateConferenceBxml parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' requestBody: $ref: '#/components/requestBodies/updateConferenceBxmlRequest' responses: '204': - description: Conference successfully modified + description: Conference successfully modified. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -514,7 +526,7 @@ paths: description: Returns information about the specified conference member. operationId: getConferenceMember parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' - $ref: '#/components/parameters/memberId' responses: @@ -543,14 +555,14 @@ paths: description: Updates settings for a particular conference member. operationId: updateConferenceMember parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' - $ref: '#/components/parameters/memberId' requestBody: $ref: '#/components/requestBodies/updateConferenceMemberRequest' responses: '204': - description: Conference member successfully modified + description: Conference member was successfully modified. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -578,7 +590,7 @@ paths: took place during the specified conference. operationId: listConferenceRecordings parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' responses: '200': @@ -608,7 +620,7 @@ paths: description: Returns metadata for the specified recording. operationId: getConferenceRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' - $ref: '#/components/parameters/recordingId' responses: @@ -639,7 +651,7 @@ paths: description: Downloads the specified recording file. operationId: downloadConferenceRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/conferenceId' - $ref: '#/components/parameters/recordingId' responses: @@ -679,7 +691,7 @@ paths: empty if no recordings match the specified criteria. operationId: listAccountCallRecordings parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/to' - $ref: '#/components/parameters/from' - $ref: '#/components/parameters/minStartTime' @@ -712,13 +724,13 @@ paths: description: Pause or resume a recording on an active phone call. operationId: updateCallRecordingState parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' requestBody: $ref: '#/components/requestBodies/updateCallRecordingRequest' responses: '200': - description: Recording state successfully modified + description: Recording state was successfully modified. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -746,7 +758,7 @@ paths: that took place during the specified call. operationId: listCallRecordings parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' responses: '200': @@ -776,7 +788,7 @@ paths: description: Returns metadata for the specified recording. operationId: getCallRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: @@ -813,12 +825,12 @@ paths: irreversible, can take an additional 24 to 48 hours. operationId: deleteRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: '204': - description: Recording Deleted + description: Recording was deleted. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -844,7 +856,7 @@ paths: description: Downloads the specified recording. operationId: downloadCallRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: @@ -873,12 +885,12 @@ paths: description: Deletes the specified recording's media. operationId: deleteRecordingMedia parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: '204': - description: The recording media was successfully deleted + description: The recording media was successfully deleted. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -918,7 +930,7 @@ paths: item. operationId: getCallTranscription parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: @@ -953,14 +965,14 @@ paths: less than 4 hours. operationId: transcribeCallRecording parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' requestBody: $ref: '#/components/requestBodies/transcribeRecordingRequest' responses: '204': - description: Transcription successfully requested + description: Transcription was successfully requested. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -991,12 +1003,12 @@ paths: can take an additional 24 to 48 hours. operationId: deleteCallTranscription parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/recordingId' responses: '204': - description: The transcription was successfully deleted + description: The transcription was successfully deleted. '400': $ref: '#/components/responses/voiceBadRequestError' '401': @@ -1022,7 +1034,7 @@ paths: description: Returns details about the current state of the account. operationId: getStatistics parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/accountId' responses: '200': $ref: '#/components/responses/getStatisticsResponse' @@ -1051,7 +1063,7 @@ paths: description: Send an MFA Code via a phone call. operationId: generateVoiceCode parameters: - - $ref: '#/components/parameters/accountId2' + - $ref: '#/components/parameters/accountId' requestBody: $ref: '#/components/requestBodies/codeRequest' responses: @@ -1076,7 +1088,7 @@ paths: description: Send an MFA code via text message (SMS). operationId: generateMessagingCode parameters: - - $ref: '#/components/parameters/accountId2' + - $ref: '#/components/parameters/accountId' requestBody: $ref: '#/components/requestBodies/codeRequest' responses: @@ -1099,7 +1111,7 @@ paths: description: Verify a previously sent MFA code. operationId: verifyCode parameters: - - $ref: '#/components/parameters/accountId2' + - $ref: '#/components/parameters/accountId' requestBody: $ref: '#/components/requestBodies/codeVerify' responses: @@ -1124,7 +1136,7 @@ paths: tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId3' + - $ref: '#/components/parameters/accountId' requestBody: $ref: '#/components/requestBodies/createLookupRequest' responses: @@ -1153,7 +1165,7 @@ paths: tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId3' + - $ref: '#/components/parameters/accountId' - $ref: '#/components/parameters/requestId' responses: '200': @@ -1175,7 +1187,10 @@ components: schemas: priorityEnum: type: string - description: The priority specified by the user. + description: |- + The priority specified by the user. + + Not supported on MMS. enum: - default - high @@ -1233,7 +1248,9 @@ components: properties: totalCount: type: integer - description: Total number of messages matched by the search. + description: >- + The total number of messages matched by the search. When the request + has limitTotalCount set to true this value is limited to 10,000. example: 100 pageInfo: $ref: '#/components/schemas/pageInfo' @@ -1277,6 +1294,7 @@ components: example: 9902 receiveTime: type: string + format: date-time description: The ISO 8601 datetime of the message. example: 2020-04-07T14:03:07.000Z carrierName: @@ -1310,6 +1328,11 @@ components: description: The campaign class of the message if it has one. nullable: true example: T + campaignId: + type: string + description: The campaign ID of the message if it has one. + nullable: true + example: CJEUMDK pageInfo: title: PageInfo type: object @@ -1402,6 +1425,7 @@ components: example: 93de2206-9669-4e07-948d-329f4b722ee2 time: type: string + format: date-time description: The datetime stamp of the message in ISO 8601 example: 2022-09-14T18:20:16.000Z segmentCount: @@ -1446,6 +1470,11 @@ components: example: custom tag priority: $ref: '#/components/schemas/priorityEnum' + expiration: + type: string + format: date-time + description: The expiration date-time set by the user. + example: '2021-02-01T11:29:18-05:00' messageRequest: title: MessageRequest type: object @@ -1504,10 +1533,14 @@ components: $ref: '#/components/schemas/priorityEnum' expiration: type: string + format: date-time description: >- A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., - 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a + date-time in the future. + + Not supported on MMS. example: '2021-02-01T11:29:18-05:00' inboundMessageCallback: description: Inbound Message Callback @@ -1527,68 +1560,71 @@ components: type: string example: Incoming message received message: - type: object - properties: - id: - type: string - example: 1661365814859loidf7mcwd4qacn7 - owner: - type: string - example: '+15553332222' - applicationId: - type: string - example: 93de2206-9669-4e07-948d-329f4b722ee2 - time: - type: string - format: date-time - example: 2016-09-14T18:20:16.000Z - segmentCount: - type: integer - example: 1 - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - uniqueItems: true - type: array - items: - type: string - example: - - '+15552223333' - from: - type: string - example: '+15553332222' - text: - type: string - example: Hello world - tag: - type: string - example: custom string - media: - type: array - items: - type: string - format: uri - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - id - - owner - - applicationId - - time - - segmentCount - - direction - - to - - from - - text + $ref: '#/components/schemas/inboundMessageCallbackMessage' required: - time - type - to - description - message + inboundMessageCallbackMessage: + description: Inbound Message Callback Message Schema + type: object + properties: + id: + type: string + example: 1661365814859loidf7mcwd4qacn7 + owner: + type: string + example: '+15553332222' + applicationId: + type: string + example: 93de2206-9669-4e07-948d-329f4b722ee2 + time: + type: string + format: date-time + example: 2016-09-14T18:20:16.000Z + segmentCount: + type: integer + example: 1 + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + uniqueItems: true + type: array + items: + type: string + example: + - '+15552223333' + from: + type: string + example: '+15553332222' + text: + type: string + example: Hello world + tag: + type: string + example: custom string + media: + type: array + items: + type: string + format: uri + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + - text messageSendingCallback: type: object description: Message Sending Callback @@ -1607,70 +1643,73 @@ components: type: string example: Message is sending to carrier message: - type: object - properties: - id: - type: string - example: 1661365814859loidf7mcwd4qacn7 - owner: - type: string - example: '+15553332222' - applicationId: - type: string - example: 93de2206-9669-4e07-948d-329f4b722ee2 - time: - type: string - format: date-time - example: 2016-09-14T18:20:16.000Z - segmentCount: - type: integer - example: 1 - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - uniqueItems: true - type: array - items: - type: string - example: - - '+15552223333' - from: - type: string - example: '+15553332222' - text: - type: string - example: '' - tag: - type: string - example: custom string - media: - type: array - items: - type: string - format: uri - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - id - - owner - - applicationId - - time - - segmentCount - - direction - - to - - from - - text - - media - - priority + $ref: '#/components/schemas/messageSendingCallbackMessage' required: - time - type - to - description - message + messageSendingCallbackMessage: + description: Message Sending Callback Message Schema + type: object + properties: + id: + type: string + example: 1661365814859loidf7mcwd4qacn7 + owner: + type: string + example: '+15553332222' + applicationId: + type: string + example: 93de2206-9669-4e07-948d-329f4b722ee2 + time: + type: string + format: date-time + example: 2016-09-14T18:20:16.000Z + segmentCount: + type: integer + example: 1 + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + uniqueItems: true + type: array + items: + type: string + example: + - '+15552223333' + from: + type: string + example: '+15553332222' + text: + type: string + example: Hello world + tag: + type: string + example: custom string + media: + type: array + items: + type: string + format: uri + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + - text + - media + - priority messageDeliveredCallback: description: Message Delivered Callback type: object @@ -1689,69 +1728,72 @@ components: type: string example: Message delivered to carrier. message: - type: object - properties: - id: - type: string - example: 1661365814859loidf7mcwd4qacn7 - owner: - type: string - example: '+15553332222' - applicationId: - type: string - example: 93de2206-9669-4e07-948d-329f4b722ee2 - time: - type: string - format: date-time - example: 2016-09-14T18:20:16.000Z - segmentCount: - type: integer - example: 1 - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - uniqueItems: true - type: array - items: - type: string - example: - - '+15552223333' - from: - type: string - example: '+15553332222' - text: - type: string - example: '' - tag: - type: string - example: custom string - media: - type: array - items: - type: string - format: uri - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - id - - owner - - applicationId - - time - - segmentCount - - direction - - to - - from - - text - - tag + $ref: '#/components/schemas/messageDeliveredCallbackMessage' required: - time - type - to - description - message + messageDeliveredCallbackMessage: + description: Message Delivered Callback Message Schema + type: object + properties: + id: + type: string + example: 1661365814859loidf7mcwd4qacn7 + owner: + type: string + example: '+15553332222' + applicationId: + type: string + example: 93de2206-9669-4e07-948d-329f4b722ee2 + time: + type: string + format: date-time + example: 2016-09-14T18:20:16.000Z + segmentCount: + type: integer + example: 1 + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + uniqueItems: true + type: array + items: + type: string + example: + - '+15552223333' + from: + type: string + example: '+15553332222' + text: + type: string + example: Hello world + tag: + type: string + example: custom string + media: + type: array + items: + type: string + format: uri + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + - text + - tag messageFailedCallback: description: Message Failed Callback type: object @@ -1770,64 +1812,7 @@ components: type: string example: rejected-unallocated-from-number message: - type: object - properties: - id: - type: string - example: 1661365814859loidf7mcwd4qacn7 - owner: - type: string - example: '+15553332222' - applicationId: - type: string - example: 93de2206-9669-4e07-948d-329f4b722ee2 - time: - type: string - format: date-time - example: 2016-09-14T18:20:16.000Z - segmentCount: - type: integer - example: 1 - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - uniqueItems: true - type: array - items: - type: string - example: - - '+15552223333' - from: - type: string - example: '+15553332222' - text: - type: string - example: '' - tag: - type: string - example: custom string - media: - type: array - items: - type: string - format: uri - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - id - - owner - - applicationId - - time - - segmentCount - - direction - - to - - from - - text - - tag - - priority + $ref: '#/components/schemas/messageFailedCallbackMessage' errorCode: type: integer example: 9902 @@ -1838,6 +1823,66 @@ components: - description - message - errorCode + messageFailedCallbackMessage: + description: Message Failed Callback Message Schema + type: object + properties: + id: + type: string + example: 1661365814859loidf7mcwd4qacn7 + owner: + type: string + example: '+15553332222' + applicationId: + type: string + example: 93de2206-9669-4e07-948d-329f4b722ee2 + time: + type: string + format: date-time + example: 2016-09-14T18:20:16.000Z + segmentCount: + type: integer + example: 1 + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + uniqueItems: true + type: array + items: + type: string + example: + - '+15552223333' + from: + type: string + example: '+15553332222' + text: + type: string + example: Hello world + tag: + type: string + example: custom string + media: + type: array + items: + type: string + format: uri + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + - text + - tag + - priority callbackMethodEnum: type: string nullable: true @@ -1860,7 +1905,7 @@ components: The HTTP method to use for the request to `redirectUrl`. GET or POST. Default value is POST.

Not allowed if `state` is - `completed` + `completed`. example: POST recordingStateEnum: type: string @@ -1873,18 +1918,21 @@ components: `paused` to pause an active recording `recording` to resume a paused recording + example: paused callDirectionEnum: type: string enum: - inbound - outbound description: The direction of the call. + example: inbound fileFormatEnum: type: string enum: - mp3 - wav - description: The format that the recording is stored in + description: The format that the recording is stored in. + example: wav callStateEnum: nullable: true type: string @@ -1902,6 +1950,7 @@ components: unanswered inbound call + example: completed conferenceStateEnum: nullable: true type: string @@ -1911,7 +1960,8 @@ components: - completed description: >- Setting the conference state to `completed` ends the conference and - ejects all members + ejects all members. + example: completed machineDetectionModeEnum: type: string default: async @@ -1927,6 +1977,7 @@ components: complete and will include its result. + example: async createCall: type: object required: @@ -1937,9 +1988,11 @@ components: properties: to: type: string - description: |- + description: >- The destination to call (must be an E.164 formatted number - (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.com`)). + + (e.g. `+15555551212`) or a SIP URI (e.g. + `sip:user@server.example`)). example: '+19195551234' from: type: string @@ -1951,11 +2004,21 @@ components: strings: `Restricted`, `Anonymous`, `Private`, or `Unavailable`). example: '+19195554321' + displayName: + nullable: true + type: string + description: >- + The caller display name to use when the call is created. + + May not exceed 256 characters nor contain control characters such as + new lines. + maxLength: 256 + example: John Doe uui: nullable: true type: string example: >- - eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ=;encoding=base64 + eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ;encoding=base64 description: >- A comma-separated list of 'User-To-User' headers to be sent @@ -1989,9 +2052,9 @@ components: call. - Must use `https` if specifying `username` and `password` + Must use `https` if specifying `username` and `password`. maxLength: 2048 - example: https://www.myCallbackServer.com/webhooks/answer + example: https://www.myCallbackServer.example/webhooks/answer answerMethod: $ref: '#/components/schemas/callbackMethodEnum' username: @@ -2017,9 +2080,9 @@ components: Must use `https` if specifying `fallbackUsername` and - `fallbackPassword` + `fallbackPassword`. maxLength: 2048 - example: https://www.myFallbackServer.com/webhooks/answer + example: https://www.myFallbackServer.example/webhooks/answer answerFallbackMethod: $ref: '#/components/schemas/callbackMethodEnum' fallbackUsername: @@ -2043,6 +2106,7 @@ components: href='/docs/voice/webhooks/disconnect'>Disconnect event to when the call ends. This event does not expect a BXML response. maxLength: 2048 + example: https://www.myCallbackServer.example/webhooks/disconnect disconnectMethod: $ref: '#/components/schemas/callbackMethodEnum' callTimeout: @@ -2062,6 +2126,7 @@ components: minimum: 1 maximum: 300 default: 30 + example: 30 callbackTimeout: nullable: true type: number @@ -2076,6 +2141,7 @@ components: minimum: 1 maximum: 25 default: 15 + example: 15 machineDetection: $ref: '#/components/schemas/machineDetectionConfiguration' priority: @@ -2101,6 +2167,7 @@ components: takes precedence over a priority 2 call. + example: 5 tag: nullable: true type: string @@ -2117,7 +2184,8 @@ components: Max length 256 characters. - maximum: 256 + maxLength: 256 + example: arbitrary text here createCallResponse: type: object required: @@ -2138,31 +2206,31 @@ components: accountId: type: string example: '9900000' - description: The bandwidth account ID associated with the call + description: The bandwidth account ID associated with the call. callId: type: string example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - description: Programmable Voice API Call ID + description: Programmable Voice API Call ID. to: type: string example: '+19195551234' - description: Recipient of the outgoing call + description: Recipient of the outgoing call. from: type: string example: '+19195554321' - description: Phone number that created the outbound call + description: Phone number that created the outbound call. enqueuedTime: nullable: true type: string format: date-time - description: Time the call was accepted into the queue + description: The time at which the call was accepted into the queue. example: '2022-06-16T13:15:07.160Z' callUrl: type: string format: uri example: >- https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - description: The URL to update call state + description: The URL to update this call's state. callTimeout: type: number format: double @@ -2181,13 +2249,13 @@ components: nullable: true type: string example: My custom tag value - description: Custom tag value + description: Custom tag value. answerMethod: $ref: '#/components/schemas/callbackMethodEnum' answerUrl: type: string format: uri - example: https://myServer.com/bandwidth/webhooks/answer + example: https://myServer.example/bandwidth/webhooks/answer description: URL to deliver the `answer` event webhook. answerFallbackMethod: $ref: '#/components/schemas/callbackMethodEnum' @@ -2195,7 +2263,7 @@ components: nullable: true type: string format: uri - example: https://myFallbackServer.com/bandwidth/webhooks/answer + example: https://myFallbackServer.example/bandwidth/webhooks/answer description: Fallback URL to deliver the `answer` event webhook. disconnectMethod: $ref: '#/components/schemas/callbackMethodEnum' @@ -2203,7 +2271,7 @@ components: nullable: true type: string format: uri - example: https://myServer.com/bandwidth/webhooks/disconnect + example: https://myServer.example/bandwidth/webhooks/disconnect description: URL to deliver the `disconnect` event webhook. username: type: string @@ -2231,8 +2299,7 @@ components: example: mySecretPassword1! priority: nullable: true - type: number - format: integer + type: integer example: 5 description: The priority of this call over other calls from your account. callState: @@ -2261,7 +2328,7 @@ components: type: string 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 + +15555555555), or if the call was to a SIP URI, the SIP URI. example: '+19195551234' from: type: string @@ -2316,7 +2383,7 @@ components: More information: [Understanding - STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken) + STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). additionalProperties: type: string example: @@ -2442,7 +2509,7 @@ components: nullable: true type: string format: uri - example: https://myServer.com/bandwidth/webhooks/redirect + example: https://myServer.example/bandwidth/webhooks/redirect redirectMethod: $ref: '#/components/schemas/redirectMethodEnum' username: @@ -2463,8 +2530,8 @@ components: format: uri description: |- A fallback url which, if provided, will be used to retry the - redirect callback delivery in case `redirectUrl` fails to respond - example: https://myFallbackServer.com/bandwidth/webhooks/redirect + redirect callback delivery in case `redirectUrl` fails to respond. + example: https://myFallbackServer.example/bandwidth/webhooks/redirect redirectFallbackMethod: $ref: '#/components/schemas/redirectMethodEnum' fallbackUsername: @@ -2498,7 +2565,7 @@ components: Not allowed if `state` is `completed`. - maximum: 256 + maxLength: 256 example: My Custom Tag updateCallRecording: type: object @@ -2564,11 +2631,11 @@ components: properties: id: type: string - description: The Bandwidth-generated conference ID + description: The Bandwidth-generated conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 name: type: string - description: The name of the conference, as specified by your application + description: The name of the conference, as specified by your application. example: my-conference-name createdTime: type: string @@ -2586,7 +2653,7 @@ components: type: string format: uri description: The URL to send the conference-related events. - example: https://myServer.com/bandwidth/webhooks/conferenceEvent + example: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: $ref: '#/components/schemas/callbackMethodEnum' tag: @@ -2605,7 +2672,7 @@ components: A list of active members of the conference. Omitted if this is a response to the [Get Conferences - endpoint](/apis/voice#tag/Conferences/operation/listConferences) + endpoint](/apis/voice#tag/Conferences/operation/listConferences). updateConference: type: object properties: @@ -2622,8 +2689,8 @@ components: event which will provide new BXML. Not allowed if `state` is `completed`, - but required if `state` is `active` - example: https://myServer.com/bandwidth/webhooks/conferenceRedirect + but required if `state` is `active`. + example: https://myServer.example/bandwidth/webhooks/conferenceRedirect redirectMethod: $ref: '#/components/schemas/redirectMethodEnum' username: @@ -2649,7 +2716,8 @@ components: respond. Not allowed if `state` is `completed`. - example: https://myFallbackServer.com/bandwidth/webhooks/conferenceRedirect + example: >- + https://myFallbackServer.example/bandwidth/webhooks/conferenceRedirect redirectFallbackMethod: $ref: '#/components/schemas/redirectMethodEnum' fallbackUsername: @@ -2892,7 +2960,7 @@ components: type: string format: uri maxLength: 2048 - example: https://myServer.com/bandwidth/webhooks/machineDetectionComplete + example: https://myServer.example/bandwidth/webhooks/machineDetectionComplete callbackMethod: $ref: '#/components/schemas/callbackMethodEnum' username: @@ -2920,7 +2988,7 @@ components: to respond maxLength: 2048 example: >- - https://myFallbackServer.com/bandwidth/webhooks/machineDetectionComplete + https://myFallbackServer.example/bandwidth/webhooks/machineDetectionComplete fallbackMethod: $ref: '#/components/schemas/callbackMethodEnum' fallbackUsername: @@ -2952,7 +3020,7 @@ components: and password fields for authorization. - example: https://myServer.com/bandwidth/webhooks/transcriptionAvailable + example: https://myServer.example/bandwidth/webhooks/transcriptionAvailable callbackMethod: $ref: '#/components/schemas/callbackMethodEnum' username: @@ -2984,6 +3052,16 @@ components: between 1 and 25. example: 5.5 + detectLanguage: + type: boolean + nullable: true + description: >- + A boolean value to indicate that the recording may not be in + English, and the transcription service will need to detect the + dominant language the recording is in and transcribe accordingly. + Current supported languages are English, French, and Spanish. + default: false + example: true transcriptionList: type: object properties: @@ -3807,10 +3885,12 @@ components: example: bridgeComplete eventTime: type: string + format: date-time description: >- The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + example: '2022-06-17T22:19:40.375Z' accountId: type: string description: The user account associated with the call. @@ -3972,7 +4052,7 @@ components: example: 4642074b-7b58-478b-96e4-3a60955c6765 nullable: true machineDetectionResult: - type: string + type: object description: >- (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async @@ -4343,6 +4423,12 @@ components: application/json: schema: $ref: '#/components/schemas/messagingRequestError' + messagingNotAcceptableError: + description: Not Acceptable + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' createMessageBadRequestError: description: Bad Request content: @@ -4546,7 +4632,7 @@ components: description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. schema: type: string content: @@ -4863,6 +4949,14 @@ components: example: 2022-09-14T18:20:16.000Z schema: type: string + campaignId: + in: query + name: campaignId + required: false + description: The campaign ID of the message. + example: CJEUMDK + schema: + type: string sort: in: query name: sort @@ -4891,21 +4985,26 @@ components: schema: type: integer example: 50 - accountId1: - name: accountId - in: path - required: true + limitTotalCount: + in: query + name: limitTotalCount + required: false + description: >- + When set to true, the response's totalCount field will have a maximum + value of 10,000. When set to false, or excluded, this will give an + accurate totalCount of all messages that match the provided filters. If + you are experiencing latency, try using this parameter to limit your + results. + example: true schema: - type: string - description: Your Bandwidth Account ID - example: '9900000' + type: boolean callId: name: callId in: path required: true schema: type: string - description: Programmable Voice API Call ID + description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 recordingId: name: recordingId @@ -4913,7 +5012,7 @@ components: required: true schema: type: string - description: Programmable Voice API Recording ID + description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 conferenceId: name: conferenceId @@ -4921,7 +5020,7 @@ components: required: true schema: type: string - description: Programmable Voice API Conference ID + description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 memberId: name: memberId @@ -4929,7 +5028,7 @@ components: required: true schema: type: string - description: Programmable Voice API Conference Member ID + description: Programmable Voice API Conference Member ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 to: name: to @@ -5017,23 +5116,6 @@ components: Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. - accountId2: - name: accountId - description: Bandwidth Account ID with Voice service enabled. - in: path - required: true - style: simple - explode: false - schema: - type: string - accountId3: - name: accountId - in: path - required: true - schema: - type: string - description: The ID of the Bandwidth account that the user belongs to. - example: '9900000' requestId: name: requestId in: path @@ -5264,7 +5346,7 @@ components: value: |- - + updateCallRecordingRequest: required: true @@ -5388,10 +5470,10 @@ components: callbackTimeout: 15 tag: My custom tag value answerMethod: POST - answerUrl: https://myServer.com/bandwidth/webhooks/answer + answerUrl: https://myServer.example/bandwidth/webhooks/answer answerFallbackMethod: POST disconnectMethod: POST - disconnectUrl: https://myServer.com/bandwidth/webhooks/disconnect + disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect username: mySecretUsername password: '*****' fallbackUsername: mySecretUsername @@ -5404,54 +5486,54 @@ components: name: my-conference-name createdTime: '2022-06-17T22:19:40.375Z' completedTime: '2022-06-17T22:20:00.000Z' - conferenceEventUrl: https://myServer.com/bandwidth/webhooks/conferenceEvent + conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: POST tag: my custom tag voiceBadRequestErrorExample: summary: Example of a Bad Request (400) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceUnauthorizedErrorExample: summary: Example of an Unauthorized (401) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceForbiddenErrorExample: summary: Example of a Forbidden (403) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceNotFoundErrorExample: summary: Example of a Not Found (404) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceNotAllowedErrorExample: summary: Example of a Not Allowed (405) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceConflictErrorExample: summary: Example of a Conflict (409) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceUnsupportedMediaTypeErrorExample: summary: Example of an Unsupported Media Type (415) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceTooManyRequestsErrorExample: summary: Example of a Too Many Requests (429) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' voiceInternalServerErrorExample: summary: Example of an Internal Server (500) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed' + description: 'Invalid answerUrl: only http and https are allowed.' singleNumberRequestExample: summary: Example Number Lookup Request for One Number value: From b62431aa81999b23c00f8e16044bee3b1d5449b0 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Fri, 25 Aug 2023 15:47:00 -0400 Subject: [PATCH 2/5] SWI-3339 Regenerate SDK using `v7.0.0` --- .github/workflows/maven.yml | 4 +- .openapi-generator/FILES | 3 + .openapi-generator/VERSION | 2 +- README.md | 8 +- api/openapi.yaml | 1345 ++++++++--------- build.gradle | 2 +- build.sbt | 2 +- docs/AnswerCallback.md | 4 +- docs/BridgeCompleteCallback.md | 2 +- docs/BridgeTargetCompleteCallback.md | 2 +- docs/CallState.md | 4 +- docs/CallsApi.md | 48 +- docs/Conference.md | 6 +- docs/ConferenceCompletedCallback.md | 2 +- docs/ConferenceCreatedCallback.md | 2 +- docs/ConferenceMemberExitCallback.md | 2 +- docs/ConferenceMemberJoinCallback.md | 2 +- docs/ConferenceRecordingAvailableCallback.md | 2 +- docs/ConferenceRedirectCallback.md | 2 +- docs/ConferencesApi.md | 126 +- docs/CreateCall.md | 7 +- docs/CreateCallResponse.md | 16 +- docs/DisconnectCallback.md | 2 +- docs/DtmfCallback.md | 2 +- docs/GatherCallback.md | 2 +- docs/InboundMessageCallbackMessage.md | 1 + docs/InitiateCallback.md | 2 +- docs/ListMessageItem.md | 3 +- docs/MachineDetectionCompleteCallback.md | 4 +- docs/MachineDetectionResult.md | 15 + docs/MediaApi.md | 12 +- docs/Message.md | 3 +- docs/MessageDeliveredCallbackMessage.md | 1 + docs/MessageFailedCallbackMessage.md | 1 + docs/MessageRequest.md | 2 +- docs/MessageSendingCallbackMessage.md | 1 + docs/MessagesApi.md | 13 +- docs/MessagesList.md | 2 +- docs/MfaApi.md | 18 +- docs/PhoneNumberLookupApi.md | 12 +- docs/RecordingAvailableCallback.md | 2 +- docs/RecordingCompleteCallback.md | 2 +- docs/RecordingsApi.md | 154 +- docs/RedirectCallback.md | 2 +- docs/StatisticsApi.md | 8 +- docs/TranscribeRecording.md | 1 + docs/TranscriptionAvailableCallback.md | 2 +- docs/TransferAnswerCallback.md | 2 +- docs/TransferCompleteCallback.md | 2 +- docs/TransferDisconnectCallback.md | 2 +- docs/UpdateCall.md | 2 +- docs/UpdateConference.md | 2 +- .../org/openapitools/client/ApiClient.java | 11 +- .../org/openapitools/client/ApiException.java | 5 +- .../openapitools/client/Configuration.java | 4 +- .../java/org/openapitools/client/JSON.java | 1 + .../java/org/openapitools/client/Pair.java | 2 +- .../org/openapitools/client/StringUtil.java | 2 +- .../org/openapitools/client/api/CallsApi.java | 105 +- .../client/api/ConferencesApi.java | 265 ++-- .../org/openapitools/client/api/MediaApi.java | 17 +- .../openapitools/client/api/MessagesApi.java | 39 +- .../org/openapitools/client/api/MfaApi.java | 25 +- .../client/api/PhoneNumberLookupApi.java | 17 +- .../client/api/RecordingsApi.java | 329 ++-- .../client/api/StatisticsApi.java | 17 +- .../openapitools/client/auth/ApiKeyAuth.java | 2 +- .../client/auth/HttpBearerAuth.java | 2 +- .../client/model/AbstractOpenApiSchema.java | 5 +- .../client/model/AccountStatistics.java | 33 +- .../client/model/AnswerCallback.java | 72 +- .../client/model/BridgeCompleteCallback.java | 58 +- .../model/BridgeTargetCompleteCallback.java | 55 +- .../client/model/CallDirectionEnum.java | 1 - .../client/model/CallRecordingMetadata.java | 51 +- .../openapitools/client/model/CallState.java | 56 +- .../client/model/CallStateEnum.java | 1 - .../client/model/CallbackMethodEnum.java | 1 - .../client/model/CodeRequest.java | 41 +- .../openapitools/client/model/Conference.java | 50 +- .../model/ConferenceCompletedCallback.java | 48 +- .../model/ConferenceCreatedCallback.java | 48 +- .../client/model/ConferenceMember.java | 42 +- .../model/ConferenceMemberExitCallback.java | 51 +- .../model/ConferenceMemberJoinCallback.java | 51 +- .../ConferenceRecordingAvailableCallback.java | 56 +- .../model/ConferenceRecordingMetadata.java | 42 +- .../model/ConferenceRedirectCallback.java | 48 +- .../client/model/ConferenceStateEnum.java | 3 +- .../openapitools/client/model/CreateCall.java | 95 +- .../client/model/CreateCallResponse.java | 79 +- .../client/model/CreateLookupResponse.java | 33 +- .../model/CreateMessageRequestError.java | 42 +- .../client/model/DeferredResult.java | 33 +- .../client/model/DisconnectCallback.java | 59 +- .../openapitools/client/model/Diversion.java | 38 +- .../client/model/DtmfCallback.java | 59 +- .../openapitools/client/model/FieldError.java | 33 +- .../client/model/FileFormatEnum.java | 3 +- .../client/model/GatherCallback.java | 60 +- .../client/model/InboundMessageCallback.java | 42 +- .../model/InboundMessageCallbackMessage.java | 56 +- .../client/model/InitiateCallback.java | 58 +- .../model/ListMessageDirectionEnum.java | 1 - .../client/model/ListMessageItem.java | 94 +- .../client/model/LookupRequest.java | 39 +- .../client/model/LookupResult.java | 40 +- .../client/model/LookupStatus.java | 43 +- .../client/model/LookupStatusEnum.java | 1 - .../MachineDetectionCompleteCallback.java | 72 +- .../model/MachineDetectionConfiguration.java | 46 +- .../model/MachineDetectionModeEnum.java | 1 - .../client/model/MachineDetectionResult.java | 240 +++ .../org/openapitools/client/model/Media.java | 34 +- .../openapitools/client/model/Message.java | 95 +- .../model/MessageDeliveredCallback.java | 42 +- .../MessageDeliveredCallbackMessage.java | 56 +- .../client/model/MessageDirectionEnum.java | 1 - .../client/model/MessageFailedCallback.java | 43 +- .../model/MessageFailedCallbackMessage.java | 56 +- .../client/model/MessageRequest.java | 64 +- .../client/model/MessageSendingCallback.java | 42 +- .../model/MessageSendingCallbackMessage.java | 55 +- .../client/model/MessageStatusEnum.java | 1 - .../client/model/MessageTypeEnum.java | 1 - .../client/model/MessagesList.java | 42 +- .../client/model/MessagingCodeResponse.java | 32 +- .../client/model/MessagingRequestError.java | 37 +- .../model/MfaForbiddenRequestError.java | 32 +- .../client/model/MfaRequestError.java | 33 +- .../model/MfaUnauthorizedRequestError.java | 32 +- .../openapitools/client/model/PageInfo.java | 35 +- .../client/model/PriorityEnum.java | 3 +- .../model/RecordingAvailableCallback.java | 64 +- .../model/RecordingCompleteCallback.java | 64 +- .../client/model/RecordingStateEnum.java | 1 - .../client/model/RedirectCallback.java | 58 +- .../client/model/RedirectMethodEnum.java | 3 +- .../openapitools/client/model/StirShaken.java | 34 +- .../org/openapitools/client/model/Tag.java | 33 +- .../client/model/TnLookupRequestError.java | 32 +- .../client/model/TranscribeRecording.java | 69 +- .../client/model/Transcription.java | 33 +- .../model/TranscriptionAvailableCallback.java | 65 +- .../client/model/TranscriptionList.java | 36 +- .../client/model/TranscriptionMetadata.java | 35 +- .../client/model/TransferAnswerCallback.java | 57 +- .../model/TransferCompleteCallback.java | 60 +- .../model/TransferDisconnectCallback.java | 62 +- .../openapitools/client/model/UpdateCall.java | 43 +- .../client/model/UpdateCallRecording.java | 36 +- .../client/model/UpdateConference.java | 42 +- .../client/model/UpdateConferenceMember.java | 39 +- .../client/model/VerifyCodeRequest.java | 39 +- .../client/model/VerifyCodeResponse.java | 32 +- .../client/model/VoiceApiError.java | 34 +- .../client/model/VoiceCodeResponse.java | 32 +- .../client/api/ConferencesApiTest.java | 2 - .../client/api/MessagesApiTest.java | 9 +- .../model/MachineDetectionResultTest.java | 56 + .../client/utils/CallCleanup.java | 4 +- 161 files changed, 3342 insertions(+), 3261 deletions(-) create mode 100644 docs/MachineDetectionResult.md create mode 100644 src/main/java/org/openapitools/client/model/MachineDetectionResult.java create mode 100644 src/test/java/org/openapitools/client/model/MachineDetectionResultTest.java diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b8250cce..fad1b9f0 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '11' ] + java: [ '8' ] steps: - uses: actions/checkout@v2 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v2 with: java-version: ${{ matrix.java }} distribution: 'temurin' diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 93a56ec7..491b2b50 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -50,6 +50,7 @@ docs/LookupStatusEnum.md docs/MachineDetectionCompleteCallback.md docs/MachineDetectionConfiguration.md docs/MachineDetectionModeEnum.md +docs/MachineDetectionResult.md docs/Media.md docs/MediaApi.md docs/Message.md @@ -177,6 +178,7 @@ src/main/java/org/openapitools/client/model/LookupStatusEnum.java src/main/java/org/openapitools/client/model/MachineDetectionCompleteCallback.java src/main/java/org/openapitools/client/model/MachineDetectionConfiguration.java src/main/java/org/openapitools/client/model/MachineDetectionModeEnum.java +src/main/java/org/openapitools/client/model/MachineDetectionResult.java src/main/java/org/openapitools/client/model/Media.java src/main/java/org/openapitools/client/model/Message.java src/main/java/org/openapitools/client/model/MessageDeliveredCallback.java @@ -221,3 +223,4 @@ src/main/java/org/openapitools/client/model/VerifyCodeRequest.java src/main/java/org/openapitools/client/model/VerifyCodeResponse.java src/main/java/org/openapitools/client/model/VoiceApiError.java src/main/java/org/openapitools/client/model/VoiceCodeResponse.java +src/test/java/org/openapitools/client/model/MachineDetectionResultTest.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index c0be8a79..41225218 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.4.0 \ No newline at end of file +7.0.0 \ No newline at end of file diff --git a/README.md b/README.md index edc5c8d2..e874bd18 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Build date: 2023-02-21T09:43:53.001100-05:00[America/New_York] + - Build date: 2023-08-25T14:55:39.427023-04:00[America/New_York] Bandwidth's Communication APIs @@ -99,7 +99,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); CallsApi apiInstance = new CallsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call try { CreateCallResponse result = apiInstance.createCall(accountId, createCall); @@ -204,6 +204,7 @@ Class | Method | HTTP request | Description - [MachineDetectionCompleteCallback](docs/MachineDetectionCompleteCallback.md) - [MachineDetectionConfiguration](docs/MachineDetectionConfiguration.md) - [MachineDetectionModeEnum](docs/MachineDetectionModeEnum.md) + - [MachineDetectionResult](docs/MachineDetectionResult.md) - [Media](docs/Media.md) - [Message](docs/Message.md) - [MessageDeliveredCallback](docs/MessageDeliveredCallback.md) @@ -250,9 +251,12 @@ Class | Method | HTTP request | Description - [VoiceCodeResponse](docs/VoiceCodeResponse.md) + ## Documentation for Authorization + Authentication schemes defined for the API: + ### Basic - **Type**: HTTP basic authentication diff --git a/api/openapi.yaml b/api/openapi.yaml index 3e23c627..5f777470 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -84,6 +84,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable "415": content: application/json: @@ -164,6 +170,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable "415": content: application/json: @@ -241,6 +253,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable "415": content: application/json: @@ -338,6 +356,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable "415": content: application/json: @@ -480,6 +504,15 @@ paths: schema: type: string style: form + - description: The campaign ID of the message. + example: CJEUMDK + explode: true + in: query + name: campaignId + required: false + schema: + type: string + style: form - description: The field and direction to sort by combined with a colon. Direction is either asc or desc. example: sourceTn:desc @@ -509,6 +542,19 @@ paths: schema: type: integer style: form + - description: "When set to true, the response's totalCount field will have\ + \ a maximum value of 10,000. When set to false, or excluded, this will give\ + \ an accurate totalCount of all messages that match the provided filters.\ + \ If you are experiencing latency, try using this parameter to limit your\ + \ results." + example: true + explode: true + in: query + name: limitTotalCount + required: false + schema: + type: boolean + style: form responses: "200": content: @@ -614,6 +660,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable "415": content: application/json: @@ -650,7 +702,7 @@ paths: Please note: Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed. operationId: createCall parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -668,7 +720,6 @@ paths: examples: createCall Response: $ref: '#/components/examples/createCallResponseExample' - value: null schema: $ref: '#/components/schemas/createCallResponse' description: Call Successfully Created @@ -685,7 +736,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -695,7 +745,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -705,7 +754,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -715,7 +763,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -725,7 +772,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -735,7 +781,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -745,13 +790,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -762,7 +806,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -782,7 +825,7 @@ paths: **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response. operationId: getCallState parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -791,7 +834,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -813,7 +856,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -823,7 +865,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -833,7 +874,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -843,7 +883,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -853,7 +892,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -863,7 +901,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -873,13 +910,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -890,7 +926,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -903,7 +938,7 @@ paths: return a BXML document. operationId: updateCall parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -912,7 +947,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -925,14 +960,13 @@ paths: $ref: '#/components/requestBodies/updateCallRequest' responses: "200": - description: Call Successfully Modified + description: Call was successfully modified. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -942,7 +976,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -952,7 +985,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -962,7 +994,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -972,7 +1003,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -982,7 +1012,6 @@ paths: examples: conflictErrorExample: $ref: '#/components/examples/voiceConflictErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Conflict @@ -992,7 +1021,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1002,13 +1030,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1019,7 +1046,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1036,7 +1062,7 @@ paths: description: Interrupts and replaces an active call's BXML document. operationId: updateCallBxml parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1045,7 +1071,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -1058,14 +1084,13 @@ paths: $ref: '#/components/requestBodies/updateCallBxmlRequest' responses: "204": - description: Call BXML Successfully Replaced + description: Call BXML was successfully replaced. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1075,7 +1100,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1085,7 +1109,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1095,7 +1118,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1105,7 +1127,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1115,7 +1136,6 @@ paths: examples: conflictErrorExample: $ref: '#/components/examples/voiceConflictErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Conflict @@ -1125,7 +1145,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1135,13 +1154,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1152,7 +1170,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1172,7 +1189,7 @@ paths: **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel="next"`) will be returned in the response. The url can be used to retrieve the next page of conference records. operationId: listConferences parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1240,7 +1257,6 @@ paths: examples: listConferences Response: $ref: '#/components/examples/listConferencesResponseExample' - value: null schema: items: $ref: '#/components/schemas/conference' @@ -1252,7 +1268,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1262,7 +1277,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1272,7 +1286,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1282,7 +1295,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1292,7 +1304,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1302,7 +1313,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1312,13 +1322,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1329,7 +1338,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1345,7 +1353,7 @@ paths: description: Returns information about the specified conference. operationId: getConference parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1354,7 +1362,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -1376,7 +1384,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1386,7 +1393,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1396,7 +1402,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1406,7 +1411,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1416,7 +1420,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1426,7 +1429,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1436,13 +1438,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1453,7 +1454,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1465,7 +1465,7 @@ paths: description: Update the conference state. operationId: updateConference parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1474,7 +1474,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -1487,14 +1487,13 @@ paths: $ref: '#/components/requestBodies/updateConferenceRequest' responses: "204": - description: Conference successfully modified + description: Conference was successfully modified. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1504,7 +1503,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1514,7 +1512,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1524,7 +1521,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1534,7 +1530,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1544,7 +1539,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1554,13 +1548,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1571,7 +1564,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1588,7 +1580,7 @@ paths: description: Update the conference BXML document. operationId: updateConferenceBxml parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1597,7 +1589,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -1610,14 +1602,13 @@ paths: $ref: '#/components/requestBodies/updateConferenceBxmlRequest' responses: "204": - description: Conference successfully modified + description: Conference successfully modified. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1627,7 +1618,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1637,7 +1627,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1647,7 +1636,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1657,7 +1645,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1667,7 +1654,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1677,13 +1663,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1694,7 +1679,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1711,7 +1695,7 @@ paths: description: Returns information about the specified conference member. operationId: getConferenceMember parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1720,7 +1704,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -1729,7 +1713,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference Member ID + - description: Programmable Voice API Conference Member ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -1751,7 +1735,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1761,7 +1744,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1771,7 +1753,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1781,7 +1762,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1791,7 +1771,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1801,7 +1780,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1811,13 +1789,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1828,7 +1805,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1840,7 +1816,7 @@ paths: description: Updates settings for a particular conference member. operationId: updateConferenceMember parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1849,7 +1825,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -1858,7 +1834,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference Member ID + - description: Programmable Voice API Conference Member ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -1871,14 +1847,13 @@ paths: $ref: '#/components/requestBodies/updateConferenceMemberRequest' responses: "204": - description: Conference member successfully modified + description: Conference member was successfully modified. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -1888,7 +1863,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -1898,7 +1872,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -1908,7 +1881,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -1918,7 +1890,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -1928,7 +1899,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -1938,13 +1908,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -1955,7 +1924,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -1973,7 +1941,7 @@ paths: that took place during the specified conference. operationId: listConferenceRecordings parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -1982,7 +1950,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -2006,7 +1974,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2016,7 +1983,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2026,7 +1992,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2036,7 +2001,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2046,7 +2010,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2056,7 +2019,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2066,13 +2028,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2083,7 +2044,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2099,7 +2059,7 @@ paths: description: Returns metadata for the specified recording. operationId: getConferenceRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2108,7 +2068,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -2117,7 +2077,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2139,7 +2099,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2149,7 +2108,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2159,7 +2117,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2169,7 +2126,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2179,7 +2135,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2189,7 +2144,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2199,13 +2153,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2216,7 +2169,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2232,7 +2184,7 @@ paths: description: Downloads the specified recording file. operationId: downloadConferenceRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2241,7 +2193,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Conference ID + - description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -2250,7 +2202,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2277,7 +2229,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2287,7 +2238,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2297,7 +2247,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2307,7 +2256,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2317,7 +2265,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2327,7 +2274,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2337,13 +2283,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2354,7 +2299,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2374,7 +2318,7 @@ paths: empty if no recordings match the specified criteria. operationId: listAccountCallRecordings parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2436,7 +2380,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2446,7 +2389,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2456,7 +2398,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2466,7 +2407,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2476,7 +2416,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2486,7 +2425,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2496,13 +2434,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2513,7 +2450,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2529,7 +2465,7 @@ paths: description: Pause or resume a recording on an active phone call. operationId: updateCallRecordingState parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2538,7 +2474,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2551,14 +2487,13 @@ paths: $ref: '#/components/requestBodies/updateCallRecordingRequest' responses: "200": - description: Recording state successfully modified + description: Recording state was successfully modified. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2568,7 +2503,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2578,7 +2512,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2588,7 +2521,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2598,7 +2530,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2608,7 +2539,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2618,13 +2548,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2635,7 +2564,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2654,7 +2582,7 @@ paths: that took place during the specified call. operationId: listCallRecordings parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2663,7 +2591,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2687,7 +2615,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2697,7 +2624,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2707,7 +2633,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2717,7 +2642,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2727,7 +2651,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2737,7 +2660,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2747,13 +2669,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2764,7 +2685,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2783,7 +2703,7 @@ paths: Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. operationId: deleteRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2792,7 +2712,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2801,7 +2721,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2812,14 +2732,13 @@ paths: style: simple responses: "204": - description: Recording Deleted + description: Recording was deleted. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2829,7 +2748,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2839,7 +2757,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2849,7 +2766,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2859,7 +2775,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2869,7 +2784,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -2879,13 +2793,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -2896,7 +2809,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -2908,7 +2820,7 @@ paths: description: Returns metadata for the specified recording. operationId: getCallRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -2917,7 +2829,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2926,7 +2838,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -2948,7 +2860,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -2958,7 +2869,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -2968,7 +2878,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -2978,7 +2887,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -2988,7 +2896,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -2998,7 +2905,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3008,13 +2914,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3025,7 +2930,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3041,7 +2945,7 @@ paths: description: Deletes the specified recording's media. operationId: deleteRecordingMedia parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3050,7 +2954,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3059,7 +2963,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3070,14 +2974,13 @@ paths: style: simple responses: "204": - description: The recording media was successfully deleted + description: The recording media was successfully deleted. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3087,7 +2990,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3097,7 +2999,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3107,7 +3008,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3117,7 +3017,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3127,7 +3026,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3137,13 +3035,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3154,7 +3051,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3166,7 +3062,7 @@ paths: description: Downloads the specified recording. operationId: downloadCallRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3175,7 +3071,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3184,7 +3080,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3211,7 +3107,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3221,7 +3116,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3231,7 +3125,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3241,7 +3134,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3251,7 +3143,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3261,7 +3152,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3271,13 +3161,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3288,7 +3177,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3307,7 +3195,7 @@ paths: Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. operationId: deleteCallTranscription parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3316,7 +3204,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3325,7 +3213,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3336,14 +3224,13 @@ paths: style: simple responses: "204": - description: The transcription was successfully deleted + description: The transcription was successfully deleted. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3353,7 +3240,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3363,7 +3249,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3373,7 +3258,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3383,7 +3267,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3393,7 +3276,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3403,13 +3285,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3420,7 +3301,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3437,7 +3317,7 @@ paths: During a [``](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item. operationId: getCallTranscription parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3446,7 +3326,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3455,7 +3335,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3477,7 +3357,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3487,7 +3366,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3497,7 +3375,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3507,7 +3384,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3517,7 +3393,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3527,7 +3402,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3537,13 +3411,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3554,7 +3427,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3569,7 +3441,7 @@ paths: less than 4 hours. operationId: transcribeCallRecording parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3578,7 +3450,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Call ID + - description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3587,7 +3459,7 @@ paths: schema: type: string style: simple - - description: Programmable Voice API Recording ID + - description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -3600,14 +3472,13 @@ paths: $ref: '#/components/requestBodies/transcribeRecordingRequest' responses: "204": - description: Transcription successfully requested + description: Transcription was successfully requested. "400": content: application/json: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3617,7 +3488,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3627,7 +3497,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3637,7 +3506,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3647,7 +3515,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3657,7 +3524,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3667,13 +3533,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3684,7 +3549,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3701,7 +3565,7 @@ paths: description: Returns details about the current state of the account. operationId: getStatistics parameters: - - description: Your Bandwidth Account ID + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -3723,7 +3587,6 @@ paths: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -3733,7 +3596,6 @@ paths: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -3743,7 +3605,6 @@ paths: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -3753,7 +3614,6 @@ paths: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -3763,7 +3623,6 @@ paths: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -3773,7 +3632,6 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -3783,13 +3641,12 @@ paths: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -3800,7 +3657,6 @@ paths: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -3816,7 +3672,8 @@ paths: description: Send an MFA Code via a phone call. operationId: generateVoiceCode parameters: - - description: Bandwidth Account ID with Voice service enabled. + - description: Your Bandwidth Account ID. + example: "9900000" explode: false in: path name: accountId @@ -3870,7 +3727,8 @@ paths: description: Send an MFA code via text message (SMS). operationId: generateMessagingCode parameters: - - description: Bandwidth Account ID with Voice service enabled. + - description: Your Bandwidth Account ID. + example: "9900000" explode: false in: path name: accountId @@ -3924,7 +3782,8 @@ paths: description: Verify a previously sent MFA code. operationId: verifyCode parameters: - - description: Bandwidth Account ID with Voice service enabled. + - description: Your Bandwidth Account ID. + example: "9900000" explode: false in: path name: accountId @@ -3984,7 +3843,7 @@ paths: description: Create a Phone Number Lookup Request. operationId: createLookup parameters: - - description: The ID of the Bandwidth account that the user belongs to. + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -4002,7 +3861,6 @@ paths: examples: lookupResponseExample: $ref: '#/components/examples/lookupInProgressExample' - value: null schema: $ref: '#/components/schemas/createLookupResponse' description: Accepted @@ -4089,7 +3947,7 @@ paths: description: Get an existing Phone Number Lookup Request. operationId: getLookupStatus parameters: - - description: The ID of the Bandwidth account that the user belongs to. + - description: Your Bandwidth Account ID. example: "9900000" explode: false in: path @@ -4114,22 +3972,16 @@ paths: examples: lookupInProgressExample: $ref: '#/components/examples/lookupInProgressExample' - value: null lookupFailedExample: $ref: '#/components/examples/lookupFailedExample' - value: null lookupSingleNumberCompleteExample: $ref: '#/components/examples/lookupSingleNumberCompleteExample' - value: null lookupMultipleNumbersCompleteExample: $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' - value: null lookupMultipleNumbersPartialCompleteExample: $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' - value: null lookupSingleNumberCompleteNoInfoExample: $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' - value: null schema: $ref: '#/components/schemas/lookupStatus' description: OK @@ -4248,10 +4100,10 @@ components: callbackTimeout: 15 tag: My custom tag value answerMethod: POST - answerUrl: https://myServer.com/bandwidth/webhooks/answer + answerUrl: https://myServer.example/bandwidth/webhooks/answer answerFallbackMethod: POST disconnectMethod: POST - disconnectUrl: https://myServer.com/bandwidth/webhooks/disconnect + disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect username: mySecretUsername password: '*****' fallbackUsername: mySecretUsername @@ -4264,54 +4116,54 @@ components: name: my-conference-name createdTime: 2022-06-17T22:19:40.375Z completedTime: 2022-06-17T22:20:00.000Z - conferenceEventUrl: https://myServer.com/bandwidth/webhooks/conferenceEvent + conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: POST tag: my custom tag voiceBadRequestErrorExample: summary: Example of a Bad Request (400) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceUnauthorizedErrorExample: summary: Example of an Unauthorized (401) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceForbiddenErrorExample: summary: Example of a Forbidden (403) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceNotFoundErrorExample: summary: Example of a Not Found (404) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceNotAllowedErrorExample: summary: Example of a Not Allowed (405) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceConflictErrorExample: summary: Example of a Conflict (409) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceUnsupportedMediaTypeErrorExample: summary: Example of an Unsupported Media Type (415) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceTooManyRequestsErrorExample: summary: Example of a Too Many Requests (429) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." voiceInternalServerErrorExample: summary: Example of an Internal Server (500) Error value: type: validation - description: "Invalid answerUrl: only http and https are allowed" + description: "Invalid answerUrl: only http and https are allowed." singleNumberRequestExample: summary: Example Number Lookup Request for One Number value: @@ -4565,6 +4417,16 @@ components: schema: type: string style: form + campaignId: + description: The campaign ID of the message. + example: CJEUMDK + explode: true + in: query + name: campaignId + required: false + schema: + type: string + style: form sort: description: The field and direction to sort by combined with a colon. Direction is either asc or desc. @@ -4597,18 +4459,22 @@ components: schema: type: integer style: form - accountId1: - description: Your Bandwidth Account ID - example: "9900000" - explode: false - in: path - name: accountId - required: true + limitTotalCount: + description: "When set to true, the response's totalCount field will have a\ + \ maximum value of 10,000. When set to false, or excluded, this will give\ + \ an accurate totalCount of all messages that match the provided filters.\ + \ If you are experiencing latency, try using this parameter to limit your\ + \ results." + example: true + explode: true + in: query + name: limitTotalCount + required: false schema: - type: string - style: simple + type: boolean + style: form callId: - description: Programmable Voice API Call ID + description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -4618,7 +4484,7 @@ components: type: string style: simple recordingId: - description: Programmable Voice API Recording ID + description: Programmable Voice API Recording ID. example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -4628,7 +4494,7 @@ components: type: string style: simple conferenceId: - description: Programmable Voice API Conference ID + description: Programmable Voice API Conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 explode: false in: path @@ -4638,7 +4504,7 @@ components: type: string style: simple memberId: - description: Programmable Voice API Conference Member ID + description: Programmable Voice API Conference Member ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 explode: false in: path @@ -4745,25 +4611,6 @@ components: schema: type: string style: form - accountId2: - description: Bandwidth Account ID with Voice service enabled. - explode: false - in: path - name: accountId - required: true - schema: - type: string - style: simple - accountId3: - description: The ID of the Bandwidth account that the user belongs to. - example: "9900000" - explode: false - in: path - name: accountId - required: true - schema: - type: string - style: simple requestId: description: The phone number lookup request ID from Bandwidth. example: 004223a0-8b17-41b1-bf81-20732adf5590 @@ -4991,7 +4838,7 @@ components: value: |- - + schema: description: A valid BXML document to replace the call's current BXML. @@ -5056,10 +4903,8 @@ components: examples: singleNumberRequestExample: $ref: '#/components/examples/singleNumberRequestExample' - value: null multipleNumberRequestExample: $ref: '#/components/examples/multipleNumberRequestExample' - value: null schema: $ref: '#/components/schemas/lookupRequest' description: Phone number lookup request. @@ -5106,6 +4951,12 @@ components: schema: $ref: '#/components/schemas/messagingRequestError' description: Bad Request + messagingNotAcceptableError: + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable createMessageBadRequestError: content: application/json: @@ -5154,7 +5005,6 @@ components: examples: createCall Response: $ref: '#/components/examples/createCallResponseExample' - value: null schema: $ref: '#/components/schemas/createCallResponse' description: Call Successfully Created @@ -5214,7 +5064,6 @@ components: examples: listConferences Response: $ref: '#/components/examples/listConferencesResponseExample' - value: null schema: items: $ref: '#/components/schemas/conference' @@ -5252,7 +5101,6 @@ components: examples: badRequestErrorExample: $ref: '#/components/examples/voiceBadRequestErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Bad Request @@ -5262,7 +5110,6 @@ components: examples: unauthorizedErrorExample: $ref: '#/components/examples/voiceUnauthorizedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unauthorized @@ -5272,7 +5119,6 @@ components: examples: forbiddenErrorExample: $ref: '#/components/examples/voiceForbiddenErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Forbidden @@ -5282,7 +5128,6 @@ components: examples: notFoundErrorExample: $ref: '#/components/examples/voiceNotFoundErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Not Found @@ -5292,7 +5137,6 @@ components: examples: notAllowedErrorExample: $ref: '#/components/examples/voiceNotAllowedErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed @@ -5302,7 +5146,6 @@ components: examples: conflictErrorExample: $ref: '#/components/examples/voiceConflictErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Conflict @@ -5312,7 +5155,6 @@ components: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type @@ -5322,13 +5164,12 @@ components: examples: tooManyRequestsErrorExample: $ref: '#/components/examples/voiceTooManyRequestsErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: - description: When you should try your request again + description: When you should try your request again. explode: false schema: type: string @@ -5339,7 +5180,6 @@ components: examples: internalServerErrorExample: $ref: '#/components/examples/voiceInternalServerErrorExample' - value: null schema: $ref: '#/components/schemas/voiceApiError' description: Internal Server Error @@ -5397,7 +5237,6 @@ components: examples: lookupResponseExample: $ref: '#/components/examples/lookupInProgressExample' - value: null schema: $ref: '#/components/schemas/createLookupResponse' description: Accepted @@ -5407,22 +5246,16 @@ components: examples: lookupInProgressExample: $ref: '#/components/examples/lookupInProgressExample' - value: null lookupFailedExample: $ref: '#/components/examples/lookupFailedExample' - value: null lookupSingleNumberCompleteExample: $ref: '#/components/examples/lookupSingleNumberCompleteExample' - value: null lookupMultipleNumbersCompleteExample: $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' - value: null lookupMultipleNumbersPartialCompleteExample: $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' - value: null lookupSingleNumberCompleteNoInfoExample: $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' - value: null schema: $ref: '#/components/schemas/lookupStatus' description: OK @@ -5498,7 +5331,10 @@ components: description: Internal Server Error schemas: priorityEnum: - description: The priority specified by the user. + description: |- + The priority specified by the user. + + Not supported on MMS. enum: - default - high @@ -5559,12 +5395,13 @@ components: messages: - sourceTn: +15554443333 messageLength: 18 + campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 destinationTn: +15554442222 segmentCount: 1 messageStatus: RECEIVED - receiveTime: 2020-04-07T14:03:07.000Z + receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: null messageType: sms @@ -5575,12 +5412,13 @@ components: messageSize: 27 - sourceTn: +15554443333 messageLength: 18 + campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 destinationTn: +15554442222 segmentCount: 1 messageStatus: RECEIVED - receiveTime: 2020-04-07T14:03:07.000Z + receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: null messageType: sms @@ -5592,7 +5430,8 @@ components: totalCount: 100 properties: totalCount: - description: Total number of messages matched by the search. + description: "The total number of messages matched by the search. When the\ + \ request has limitTotalCount set to true this value is limited to 10,000." example: 100 type: integer pageInfo: @@ -5607,12 +5446,13 @@ components: example: sourceTn: +15554443333 messageLength: 18 + campaignId: CJEUMDK messageId: 1589228074636lm4k2je7j7jklbn2 errorCode: 9902 destinationTn: +15554442222 segmentCount: 1 messageStatus: RECEIVED - receiveTime: 2020-04-07T14:03:07.000Z + receiveTime: 2020-04-07T14:03:07Z accountId: "9900000" messageDirection: null messageType: sms @@ -5654,7 +5494,8 @@ components: type: integer receiveTime: description: The ISO 8601 datetime of the message. - example: 2020-04-07T14:03:07.000Z + example: 2020-04-07T14:03:07Z + format: date-time type: string carrierName: description: The name of the carrier. Not currently supported for MMS coming @@ -5686,6 +5527,11 @@ components: example: T nullable: true type: string + campaignId: + description: The campaign ID of the message if it has one. + example: CJEUMDK + nullable: true + type: string title: listMessageItem type: object pageInfo: @@ -5772,18 +5618,19 @@ components: message: example: owner: +15554443333 + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + priority: default + segmentCount: 2 from: +15553332222 + expiration: 2021-02-01T11:29:18-05:00 id: 1589228074636lm4k2je7j7jklbn2 - time: 2022-09-14T18:20:16.000Z + time: 2022-09-14T18:20:16Z to: - +15552223333 - media: - - https://dev.bandwidth.com/images/bandwidth-logo.png text: Hello world tag: custom tag applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - priority: default - segmentCount: 2 direction: null properties: id: @@ -5800,7 +5647,8 @@ components: type: string time: description: The datetime stamp of the message in ISO 8601 - example: 2022-09-14T18:20:16.000Z + example: 2022-09-14T18:20:16Z + format: date-time type: string segmentCount: description: The number of segments the original message from the user is @@ -5842,6 +5690,11 @@ components: type: string priority: $ref: '#/components/schemas/priorityEnum' + expiration: + description: The expiration date-time set by the user. + example: 2021-02-01T11:29:18-05:00 + format: date-time + type: string title: Message type: object messageRequest: @@ -5891,10 +5744,11 @@ components: priority: $ref: '#/components/schemas/priorityEnum' expiration: - description: "A string with the date/time value that the message will automatically\ - \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ - \ or 2021-03-13T20:59:26-05:00." + description: |- + A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + Not supported on MMS. example: 2021-02-01T11:29:18-05:00 + format: date-time type: string required: - applicationId @@ -5919,7 +5773,7 @@ components: example: Incoming message received type: string message: - $ref: '#/components/schemas/inboundMessageCallback_message' + $ref: '#/components/schemas/inboundMessageCallbackMessage' required: - description - message @@ -5927,6 +5781,64 @@ components: - to - type type: object + inboundMessageCallbackMessage: + description: Inbound Message Callback Message Schema + properties: + id: + example: 1661365814859loidf7mcwd4qacn7 + type: string + owner: + example: +15553332222 + type: string + applicationId: + example: 93de2206-9669-4e07-948d-329f4b722ee2 + type: string + time: + example: 2016-09-14T18:20:16Z + format: date-time + type: string + segmentCount: + example: 1 + type: integer + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + example: + - +15552223333 + items: + type: string + type: array + uniqueItems: true + from: + example: +15553332222 + type: string + text: + example: Hello world + type: string + tag: + example: custom string + type: string + media: + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + items: + format: uri + type: string + type: array + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - applicationId + - direction + - from + - id + - owner + - segmentCount + - text + - time + - to + type: object messageSendingCallback: description: Message Sending Callback properties: @@ -5944,7 +5856,7 @@ components: example: Message is sending to carrier type: string message: - $ref: '#/components/schemas/messageSendingCallback_message' + $ref: '#/components/schemas/messageSendingCallbackMessage' required: - description - message @@ -5952,75 +5864,254 @@ components: - to - type type: object - messageDeliveredCallback: - description: Message Delivered Callback + messageSendingCallbackMessage: + description: Message Sending Callback Message Schema properties: + id: + example: 1661365814859loidf7mcwd4qacn7 + type: string + owner: + example: +15553332222 + type: string + applicationId: + example: 93de2206-9669-4e07-948d-329f4b722ee2 + type: string time: example: 2016-09-14T18:20:16Z format: date-time type: string - type: - example: message-delivered - type: string + segmentCount: + example: 1 + type: integer + direction: + $ref: '#/components/schemas/messageDirectionEnum' to: - example: +15552223333 + example: + - +15552223333 + items: + type: string + type: array + uniqueItems: true + from: + example: +15553332222 type: string - description: - example: Message delivered to carrier. + text: + example: Hello world type: string - message: - $ref: '#/components/schemas/messageDeliveredCallback_message' + tag: + example: custom string + type: string + media: + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + items: + format: uri + type: string + type: array + priority: + $ref: '#/components/schemas/priorityEnum' required: - - description - - message + - applicationId + - direction + - from + - id + - media + - owner + - priority + - segmentCount + - text - time - to - - type type: object - messageFailedCallback: - description: Message Failed Callback + messageDeliveredCallback: + description: Message Delivered Callback properties: time: example: 2016-09-14T18:20:16Z format: date-time type: string type: - example: message-failed + example: message-delivered type: string to: example: +15552223333 type: string description: - example: rejected-unallocated-from-number + example: Message delivered to carrier. type: string message: - $ref: '#/components/schemas/messageFailedCallback_message' - errorCode: - example: 9902 - type: integer + $ref: '#/components/schemas/messageDeliveredCallbackMessage' required: - description - - errorCode - message - time - to - type type: object - callbackMethodEnum: - default: POST - description: The HTTP method to use to deliver the callback. GET or POST. Default - value is POST. - enum: - - GET - - POST - example: POST - nullable: true - type: string + messageDeliveredCallbackMessage: + description: Message Delivered Callback Message Schema + properties: + id: + example: 1661365814859loidf7mcwd4qacn7 + type: string + owner: + example: +15553332222 + type: string + applicationId: + example: 93de2206-9669-4e07-948d-329f4b722ee2 + type: string + time: + example: 2016-09-14T18:20:16Z + format: date-time + type: string + segmentCount: + example: 1 + type: integer + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + example: + - +15552223333 + items: + type: string + type: array + uniqueItems: true + from: + example: +15553332222 + type: string + text: + example: Hello world + type: string + tag: + example: custom string + type: string + media: + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + items: + format: uri + type: string + type: array + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - applicationId + - direction + - from + - id + - owner + - segmentCount + - tag + - text + - time + - to + type: object + messageFailedCallback: + description: Message Failed Callback + properties: + time: + example: 2016-09-14T18:20:16Z + format: date-time + type: string + type: + example: message-failed + type: string + to: + example: +15552223333 + type: string + description: + example: rejected-unallocated-from-number + type: string + message: + $ref: '#/components/schemas/messageFailedCallbackMessage' + errorCode: + example: 9902 + type: integer + required: + - description + - errorCode + - message + - time + - to + - type + type: object + messageFailedCallbackMessage: + description: Message Failed Callback Message Schema + properties: + id: + example: 1661365814859loidf7mcwd4qacn7 + type: string + owner: + example: +15553332222 + type: string + applicationId: + example: 93de2206-9669-4e07-948d-329f4b722ee2 + type: string + time: + example: 2016-09-14T18:20:16Z + format: date-time + type: string + segmentCount: + example: 1 + type: integer + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + example: + - +15552223333 + items: + type: string + type: array + uniqueItems: true + from: + example: +15553332222 + type: string + text: + example: Hello world + type: string + tag: + example: custom string + type: string + media: + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + items: + format: uri + type: string + type: array + priority: + $ref: '#/components/schemas/priorityEnum' + required: + - applicationId + - direction + - from + - id + - owner + - priority + - segmentCount + - tag + - text + - time + - to + type: object + callbackMethodEnum: + default: POST + description: The HTTP method to use to deliver the callback. GET or POST. Default + value is POST. + enum: + - GET + - POST + example: POST + nullable: true + type: string redirectMethodEnum: default: POST description: |- The HTTP method to use for the request to `redirectUrl`. GET - or POST. Default value is POST.

Not allowed if `state` is `completed` + or POST. Default value is POST.

Not allowed if `state` is `completed`. enum: - GET - POST @@ -6037,18 +6128,21 @@ components: enum: - paused - recording + example: paused type: string callDirectionEnum: description: The direction of the call. enum: - inbound - outbound + example: inbound type: string fileFormatEnum: - description: The format that the recording is stored in + description: The format that the recording is stored in. enum: - mp3 - wav + example: wav type: string callStateEnum: default: active @@ -6060,15 +6154,17 @@ components: enum: - active - completed + example: completed nullable: true type: string conferenceStateEnum: default: active description: Setting the conference state to `completed` ends the conference - and ejects all members + and ejects all members. enum: - active - completed + example: completed nullable: true type: string machineDetectionModeEnum: @@ -6081,13 +6177,14 @@ components: enum: - sync - async + example: async type: string createCall: properties: to: description: |- The destination to call (must be an E.164 formatted number - (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.com`)). + (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). example: +19195551234 type: string from: @@ -6097,6 +6194,14 @@ components: strings: `Restricted`, `Anonymous`, `Private`, or `Unavailable`). example: +19195554321 type: string + displayName: + description: "The caller display name to use when the call is created. \n\ + May not exceed 256 characters nor contain control characters such as new\ + \ lines." + example: John Doe + maxLength: 256 + nullable: true + type: string uui: description: |- A comma-separated list of 'User-To-User' headers to be sent @@ -6104,7 +6209,7 @@ components: parameter as described in RFC 7433. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. - example: "eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ=;encoding=base64" + example: "eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ;encoding=base64" nullable: true type: string applicationId: @@ -6118,8 +6223,8 @@ components: first BXML document to be executed in the call. - Must use `https` if specifying `username` and `password` - example: https://www.myCallbackServer.com/webhooks/answer + Must use `https` if specifying `username` and `password`. + example: https://www.myCallbackServer.example/webhooks/answer format: uri maxLength: 2048 type: string @@ -6142,8 +6247,8 @@ components: A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond - Must use `https` if specifying `fallbackUsername` and `fallbackPassword` - example: https://www.myFallbackServer.com/webhooks/answer + Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. + example: https://www.myFallbackServer.example/webhooks/answer format: uri maxLength: 2048 nullable: true @@ -6165,6 +6270,7 @@ components: disconnectUrl: description: The URL to send the Disconnect event to when the call ends. This event does not expect a BXML response. + example: https://www.myCallbackServer.example/webhooks/disconnect format: uri maxLength: 2048 nullable: true @@ -6178,6 +6284,7 @@ components: after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. + example: 30 format: double maximum: 300 minimum: 1 @@ -6189,6 +6296,7 @@ components: This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. + example: 15 format: double maximum: 25 minimum: 1 @@ -6205,6 +6313,7 @@ components: be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. + example: 5 maximum: 5 minimum: 1 nullable: true @@ -6218,7 +6327,8 @@ components: May be cleared by setting `tag=""` Max length 256 characters. - maximum: 256 + example: arbitrary text here + maxLength: 256 nullable: true type: string required: @@ -6230,11 +6340,11 @@ components: createCallResponse: example: callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - answerUrl: https://myServer.com/bandwidth/webhooks/answer + answerUrl: https://myServer.example/bandwidth/webhooks/answer callUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 callbackTimeout: 15 answerFallbackMethod: POST - answerFallbackUrl: https://myFallbackServer.com/bandwidth/webhooks/answer + answerFallbackUrl: https://myFallbackServer.example/bandwidth/webhooks/answer callTimeout: 30 priority: 5 disconnectMethod: POST @@ -6242,7 +6352,7 @@ components: password: mySecretPassword1! answerMethod: POST enqueuedTime: 2022-06-16T13:15:07.16Z - disconnectUrl: https://myServer.com/bandwidth/webhooks/disconnect + disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect from: +19195554321 fallbackPassword: mySecretPassword1! to: +19195551234 @@ -6256,29 +6366,29 @@ components: example: 04e88489-df02-4e34-a0ee-27a91849555f type: string accountId: - description: The bandwidth account ID associated with the call + description: The bandwidth account ID associated with the call. example: "9900000" type: string callId: - description: Programmable Voice API Call ID + description: Programmable Voice API Call ID. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: string to: - description: Recipient of the outgoing call + description: Recipient of the outgoing call. example: +19195551234 type: string from: - description: Phone number that created the outbound call + description: Phone number that created the outbound call. example: +19195554321 type: string enqueuedTime: - description: Time the call was accepted into the queue + description: The time at which the call was accepted into the queue. example: 2022-06-16T13:15:07.16Z format: date-time nullable: true type: string callUrl: - description: The URL to update call state + description: The URL to update this call's state. example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 format: uri type: string @@ -6295,7 +6405,7 @@ components: format: double type: number tag: - description: Custom tag value + description: Custom tag value. example: My custom tag value nullable: true type: string @@ -6303,14 +6413,14 @@ components: $ref: '#/components/schemas/callbackMethodEnum' answerUrl: description: URL to deliver the `answer` event webhook. - example: https://myServer.com/bandwidth/webhooks/answer + example: https://myServer.example/bandwidth/webhooks/answer format: uri type: string answerFallbackMethod: $ref: '#/components/schemas/callbackMethodEnum' answerFallbackUrl: description: Fallback URL to deliver the `answer` event webhook. - example: https://myFallbackServer.com/bandwidth/webhooks/answer + example: https://myFallbackServer.example/bandwidth/webhooks/answer format: uri nullable: true type: string @@ -6318,7 +6428,7 @@ components: $ref: '#/components/schemas/callbackMethodEnum' disconnectUrl: description: URL to deliver the `disconnect` event webhook. - example: https://myServer.com/bandwidth/webhooks/disconnect + example: https://myServer.example/bandwidth/webhooks/disconnect format: uri nullable: true type: string @@ -6349,9 +6459,8 @@ components: priority: description: The priority of this call over other calls from your account. example: 5 - format: integer nullable: true - type: number + type: integer required: - accountId - answerMethod @@ -6385,7 +6494,7 @@ components: endTime: 2022-06-16T13:15:18.314Z errorId: errorId applicationId: 04e88489-df02-4e34-a0ee-27a91849555f - direction: null + direction: inbound properties: applicationId: description: The application id associated with the call. @@ -6407,7 +6516,7 @@ components: type: string 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" + \ +15555555555), or if the call was to a SIP URI, the SIP URI." example: +19195551234 type: string from: @@ -6440,7 +6549,7 @@ components: Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. - More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken) + More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). example: verstat: TN-Verification-Passed attestationIndicator: A @@ -6532,7 +6641,7 @@ components: Required if `state` is `active`. Not allowed if `state` is `completed`. - example: https://myServer.com/bandwidth/webhooks/redirect + example: https://myServer.example/bandwidth/webhooks/redirect format: uri nullable: true type: string @@ -6553,8 +6662,8 @@ components: redirectFallbackUrl: description: |- A fallback url which, if provided, will be used to retry the - redirect callback delivery in case `redirectUrl` fails to respond - example: https://myFallbackServer.com/bandwidth/webhooks/redirect + redirect callback delivery in case `redirectUrl` fails to respond. + example: https://myFallbackServer.example/bandwidth/webhooks/redirect format: uri nullable: true type: string @@ -6584,7 +6693,7 @@ components: Not allowed if `state` is `completed`. example: My Custom Tag - maximum: 256 + maxLength: 256 nullable: true type: string type: object @@ -6631,8 +6740,8 @@ components: endTime: 2022-06-17T22:20:00Z applicationId: 04e88489-df02-4e34-a0ee-27a91849555f recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 - fileFormat: null - direction: null + fileFormat: wav + direction: inbound status: completed properties: applicationId: @@ -6740,7 +6849,7 @@ components: memberUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/members/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 mute: false hold: false - conferenceEventUrl: https://myServer.com/bandwidth/webhooks/conferenceEvent + conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent completedTime: 2022-06-17T22:20:00Z name: my-conference-name createdTime: 2022-06-17T22:19:40.375Z @@ -6748,11 +6857,11 @@ components: tag: my custom tag properties: id: - description: The Bandwidth-generated conference ID + description: The Bandwidth-generated conference ID. example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 type: string name: - description: "The name of the conference, as specified by your application" + description: "The name of the conference, as specified by your application." example: my-conference-name type: string createdTime: @@ -6768,7 +6877,7 @@ components: type: string conferenceEventUrl: description: The URL to send the conference-related events. - example: https://myServer.com/bandwidth/webhooks/conferenceEvent + example: https://myServer.example/bandwidth/webhooks/conferenceEvent format: uri nullable: true type: string @@ -6783,7 +6892,7 @@ components: activeMembers: description: |- A list of active members of the conference. Omitted if this - is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences) + is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). items: $ref: '#/components/schemas/conferenceMember' nullable: true @@ -6797,8 +6906,8 @@ components: description: |- The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, - but required if `state` is `active` - example: https://myServer.com/bandwidth/webhooks/conferenceRedirect + but required if `state` is `active`. + example: https://myServer.example/bandwidth/webhooks/conferenceRedirect format: uri nullable: true type: string @@ -6821,7 +6930,7 @@ components: A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`. - example: https://myFallbackServer.com/bandwidth/webhooks/conferenceRedirect + example: https://myFallbackServer.example/bandwidth/webhooks/conferenceRedirect format: uri nullable: true type: string @@ -6936,7 +7045,7 @@ components: startTime: 2022-06-17T22:19:40.375Z endTime: 2022-06-17T22:20:00Z recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 - fileFormat: null + fileFormat: wav status: completed properties: accountId: @@ -7061,7 +7170,7 @@ components: callbackUrl: description: The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode. - example: https://myServer.com/bandwidth/webhooks/machineDetectionComplete + example: https://myServer.example/bandwidth/webhooks/machineDetectionComplete format: uri maxLength: 2048 nullable: true @@ -7085,7 +7194,7 @@ components: A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond - example: https://myFallbackServer.com/bandwidth/webhooks/machineDetectionComplete + example: https://myFallbackServer.example/bandwidth/webhooks/machineDetectionComplete format: uri maxLength: 2048 nullable: true @@ -7113,7 +7222,7 @@ components: event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization. - example: https://myServer.com/bandwidth/webhooks/transcriptionAvailable + example: https://myServer.example/bandwidth/webhooks/transcriptionAvailable format: uri type: string callbackMethod: @@ -7148,6 +7257,15 @@ components: minimum: 1 nullable: true type: number + detectLanguage: + default: false + description: "A boolean value to indicate that the recording may not be\ + \ in English, and the transcription service will need to detect the dominant\ + \ language the recording is in and transcribe accordingly. Current supported\ + \ languages are English, French, and Spanish." + example: true + nullable: true + type: boolean type: object transcriptionList: example: @@ -7221,6 +7339,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -7276,21 +7396,7 @@ components: nullable: true type: string machineDetectionResult: - description: "(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" - nullable: true - properties: - value: - description: "Possible values are answering-machine, human, silence,\ - \ timeout, or error." - example: answering-machine - type: string - duration: - description: The amount of time it took to determine the result. - example: PT4.9891287S - type: string - type: string + $ref: '#/components/schemas/machineDetectionResult' type: object bridgeCompleteCallback: description: "If the target call leaves the , then this callback is\ @@ -7312,6 +7418,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -7404,6 +7512,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -7481,6 +7591,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7521,6 +7633,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7560,6 +7674,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7614,6 +7730,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7663,6 +7781,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7698,6 +7818,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string conferenceId: description: "The unique, Bandwidth-generated ID of the conference that\ @@ -7777,6 +7899,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -7872,6 +7996,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -7965,6 +8091,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8067,6 +8195,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8126,6 +8256,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8181,21 +8313,7 @@ components: nullable: true type: string machineDetectionResult: - description: "(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" - nullable: true - properties: - value: - description: "Possible values are answering-machine, human, silence,\ - \ timeout, or error." - example: answering-machine - type: string - duration: - description: The amount of time it took to determine the result. - example: PT4.9891287S - type: string - type: string + $ref: '#/components/schemas/machineDetectionResult' type: object recordingCompleteCallback: description: "The Record Complete event is sent after a verb has executed\ @@ -8216,6 +8334,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8333,6 +8453,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8456,6 +8578,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8545,6 +8669,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8657,6 +8783,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8743,6 +8871,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8848,6 +8978,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly\ \ the time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -8956,6 +9088,8 @@ components: description: "The approximate UTC date and time when the event was generated\ \ by the Bandwidth server, in ISO 8601 format. This may not be exactly the\ \ time of event execution." + example: 2022-06-17T22:19:40.375Z + format: date-time type: string accountId: description: The user account associated with the call. @@ -9117,7 +9251,7 @@ components: description: The amount of time it took to determine the result. example: PT4.9891287S type: string - type: string + type: object diversion: properties: reason: @@ -9463,239 +9597,6 @@ components: example: example error message type: string type: object - inboundMessageCallback_message: - properties: - id: - example: 1661365814859loidf7mcwd4qacn7 - type: string - owner: - example: +15553332222 - type: string - applicationId: - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - time: - example: 2016-09-14T18:20:16Z - format: date-time - type: string - segmentCount: - example: 1 - type: integer - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - example: - - +15552223333 - items: - type: string - type: array - uniqueItems: true - from: - example: +15553332222 - type: string - text: - example: Hello world - type: string - tag: - example: custom string - type: string - media: - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - items: - format: uri - type: string - type: array - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - applicationId - - direction - - from - - id - - owner - - segmentCount - - text - - time - - to - type: object - messageSendingCallback_message: - properties: - id: - example: 1661365814859loidf7mcwd4qacn7 - type: string - owner: - example: +15553332222 - type: string - applicationId: - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - time: - example: 2016-09-14T18:20:16Z - format: date-time - type: string - segmentCount: - example: 1 - type: integer - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - example: - - +15552223333 - items: - type: string - type: array - uniqueItems: true - from: - example: +15553332222 - type: string - text: - example: "" - type: string - tag: - example: custom string - type: string - media: - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - items: - format: uri - type: string - type: array - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - applicationId - - direction - - from - - id - - media - - owner - - priority - - segmentCount - - text - - time - - to - type: object - messageDeliveredCallback_message: - properties: - id: - example: 1661365814859loidf7mcwd4qacn7 - type: string - owner: - example: +15553332222 - type: string - applicationId: - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - time: - example: 2016-09-14T18:20:16Z - format: date-time - type: string - segmentCount: - example: 1 - type: integer - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - example: - - +15552223333 - items: - type: string - type: array - uniqueItems: true - from: - example: +15553332222 - type: string - text: - example: "" - type: string - tag: - example: custom string - type: string - media: - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - items: - format: uri - type: string - type: array - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - applicationId - - direction - - from - - id - - owner - - segmentCount - - tag - - text - - time - - to - type: object - messageFailedCallback_message: - properties: - id: - example: 1661365814859loidf7mcwd4qacn7 - type: string - owner: - example: +15553332222 - type: string - applicationId: - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - time: - example: 2016-09-14T18:20:16Z - format: date-time - type: string - segmentCount: - example: 1 - type: integer - direction: - $ref: '#/components/schemas/messageDirectionEnum' - to: - example: - - +15552223333 - items: - type: string - type: array - uniqueItems: true - from: - example: +15553332222 - type: string - text: - example: "" - type: string - tag: - example: custom string - type: string - media: - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png - items: - format: uri - type: string - type: array - priority: - $ref: '#/components/schemas/priorityEnum' - required: - - applicationId - - direction - - from - - id - - owner - - priority - - segmentCount - - tag - - text - - time - - to - type: object securitySchemes: Basic: description: |- diff --git a/build.gradle b/build.gradle index 2cafa1fc..f00a66d6 100644 --- a/build.gradle +++ b/build.gradle @@ -114,7 +114,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.8.5' 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.4' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' diff --git a/build.sbt b/build.sbt index df5d8306..b836076c 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.12.0", "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.4", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", diff --git a/docs/AnswerCallback.md b/docs/AnswerCallback.md index 31176ae7..41155d7a 100644 --- a/docs/AnswerCallback.md +++ b/docs/AnswerCallback.md @@ -9,7 +9,7 @@ The Answer event is sent to the answerUrl specified in the createCall request wh | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | @@ -21,7 +21,7 @@ The Answer event is sent to the answerUrl specified in the createCall request wh |**startTime** | **OffsetDateTime** | Time the call was started, in ISO 8601 format. | [optional] | |**answerTime** | **OffsetDateTime** | Time the call was answered, in ISO 8601 format. | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | -|**machineDetectionResult** | **String** | (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 | [optional] | +|**machineDetectionResult** | [**MachineDetectionResult**](MachineDetectionResult.md) | | [optional] | diff --git a/docs/BridgeCompleteCallback.md b/docs/BridgeCompleteCallback.md index 0d259d2b..d0267f32 100644 --- a/docs/BridgeCompleteCallback.md +++ b/docs/BridgeCompleteCallback.md @@ -9,7 +9,7 @@ If the target call leaves the , then this callback is sent to the bridge | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/BridgeTargetCompleteCallback.md b/docs/BridgeTargetCompleteCallback.md index 64886538..ffd524af 100644 --- a/docs/BridgeTargetCompleteCallback.md +++ b/docs/BridgeTargetCompleteCallback.md @@ -9,7 +9,7 @@ If the originating call leaves the , then this callback is sent to the b | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/CallState.md b/docs/CallState.md index 048f07c4..eadac2d0 100644 --- a/docs/CallState.md +++ b/docs/CallState.md @@ -11,11 +11,11 @@ |**accountId** | **String** | The account id associated with the call. | [optional] | |**callId** | **String** | The programmable voice API call ID. | [optional] | |**parentCallId** | **String** | The A-leg call id, set only if this call is the B-leg of a [`<Transfer>`](/docs/voice/bxml/transfer). | [optional] | -|**to** | **String** | 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 | [optional] | +|**to** | **String** | 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. | [optional] | |**from** | **String** | The phone number that made the call, in E.164 format (e.g. +15555555555). | [optional] | |**direction** | **CallDirectionEnum** | | [optional] | |**state** | **String** | The current state of the call. Current possible values are `queued`, `initiated`, `answered` and `disconnected`. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] | -|**stirShaken** | **Map<String, String>** | For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Verification-Passed` or `TN-Verification-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken) | [optional] | +|**stirShaken** | **Map<String, String>** | For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Verification-Passed` or `TN-Verification-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). | [optional] | |**identity** | **String** | The value of the `Identity` header from the inbound invite request. Only present for inbound calls and if the account is configured to forward this header. | [optional] | |**enqueuedTime** | **OffsetDateTime** | The time this call was placed in queue. | [optional] | |**startTime** | **OffsetDateTime** | The time the call was initiated, in ISO 8601 format. `null` if the call is still in your queue. | [optional] | diff --git a/docs/CallsApi.md b/docs/CallsApi.md index d6451731..4b75c1c3 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://localhost* | [**updateCallBxml**](CallsApi.md#updateCallBxml) | **PUT** /accounts/{accountId}/calls/{callId}/bxml | Update Call BXML | - + # **createCall** > CreateCallResponse createCall(accountId, createCall) @@ -39,7 +39,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); CallsApi apiInstance = new CallsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call try { CreateCallResponse result = apiInstance.createCall(accountId, createCall); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **createCall** | [**CreateCall**](CreateCall.md)| JSON object containing information to create an outbound call | | ### Return type @@ -85,10 +85,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getCallState** > CallState getCallState(accountId, callId) @@ -117,8 +117,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); CallsApi apiInstance = new CallsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. try { CallState result = apiInstance.getCallState(accountId, callId); System.out.println(result); @@ -137,8 +137,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | ### Return type @@ -163,10 +163,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateCall** > updateCall(accountId, callId, updateCall) @@ -195,8 +195,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); CallsApi apiInstance = new CallsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. UpdateCall updateCall = new UpdateCall(); // UpdateCall | JSON object containing information to redirect an existing call to a new BXML document try { apiInstance.updateCall(accountId, callId, updateCall); @@ -215,8 +215,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | | **updateCall** | [**UpdateCall**](UpdateCall.md)| JSON object containing information to redirect an existing call to a new BXML document | | ### Return type @@ -235,7 +235,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Call Successfully Modified | - | +| **200** | Call was successfully modified. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | @@ -243,10 +243,10 @@ null (empty response body) | **405** | Method Not Allowed | - | | **409** | Conflict | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateCallBxml** > updateCallBxml(accountId, callId, body) @@ -275,8 +275,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); CallsApi apiInstance = new CallsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. String body = This is a test sentence. @@ -298,8 +298,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | | **body** | **String**| | | ### Return type @@ -318,7 +318,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Call BXML Successfully Replaced | - | +| **204** | Call BXML was successfully replaced. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | @@ -326,6 +326,6 @@ null (empty response body) | **405** | Method Not Allowed | - | | **409** | Conflict | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | diff --git a/docs/Conference.md b/docs/Conference.md index 4c8eece2..50adda68 100644 --- a/docs/Conference.md +++ b/docs/Conference.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | The Bandwidth-generated conference ID | [optional] | -|**name** | **String** | The name of the conference, as specified by your application | [optional] | +|**id** | **String** | The Bandwidth-generated conference ID. | [optional] | +|**name** | **String** | The name of the conference, as specified by your application. | [optional] | |**createdTime** | **OffsetDateTime** | The time the conference was initiated, in ISO 8601 format. | [optional] | |**completedTime** | **OffsetDateTime** | The time the conference was terminated, in ISO 8601 format. | [optional] | |**conferenceEventUrl** | **URI** | The URL to send the conference-related events. | [optional] | |**conferenceEventMethod** | **CallbackMethodEnum** | | [optional] | |**tag** | **String** | The custom string attached to the conference that will be sent with callbacks. | [optional] | -|**activeMembers** | [**List<ConferenceMember>**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences) | [optional] | +|**activeMembers** | [**List<ConferenceMember>**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). | [optional] | diff --git a/docs/ConferenceCompletedCallback.md b/docs/ConferenceCompletedCallback.md index fc106a88..6840355c 100644 --- a/docs/ConferenceCompletedCallback.md +++ b/docs/ConferenceCompletedCallback.md @@ -9,7 +9,7 @@ The Conference Completed event is fired when the last member leaves the conferen | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | diff --git a/docs/ConferenceCreatedCallback.md b/docs/ConferenceCreatedCallback.md index b1f03639..8f1196a0 100644 --- a/docs/ConferenceCreatedCallback.md +++ b/docs/ConferenceCreatedCallback.md @@ -9,7 +9,7 @@ The Conference Created event is fired whenever a new conference that specified a | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | diff --git a/docs/ConferenceMemberExitCallback.md b/docs/ConferenceMemberExitCallback.md index 169844bb..1ae4cf2a 100644 --- a/docs/ConferenceMemberExitCallback.md +++ b/docs/ConferenceMemberExitCallback.md @@ -9,7 +9,7 @@ The Conference Member Exit event is fired whenever a caller exits a conference t | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/ConferenceMemberJoinCallback.md b/docs/ConferenceMemberJoinCallback.md index 10eb2d77..73c91088 100644 --- a/docs/ConferenceMemberJoinCallback.md +++ b/docs/ConferenceMemberJoinCallback.md @@ -9,7 +9,7 @@ The Conference Member Join event is fired whenever a caller joins a conference t | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/ConferenceRecordingAvailableCallback.md b/docs/ConferenceRecordingAvailableCallback.md index 189e012e..41a8f825 100644 --- a/docs/ConferenceRecordingAvailableCallback.md +++ b/docs/ConferenceRecordingAvailableCallback.md @@ -9,7 +9,7 @@ The Conference Recording Available event is sent after a conference recording ha | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | diff --git a/docs/ConferenceRedirectCallback.md b/docs/ConferenceRedirectCallback.md index 4baeb9dc..5dde9a89 100644 --- a/docs/ConferenceRedirectCallback.md +++ b/docs/ConferenceRedirectCallback.md @@ -9,7 +9,7 @@ The Conference Redirect event is fired whenever an existing conference is modifi | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**conferenceId** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] | |**name** | **String** | The user-specified name of the conference that was recorded | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md index 638bfe14..cc07b631 100644 --- a/docs/ConferencesApi.md +++ b/docs/ConferencesApi.md @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost* | [**updateConferenceMember**](ConferencesApi.md#updateConferenceMember) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member | - + # **downloadConferenceRecording** > File downloadConferenceRecording(accountId, conferenceId, recordingId) @@ -44,9 +44,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { File result = apiInstance.downloadConferenceRecording(accountId, conferenceId, recordingId); System.out.println(result); @@ -65,9 +65,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -92,10 +92,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getConference** > Conference getConference(accountId, conferenceId) @@ -124,8 +124,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. try { Conference result = apiInstance.getConference(accountId, conferenceId); System.out.println(result); @@ -144,8 +144,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | ### Return type @@ -170,10 +170,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getConferenceMember** > ConferenceMember getConferenceMember(accountId, conferenceId, memberId) @@ -202,9 +202,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID - String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID. try { ConferenceMember result = apiInstance.getConferenceMember(accountId, conferenceId, memberId); System.out.println(result); @@ -223,9 +223,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | -| **memberId** | **String**| Programmable Voice API Conference Member ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | +| **memberId** | **String**| Programmable Voice API Conference Member ID. | | ### Return type @@ -250,10 +250,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getConferenceRecording** > ConferenceRecordingMetadata getConferenceRecording(accountId, conferenceId, recordingId) @@ -282,9 +282,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { ConferenceRecordingMetadata result = apiInstance.getConferenceRecording(accountId, conferenceId, recordingId); System.out.println(result); @@ -303,9 +303,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -330,10 +330,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **listConferenceRecordings** > List<ConferenceRecordingMetadata> listConferenceRecordings(accountId, conferenceId) @@ -362,8 +362,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. try { List result = apiInstance.listConferenceRecordings(accountId, conferenceId); System.out.println(result); @@ -382,8 +382,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | ### Return type @@ -408,10 +408,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **listConferences** > List<Conference> listConferences(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken) @@ -440,7 +440,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. String name = "my-custom-name"; // String | Filter results by the `name` field. String minCreatedTime = "2022-06-21T19:13:21Z"; // String | Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). String maxCreatedTime = "2022-06-21T19:13:21Z"; // String | Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). @@ -464,7 +464,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **name** | **String**| Filter results by the `name` field. | [optional] | | **minCreatedTime** | **String**| Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). | [optional] | | **maxCreatedTime** | **String**| Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). | [optional] | @@ -494,10 +494,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateConference** > updateConference(accountId, conferenceId, updateConference) @@ -526,8 +526,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. UpdateConference updateConference = new UpdateConference(); // UpdateConference | try { apiInstance.updateConference(accountId, conferenceId, updateConference); @@ -546,8 +546,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | | **updateConference** | [**UpdateConference**](UpdateConference.md)| | | ### Return type @@ -566,17 +566,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Conference successfully modified | - | +| **204** | Conference was successfully modified. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateConferenceBxml** > updateConferenceBxml(accountId, conferenceId, body) @@ -605,8 +605,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. String body = @@ -628,8 +628,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | | **body** | **String**| | | ### Return type @@ -648,17 +648,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Conference successfully modified | - | +| **204** | Conference successfully modified. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateConferenceMember** > updateConferenceMember(accountId, conferenceId, memberId, updateConferenceMember) @@ -687,9 +687,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); ConferencesApi apiInstance = new ConferencesApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID - String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID. UpdateConferenceMember updateConferenceMember = new UpdateConferenceMember(); // UpdateConferenceMember | try { apiInstance.updateConferenceMember(accountId, conferenceId, memberId, updateConferenceMember); @@ -708,9 +708,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **conferenceId** | **String**| Programmable Voice API Conference ID | | -| **memberId** | **String**| Programmable Voice API Conference Member ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **conferenceId** | **String**| Programmable Voice API Conference ID. | | +| **memberId** | **String**| Programmable Voice API Conference Member ID. | | | **updateConferenceMember** | [**UpdateConferenceMember**](UpdateConferenceMember.md)| | | ### Return type @@ -729,13 +729,13 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Conference member successfully modified | - | +| **204** | Conference member was successfully modified. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | diff --git a/docs/CreateCall.md b/docs/CreateCall.md index 20b994e7..a838dc3b 100644 --- a/docs/CreateCall.md +++ b/docs/CreateCall.md @@ -7,15 +7,16 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**to** | **String** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.com`)). | | +|**to** | **String** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). | | |**from** | **String** | 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`). | | +|**displayName** | **String** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. | [optional] | |**uui** | **String** | A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] | |**applicationId** | **String** | The id of the application associated with the `from` number. | | -|**answerUrl** | **URI** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password` | | +|**answerUrl** | **URI** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | | |**answerMethod** | **CallbackMethodEnum** | | [optional] | |**username** | **String** | Basic auth username. | [optional] | |**password** | **String** | Basic auth password. | [optional] | -|**answerFallbackUrl** | **URI** | A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword` | [optional] | +|**answerFallbackUrl** | **URI** | A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. | [optional] | |**answerFallbackMethod** | **CallbackMethodEnum** | | [optional] | |**fallbackUsername** | **String** | Basic auth username. | [optional] | |**fallbackPassword** | **String** | Basic auth password. | [optional] | diff --git a/docs/CreateCallResponse.md b/docs/CreateCallResponse.md index 3b9f50d9..0a317eee 100644 --- a/docs/CreateCallResponse.md +++ b/docs/CreateCallResponse.md @@ -8,15 +8,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**applicationId** | **String** | The id of the application associated with the `from` number. | | -|**accountId** | **String** | The bandwidth account ID associated with the call | | -|**callId** | **String** | Programmable Voice API Call ID | | -|**to** | **String** | Recipient of the outgoing call | | -|**from** | **String** | Phone number that created the outbound call | | -|**enqueuedTime** | **OffsetDateTime** | Time the call was accepted into the queue | [optional] | -|**callUrl** | **URI** | The URL to update call state | | +|**accountId** | **String** | The bandwidth account ID associated with the call. | | +|**callId** | **String** | Programmable Voice API Call ID. | | +|**to** | **String** | Recipient of the outgoing call. | | +|**from** | **String** | Phone number that created the outbound call. | | +|**enqueuedTime** | **OffsetDateTime** | The time at which the call was accepted into the queue. | [optional] | +|**callUrl** | **URI** | The URL to update this call's state. | | |**callTimeout** | **Double** | The timeout (in seconds) for the callee to answer the call after it starts ringing. | [optional] | |**callbackTimeout** | **Double** | This is the timeout (in seconds) to use when delivering webhooks for the call. | [optional] | -|**tag** | **String** | Custom tag value | [optional] | +|**tag** | **String** | Custom tag value. | [optional] | |**answerMethod** | **CallbackMethodEnum** | | | |**answerUrl** | **URI** | URL to deliver the `answer` event webhook. | | |**answerFallbackMethod** | **CallbackMethodEnum** | | [optional] | @@ -27,7 +27,7 @@ |**password** | **String** | Basic auth password. | [optional] | |**fallbackUsername** | **String** | Basic auth username. | [optional] | |**fallbackPassword** | **String** | Basic auth password. | [optional] | -|**priority** | **BigDecimal** | The priority of this call over other calls from your account. | [optional] | +|**priority** | **Integer** | The priority of this call over other calls from your account. | [optional] | diff --git a/docs/DisconnectCallback.md b/docs/DisconnectCallback.md index bd7b0948..60c6b869 100644 --- a/docs/DisconnectCallback.md +++ b/docs/DisconnectCallback.md @@ -9,7 +9,7 @@ The Disconnect event is fired when a call ends, for any reason. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/DtmfCallback.md b/docs/DtmfCallback.md index bdfeac81..3fe2b647 100644 --- a/docs/DtmfCallback.md +++ b/docs/DtmfCallback.md @@ -9,7 +9,7 @@ The DTMF event is sent for every digit detected after a verb is ex | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/GatherCallback.md b/docs/GatherCallback.md index 1ce680d8..b8514738 100644 --- a/docs/GatherCallback.md +++ b/docs/GatherCallback.md @@ -9,7 +9,7 @@ The gather event is sent after a verb is executed. Its purpose is to re | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/InboundMessageCallbackMessage.md b/docs/InboundMessageCallbackMessage.md index 02c293c5..2f45fd05 100644 --- a/docs/InboundMessageCallbackMessage.md +++ b/docs/InboundMessageCallbackMessage.md @@ -2,6 +2,7 @@ # InboundMessageCallbackMessage +Inbound Message Callback Message Schema ## Properties diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 59bf2e9f..fa56508d 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -9,7 +9,7 @@ The Initiate event is fired when an inbound call is received for a Telephone Num | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/ListMessageItem.md b/docs/ListMessageItem.md index 86c29872..0829baf8 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -16,13 +16,14 @@ |**messageType** | **MessageTypeEnum** | | [optional] | |**segmentCount** | **Integer** | The number of segments the message was sent as. | [optional] | |**errorCode** | **Integer** | The numeric error code of the message. | [optional] | -|**receiveTime** | **String** | The ISO 8601 datetime of the message. | [optional] | +|**receiveTime** | **OffsetDateTime** | The ISO 8601 datetime of the message. | [optional] | |**carrierName** | **String** | The name of the carrier. Not currently supported for MMS coming soon. | [optional] | |**messageSize** | **Integer** | The size of the message including message content and headers. | [optional] | |**messageLength** | **Integer** | The length of the message content. | [optional] | |**attachmentCount** | **Integer** | The number of attachments the message has. | [optional] | |**recipientCount** | **Integer** | The number of recipients the message has. | [optional] | |**campaignClass** | **String** | The campaign class of the message if it has one. | [optional] | +|**campaignId** | **String** | The campaign ID of the message if it has one. | [optional] | diff --git a/docs/MachineDetectionCompleteCallback.md b/docs/MachineDetectionCompleteCallback.md index c8d9ba63..64c54e62 100644 --- a/docs/MachineDetectionCompleteCallback.md +++ b/docs/MachineDetectionCompleteCallback.md @@ -9,7 +9,7 @@ This event is sent to the url informed when requesting a machine detection opera | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | @@ -21,7 +21,7 @@ This event is sent to the url informed when requesting a machine detection opera |**startTime** | **OffsetDateTime** | Time the call was started, in ISO 8601 format. | [optional] | |**answerTime** | **OffsetDateTime** | Time the call was answered, in ISO 8601 format. | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | -|**machineDetectionResult** | **String** | (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 | [optional] | +|**machineDetectionResult** | [**MachineDetectionResult**](MachineDetectionResult.md) | | [optional] | diff --git a/docs/MachineDetectionResult.md b/docs/MachineDetectionResult.md new file mode 100644 index 00000000..2073a8e7 --- /dev/null +++ b/docs/MachineDetectionResult.md @@ -0,0 +1,15 @@ + + +# MachineDetectionResult + +(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 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | Possible values are answering-machine, human, silence, timeout, or error. | [optional] | +|**duration** | **String** | The amount of time it took to determine the result. | [optional] | + + + diff --git a/docs/MediaApi.md b/docs/MediaApi.md index cf0b29c0..06e8d974 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://localhost* | [**uploadMedia**](MediaApi.md#uploadMedia) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media | - + # **deleteMedia** > deleteMedia(accountId, mediaId) @@ -82,11 +82,12 @@ null (empty response body) | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | - + # **getMedia** > File getMedia(accountId, mediaId) @@ -159,11 +160,12 @@ public class Example { | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | - + # **listMedia** > List<Media> listMedia(accountId, continuationToken) @@ -236,11 +238,12 @@ public class Example { | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | - + # **uploadMedia** > uploadMedia(accountId, mediaId, body, contentType, cacheControl) @@ -318,6 +321,7 @@ null (empty response body) | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | diff --git a/docs/Message.md b/docs/Message.md index c2d2cf89..ef12c3ba 100644 --- a/docs/Message.md +++ b/docs/Message.md @@ -10,7 +10,7 @@ |**id** | **String** | The id of the message. | [optional] | |**owner** | **String** | The Bandwidth phone number associated with the message. | [optional] | |**applicationId** | **String** | The application ID associated with the message. | [optional] | -|**time** | **String** | The datetime stamp of the message in ISO 8601 | [optional] | +|**time** | **OffsetDateTime** | The datetime stamp of the message in ISO 8601 | [optional] | |**segmentCount** | **Integer** | The number of segments the original message from the user is broken into before sending over to carrier networks. | [optional] | |**direction** | **MessageDirectionEnum** | | [optional] | |**to** | **Set<String>** | The phone number recipients of the message. | [optional] | @@ -19,6 +19,7 @@ |**text** | **String** | The contents of the message. | [optional] | |**tag** | **String** | The custom string set by the user. | [optional] | |**priority** | **PriorityEnum** | | [optional] | +|**expiration** | **OffsetDateTime** | The expiration date-time set by the user. | [optional] | diff --git a/docs/MessageDeliveredCallbackMessage.md b/docs/MessageDeliveredCallbackMessage.md index 5d31e042..4a774285 100644 --- a/docs/MessageDeliveredCallbackMessage.md +++ b/docs/MessageDeliveredCallbackMessage.md @@ -2,6 +2,7 @@ # MessageDeliveredCallbackMessage +Message Delivered Callback Message Schema ## Properties diff --git a/docs/MessageFailedCallbackMessage.md b/docs/MessageFailedCallbackMessage.md index 77f357d1..3ddfbc1b 100644 --- a/docs/MessageFailedCallbackMessage.md +++ b/docs/MessageFailedCallbackMessage.md @@ -2,6 +2,7 @@ # MessageFailedCallbackMessage +Message Failed Callback Message Schema ## Properties diff --git a/docs/MessageRequest.md b/docs/MessageRequest.md index 92defbd0..b2af422b 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -14,7 +14,7 @@ |**media** | **List<URI>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] | |**tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] | |**priority** | **PriorityEnum** | | [optional] | -|**expiration** | **String** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | [optional] | +|**expiration** | **OffsetDateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. Not supported on MMS. | [optional] | diff --git a/docs/MessageSendingCallbackMessage.md b/docs/MessageSendingCallbackMessage.md index 28c0c160..7611cfb0 100644 --- a/docs/MessageSendingCallbackMessage.md +++ b/docs/MessageSendingCallbackMessage.md @@ -2,6 +2,7 @@ # MessageSendingCallbackMessage +Message Sending Callback Message Schema ## Properties diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 9dbef07f..6990673b 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -8,7 +8,7 @@ All URIs are relative to *http://localhost* | [**listMessages**](MessagesApi.md#listMessages) | **GET** /users/{accountId}/messages | List Messages | - + # **createMessage** > Message createMessage(accountId, messageRequest) @@ -81,13 +81,14 @@ public class Example { | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | - + # **listMessages** -> MessagesList listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit) +> MessagesList listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount) List Messages @@ -125,11 +126,13 @@ public class Example { Integer errorCode = 9902; // Integer | The error code of the message. String fromDateTime = "2022-09-14T18:20:16.000Z"; // String | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. String toDateTime = "2022-09-14T18:20:16.000Z"; // String | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. + String campaignId = "CJEUMDK"; // String | The campaign ID of the message. String sort = "sourceTn:desc"; // String | The field and direction to sort by combined with a colon. Direction is either asc or desc. String pageToken = "gdEewhcJLQRB5"; // String | A base64 encoded value used for pagination of results. Integer limit = 50; // Integer | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. + Boolean limitTotalCount = true; // Boolean | When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. try { - MessagesList result = apiInstance.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit); + MessagesList result = apiInstance.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MessagesApi#listMessages"); @@ -157,9 +160,11 @@ public class Example { | **errorCode** | **Integer**| The error code of the message. | [optional] | | **fromDateTime** | **String**| The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **toDateTime** | **String**| The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | +| **campaignId** | **String**| The campaign ID of the message. | [optional] | | **sort** | **String**| The field and direction to sort by combined with a colon. Direction is either asc or desc. | [optional] | | **pageToken** | **String**| A base64 encoded value used for pagination of results. | [optional] | | **limit** | **Integer**| The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | [optional] | +| **limitTotalCount** | **Boolean**| When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. | [optional] | ### Return type diff --git a/docs/MessagesList.md b/docs/MessagesList.md index f0a0fe62..f352ff4a 100644 --- a/docs/MessagesList.md +++ b/docs/MessagesList.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalCount** | **Integer** | Total number of messages matched by the search. | [optional] | +|**totalCount** | **Integer** | The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. | [optional] | |**pageInfo** | [**PageInfo**](PageInfo.md) | | [optional] | |**messages** | [**List<ListMessageItem>**](ListMessageItem.md) | | [optional] | diff --git a/docs/MfaApi.md b/docs/MfaApi.md index b5b8ba77..a02d8e22 100644 --- a/docs/MfaApi.md +++ b/docs/MfaApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://localhost* | [**verifyCode**](MfaApi.md#verifyCode) | **POST** /accounts/{accountId}/code/verify | Verify Authentication Code | - + # **generateMessagingCode** > MessagingCodeResponse generateMessagingCode(accountId, codeRequest) @@ -38,7 +38,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); MfaApi apiInstance = new MfaApi(defaultClient); - String accountId = "accountId_example"; // String | Bandwidth Account ID with Voice service enabled. + String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. try { MessagingCodeResponse result = apiInstance.generateMessagingCode(accountId, codeRequest); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Bandwidth Account ID with Voice service enabled. | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **codeRequest** | [**CodeRequest**](CodeRequest.md)| MFA code request body. | | ### Return type @@ -83,7 +83,7 @@ public class Example { | **403** | Forbidden | - | | **500** | Internal Server Error | - | - + # **generateVoiceCode** > VoiceCodeResponse generateVoiceCode(accountId, codeRequest) @@ -112,7 +112,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); MfaApi apiInstance = new MfaApi(defaultClient); - String accountId = "accountId_example"; // String | Bandwidth Account ID with Voice service enabled. + String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. try { VoiceCodeResponse result = apiInstance.generateVoiceCode(accountId, codeRequest); @@ -132,7 +132,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Bandwidth Account ID with Voice service enabled. | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **codeRequest** | [**CodeRequest**](CodeRequest.md)| MFA code request body. | | ### Return type @@ -157,7 +157,7 @@ public class Example { | **403** | Forbidden | - | | **500** | Internal Server Error | - | - + # **verifyCode** > VerifyCodeResponse verifyCode(accountId, verifyCodeRequest) @@ -186,7 +186,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); MfaApi apiInstance = new MfaApi(defaultClient); - String accountId = "accountId_example"; // String | Bandwidth Account ID with Voice service enabled. + String accountId = "9900000"; // String | Your Bandwidth Account ID. VerifyCodeRequest verifyCodeRequest = new VerifyCodeRequest(); // VerifyCodeRequest | MFA code verify request body. try { VerifyCodeResponse result = apiInstance.verifyCode(accountId, verifyCodeRequest); @@ -206,7 +206,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Bandwidth Account ID with Voice service enabled. | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **verifyCodeRequest** | [**VerifyCodeRequest**](VerifyCodeRequest.md)| MFA code verify request body. | | ### Return type diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index cf3addbe..55fed2c9 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -8,7 +8,7 @@ All URIs are relative to *http://localhost* | [**getLookupStatus**](PhoneNumberLookupApi.md#getLookupStatus) | **GET** /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status | - + # **createLookup** > CreateLookupResponse createLookup(accountId, lookupRequest) @@ -37,7 +37,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); - String accountId = "9900000"; // String | The ID of the Bandwidth account that the user belongs to. + String accountId = "9900000"; // String | Your Bandwidth Account ID. LookupRequest lookupRequest = new LookupRequest(); // LookupRequest | Phone number lookup request. try { CreateLookupResponse result = apiInstance.createLookup(accountId, lookupRequest); @@ -57,7 +57,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The ID of the Bandwidth account that the user belongs to. | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **lookupRequest** | [**LookupRequest**](LookupRequest.md)| Phone number lookup request. | | ### Return type @@ -84,7 +84,7 @@ public class Example { | **429** | Too Many Requests | - | | **500** | Internal Server Error | - | - + # **getLookupStatus** > LookupStatus getLookupStatus(accountId, requestId) @@ -113,7 +113,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); - String accountId = "9900000"; // String | The ID of the Bandwidth account that the user belongs to. + String accountId = "9900000"; // String | Your Bandwidth Account ID. String requestId = "004223a0-8b17-41b1-bf81-20732adf5590"; // String | The phone number lookup request ID from Bandwidth. try { LookupStatus result = apiInstance.getLookupStatus(accountId, requestId); @@ -133,7 +133,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The ID of the Bandwidth account that the user belongs to. | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **requestId** | **String**| The phone number lookup request ID from Bandwidth. | | ### Return type diff --git a/docs/RecordingAvailableCallback.md b/docs/RecordingAvailableCallback.md index 637273d4..dcdf970f 100644 --- a/docs/RecordingAvailableCallback.md +++ b/docs/RecordingAvailableCallback.md @@ -9,7 +9,7 @@ The Recording Available event is sent after a recording has been processed. It i | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/RecordingCompleteCallback.md b/docs/RecordingCompleteCallback.md index 51e9db03..6292e92f 100644 --- a/docs/RecordingCompleteCallback.md +++ b/docs/RecordingCompleteCallback.md @@ -9,7 +9,7 @@ The Record Complete event is sent after a verb has executed if the call | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md index 91dac4c8..d65bc32b 100644 --- a/docs/RecordingsApi.md +++ b/docs/RecordingsApi.md @@ -16,7 +16,7 @@ All URIs are relative to *http://localhost* | [**updateCallRecordingState**](RecordingsApi.md#updateCallRecordingState) | **PUT** /accounts/{accountId}/calls/{callId}/recording | Update Recording | - + # **deleteCallTranscription** > deleteCallTranscription(accountId, callId, recordingId) @@ -45,9 +45,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { apiInstance.deleteCallTranscription(accountId, callId, recordingId); } catch (ApiException e) { @@ -65,9 +65,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -85,17 +85,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The transcription was successfully deleted | - | +| **204** | The transcription was successfully deleted. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **deleteRecording** > deleteRecording(accountId, callId, recordingId) @@ -124,9 +124,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { apiInstance.deleteRecording(accountId, callId, recordingId); } catch (ApiException e) { @@ -144,9 +144,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -164,17 +164,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Recording Deleted | - | +| **204** | Recording was deleted. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **deleteRecordingMedia** > deleteRecordingMedia(accountId, callId, recordingId) @@ -203,9 +203,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { apiInstance.deleteRecordingMedia(accountId, callId, recordingId); } catch (ApiException e) { @@ -223,9 +223,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -243,17 +243,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The recording media was successfully deleted | - | +| **204** | The recording media was successfully deleted. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **downloadCallRecording** > File downloadCallRecording(accountId, callId, recordingId) @@ -282,9 +282,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { File result = apiInstance.downloadCallRecording(accountId, callId, recordingId); System.out.println(result); @@ -303,9 +303,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -330,10 +330,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getCallRecording** > CallRecordingMetadata getCallRecording(accountId, callId, recordingId) @@ -362,9 +362,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { CallRecordingMetadata result = apiInstance.getCallRecording(accountId, callId, recordingId); System.out.println(result); @@ -383,9 +383,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -410,10 +410,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **getCallTranscription** > TranscriptionList getCallTranscription(accountId, callId, recordingId) @@ -442,9 +442,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { TranscriptionList result = apiInstance.getCallTranscription(accountId, callId, recordingId); System.out.println(result); @@ -463,9 +463,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | ### Return type @@ -490,10 +490,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **listAccountCallRecordings** > List<CallRecordingMetadata> listAccountCallRecordings(accountId, to, from, minStartTime, maxStartTime) @@ -522,7 +522,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. String to = "%2b19195551234"; // String | Filter results by the `to` field. String from = "%2b19195554321"; // String | Filter results by the `from` field. String minStartTime = "2022-06-21T19:13:21Z"; // String | Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). @@ -545,7 +545,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | | **to** | **String**| Filter results by the `to` field. | [optional] | | **from** | **String**| Filter results by the `from` field. | [optional] | | **minStartTime** | **String**| Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). | [optional] | @@ -574,10 +574,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **listCallRecordings** > List<CallRecordingMetadata> listCallRecordings(accountId, callId) @@ -606,8 +606,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. try { List result = apiInstance.listCallRecordings(accountId, callId); System.out.println(result); @@ -626,8 +626,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | ### Return type @@ -652,10 +652,10 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **transcribeCallRecording** > transcribeCallRecording(accountId, callId, recordingId, transcribeRecording) @@ -684,9 +684,9 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID - String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. TranscribeRecording transcribeRecording = new TranscribeRecording(); // TranscribeRecording | try { apiInstance.transcribeCallRecording(accountId, callId, recordingId, transcribeRecording); @@ -705,9 +705,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | -| **recordingId** | **String**| Programmable Voice API Recording ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | +| **recordingId** | **String**| Programmable Voice API Recording ID. | | | **transcribeRecording** | [**TranscribeRecording**](TranscribeRecording.md)| | | ### Return type @@ -726,17 +726,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Transcription successfully requested | - | +| **204** | Transcription was successfully requested. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | - + # **updateCallRecordingState** > updateCallRecordingState(accountId, callId, updateCallRecording) @@ -765,8 +765,8 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); RecordingsApi apiInstance = new RecordingsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID - String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. UpdateCallRecording updateCallRecording = new UpdateCallRecording(); // UpdateCallRecording | try { apiInstance.updateCallRecordingState(accountId, callId, updateCallRecording); @@ -785,8 +785,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | -| **callId** | **String**| Programmable Voice API Call ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | +| **callId** | **String**| Programmable Voice API Call ID. | | | **updateCallRecording** | [**UpdateCallRecording**](UpdateCallRecording.md)| | | ### Return type @@ -805,13 +805,13 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Recording state successfully modified | - | +| **200** | Recording state was successfully modified. | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | diff --git a/docs/RedirectCallback.md b/docs/RedirectCallback.md index 7e3d8964..adaecd0e 100644 --- a/docs/RedirectCallback.md +++ b/docs/RedirectCallback.md @@ -9,7 +9,7 @@ The Redirect event is fired when a verb is executed. Its purpose is t | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index bc4f8e34..eaca4b39 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -7,7 +7,7 @@ All URIs are relative to *http://localhost* | [**getStatistics**](StatisticsApi.md#getStatistics) | **GET** /accounts/{accountId}/statistics | Get Account Statistics | - + # **getStatistics** > AccountStatistics getStatistics(accountId) @@ -36,7 +36,7 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); StatisticsApi apiInstance = new StatisticsApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID + String accountId = "9900000"; // String | Your Bandwidth Account ID. try { AccountStatistics result = apiInstance.getStatistics(accountId); System.out.println(result); @@ -55,7 +55,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID | | +| **accountId** | **String**| Your Bandwidth Account ID. | | ### Return type @@ -80,6 +80,6 @@ public class Example { | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | * Retry-After - When you should try your request again
| +| **429** | Too Many Requests | * Retry-After - When you should try your request again.
| | **500** | Internal Server Error | - | diff --git a/docs/TranscribeRecording.md b/docs/TranscribeRecording.md index 489ff428..5a30cd0e 100644 --- a/docs/TranscribeRecording.md +++ b/docs/TranscribeRecording.md @@ -13,6 +13,7 @@ |**password** | **String** | Basic auth password. | [optional] | |**tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] | |**callbackTimeout** | **Double** | This is the timeout (in seconds) to use when delivering the webhook to `callbackUrl`. Can be any numeric value (including decimals) between 1 and 25. | [optional] | +|**detectLanguage** | **Boolean** | A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. | [optional] | diff --git a/docs/TranscriptionAvailableCallback.md b/docs/TranscriptionAvailableCallback.md index 140399fb..d560cae6 100644 --- a/docs/TranscriptionAvailableCallback.md +++ b/docs/TranscriptionAvailableCallback.md @@ -9,7 +9,7 @@ The Transcription Available event is sent when the recording transcription is av | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/TransferAnswerCallback.md b/docs/TransferAnswerCallback.md index 652c8901..a8fdeeb2 100644 --- a/docs/TransferAnswerCallback.md +++ b/docs/TransferAnswerCallback.md @@ -9,7 +9,7 @@ When processing a verb, this event is sent when a called party (B-leg | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/TransferCompleteCallback.md b/docs/TransferCompleteCallback.md index 3421a554..97845e7e 100644 --- a/docs/TransferCompleteCallback.md +++ b/docs/TransferCompleteCallback.md @@ -9,7 +9,7 @@ This event is sent to the transferCompleteUrl of the A-leg's verb whe | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/TransferDisconnectCallback.md b/docs/TransferDisconnectCallback.md index 5f0caf94..3e7f4c7a 100644 --- a/docs/TransferDisconnectCallback.md +++ b/docs/TransferDisconnectCallback.md @@ -9,7 +9,7 @@ This event is sent to the transferDisconnectUrl of each tag when i | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**eventType** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] | -|**eventTime** | **String** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | +|**eventTime** | **OffsetDateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] | |**accountId** | **String** | The user account associated with the call. | [optional] | |**applicationId** | **String** | The id of the application associated with the call. | [optional] | |**from** | **String** | 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. | [optional] | diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md index 87372da3..98184a4f 100644 --- a/docs/UpdateCall.md +++ b/docs/UpdateCall.md @@ -12,7 +12,7 @@ |**redirectMethod** | **RedirectMethodEnum** | | [optional] | |**username** | **String** | Basic auth username. | [optional] | |**password** | **String** | Basic auth password. | [optional] | -|**redirectFallbackUrl** | **URI** | A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond | [optional] | +|**redirectFallbackUrl** | **URI** | A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. | [optional] | |**redirectFallbackMethod** | **RedirectMethodEnum** | | [optional] | |**fallbackUsername** | **String** | Basic auth username. | [optional] | |**fallbackPassword** | **String** | Basic auth password. | [optional] | diff --git a/docs/UpdateConference.md b/docs/UpdateConference.md index a2ef101c..f0ebb9ac 100644 --- a/docs/UpdateConference.md +++ b/docs/UpdateConference.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**status** | **ConferenceStateEnum** | | [optional] | -|**redirectUrl** | **URI** | The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active` | [optional] | +|**redirectUrl** | **URI** | The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. | [optional] | |**redirectMethod** | **RedirectMethodEnum** | | [optional] | |**username** | **String** | Basic auth username. | [optional] | |**password** | **String** | Basic auth password. | [optional] | diff --git a/src/main/java/org/openapitools/client/ApiClient.java b/src/main/java/org/openapitools/client/ApiClient.java index 237e190a..b5a7653c 100644 --- a/src/main/java/org/openapitools/client/ApiClient.java +++ b/src/main/java/org/openapitools/client/ApiClient.java @@ -140,7 +140,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/9.0.0-beta.1/java"); + setUserAgent("OpenAPI-Generator/9.0.0/java"); authentications = new HashMap(); } @@ -1168,12 +1168,15 @@ public Request buildRequest(String baseUrl, String path, String method, ListApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - + /** *

Constructor for ApiException.

*/ diff --git a/src/main/java/org/openapitools/client/Configuration.java b/src/main/java/org/openapitools/client/Configuration.java index 6b72e722..5d16fa3a 100644 --- a/src/main/java/org/openapitools/client/Configuration.java +++ b/src/main/java/org/openapitools/client/Configuration.java @@ -13,8 +13,10 @@ package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Configuration { + public static final String VERSION = "9.0.0"; + private static ApiClient defaultApiClient = new ApiClient(); /** diff --git a/src/main/java/org/openapitools/client/JSON.java b/src/main/java/org/openapitools/client/JSON.java index 7d582470..d3723322 100644 --- a/src/main/java/org/openapitools/client/JSON.java +++ b/src/main/java/org/openapitools/client/JSON.java @@ -128,6 +128,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.LookupStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MachineDetectionCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MachineDetectionConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MachineDetectionResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Media.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Message.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MessageDeliveredCallback.CustomTypeAdapterFactory()); diff --git a/src/main/java/org/openapitools/client/Pair.java b/src/main/java/org/openapitools/client/Pair.java index dae186ef..d56e4186 100644 --- a/src/main/java/org/openapitools/client/Pair.java +++ b/src/main/java/org/openapitools/client/Pair.java @@ -13,7 +13,7 @@ package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/org/openapitools/client/StringUtil.java b/src/main/java/org/openapitools/client/StringUtil.java index 9baf4687..557da995 100644 --- a/src/main/java/org/openapitools/client/StringUtil.java +++ b/src/main/java/org/openapitools/client/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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/org/openapitools/client/api/CallsApi.java b/src/main/java/org/openapitools/client/api/CallsApi.java index 16525de6..bad789c1 100644 --- a/src/main/java/org/openapitools/client/api/CallsApi.java +++ b/src/main/java/org/openapitools/client/api/CallsApi.java @@ -38,7 +38,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class CallsApi { private ApiClient localVarApiClient; @@ -79,7 +78,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createCall - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param createCall JSON object containing information to create an outbound call (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -94,7 +93,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -163,7 +162,7 @@ private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall c /** * Create Call * Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param createCall JSON object containing information to create an outbound call (required) * @return CreateCallResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -177,7 +176,7 @@ private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall c 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -189,7 +188,7 @@ public CreateCallResponse createCall(String accountId, CreateCall createCall) th /** * Create Call * Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param createCall JSON object containing information to create an outbound call (required) * @return ApiResponse<CreateCallResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -203,7 +202,7 @@ public CreateCallResponse createCall(String accountId, CreateCall createCall) th 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -216,7 +215,7 @@ public ApiResponse createCallWithHttpInfo(String accountId, /** * Create Call (asynchronously) * Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param createCall JSON object containing information to create an outbound call (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -231,7 +230,7 @@ public ApiResponse createCallWithHttpInfo(String accountId, 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -244,8 +243,8 @@ public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, fin } /** * Build call for getCallState - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -259,7 +258,7 @@ public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, fin 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -328,8 +327,8 @@ private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String cal /** * Get Call State Information * Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @return CallState * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -342,7 +341,7 @@ private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String cal 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -354,8 +353,8 @@ public CallState getCallState(String accountId, String callId) throws ApiExcepti /** * Get Call State Information * Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @return ApiResponse<CallState> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -368,7 +367,7 @@ public CallState getCallState(String accountId, String callId) throws ApiExcepti 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -381,8 +380,8 @@ public ApiResponse getCallStateWithHttpInfo(String accountId, String /** * Get Call State Information (asynchronously) * Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -396,7 +395,7 @@ public ApiResponse getCallStateWithHttpInfo(String accountId, String 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -409,8 +408,8 @@ public okhttp3.Call getCallStateAsync(String accountId, String callId, final Api } /** * Build call for updateCall - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -418,7 +417,7 @@ public okhttp3.Call getCallStateAsync(String accountId, String callId, final Api * @http.response.details - + @@ -426,7 +425,7 @@ public okhttp3.Call getCallStateAsync(String accountId, String callId, final Api - +
Status Code Description Response Headers
200 Call Successfully Modified -
200 Call was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -501,14 +500,14 @@ private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callI /** * Update Call * Interrupts and redirects a call to a different URL that should return a BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -516,7 +515,7 @@ private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callI - +
Status Code Description Response Headers
200 Call Successfully Modified -
200 Call was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -527,15 +526,15 @@ public void updateCall(String accountId, String callId, UpdateCall updateCall) t /** * Update Call * Interrupts and redirects a call to a different URL that should return a BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -543,7 +542,7 @@ public void updateCall(String accountId, String callId, UpdateCall updateCall) t - +
Status Code Description Response Headers
200 Call Successfully Modified -
200 Call was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -555,8 +554,8 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, /** * Update Call (asynchronously) * Interrupts and redirects a call to a different URL that should return a BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -564,7 +563,7 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, * @http.response.details - + @@ -572,7 +571,7 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, - +
Status Code Description Response Headers
200 Call Successfully Modified -
200 Call was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -584,8 +583,8 @@ public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall } /** * Build call for updateCallBxml - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param body (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -593,7 +592,7 @@ public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall * @http.response.details - + @@ -601,7 +600,7 @@ public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall - +
Status Code Description Response Headers
204 Call BXML Successfully Replaced -
204 Call BXML was successfully replaced. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -676,14 +675,14 @@ private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String c /** * Update Call BXML * Interrupts and replaces an active call's BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param body (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -691,7 +690,7 @@ private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String c - +
Status Code Description Response Headers
204 Call BXML Successfully Replaced -
204 Call BXML was successfully replaced. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -702,15 +701,15 @@ public void updateCallBxml(String accountId, String callId, String body) throws /** * Update Call BXML * Interrupts and replaces an active call's BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param body (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -718,7 +717,7 @@ public void updateCallBxml(String accountId, String callId, String body) throws - +
Status Code Description Response Headers
204 Call BXML Successfully Replaced -
204 Call BXML was successfully replaced. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -730,8 +729,8 @@ public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String cal /** * Update Call BXML (asynchronously) * Interrupts and replaces an active call's BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param body (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -739,7 +738,7 @@ public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String cal * @http.response.details - + @@ -747,7 +746,7 @@ public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String cal - +
Status Code Description Response Headers
204 Call BXML Successfully Replaced -
204 Call BXML was successfully replaced. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
405 Method Not Allowed -
409 Conflict -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ diff --git a/src/main/java/org/openapitools/client/api/ConferencesApi.java b/src/main/java/org/openapitools/client/api/ConferencesApi.java index 39d2a660..5040eaf1 100644 --- a/src/main/java/org/openapitools/client/api/ConferencesApi.java +++ b/src/main/java/org/openapitools/client/api/ConferencesApi.java @@ -40,7 +40,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ConferencesApi { private ApiClient localVarApiClient; @@ -81,9 +80,9 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for downloadConferenceRecording - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -97,7 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -174,9 +173,9 @@ private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accoun /** * Download Conference Recording * Downloads the specified recording file. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -189,7 +188,7 @@ private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accoun 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -201,9 +200,9 @@ public File downloadConferenceRecording(String accountId, String conferenceId, S /** * Download Conference Recording * Downloads the specified recording file. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -216,7 +215,7 @@ public File downloadConferenceRecording(String accountId, String conferenceId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -229,9 +228,9 @@ public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountI /** * Download Conference Recording (asynchronously) * Downloads the specified recording file. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -245,7 +244,7 @@ public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountI 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -258,8 +257,8 @@ public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String co } /** * Build call for getConference - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -273,7 +272,7 @@ public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String co 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -342,8 +341,8 @@ private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String co /** * Get Conference Information * Returns information about the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @return Conference * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -356,7 +355,7 @@ private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String co 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -368,8 +367,8 @@ public Conference getConference(String accountId, String conferenceId) throws Ap /** * Get Conference Information * Returns information about the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @return ApiResponse<Conference> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -382,7 +381,7 @@ public Conference getConference(String accountId, String conferenceId) throws Ap 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -395,8 +394,8 @@ public ApiResponse getConferenceWithHttpInfo(String accountId, Strin /** * Get Conference Information (asynchronously) * Returns information about the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -410,7 +409,7 @@ public ApiResponse getConferenceWithHttpInfo(String accountId, Strin 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -423,9 +422,9 @@ public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, fi } /** * Build call for getConferenceMember - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -439,7 +438,7 @@ public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, fi 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -514,9 +513,9 @@ private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, Str /** * Get Conference Member * Returns information about the specified conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @return ConferenceMember * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -529,7 +528,7 @@ private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, Str 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -541,9 +540,9 @@ public ConferenceMember getConferenceMember(String accountId, String conferenceI /** * Get Conference Member * Returns information about the specified conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @return ApiResponse<ConferenceMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -556,7 +555,7 @@ public ConferenceMember getConferenceMember(String accountId, String conferenceI 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -569,9 +568,9 @@ public ApiResponse getConferenceMemberWithHttpInfo(String acco /** * Get Conference Member (asynchronously) * Returns information about the specified conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -585,7 +584,7 @@ public ApiResponse getConferenceMemberWithHttpInfo(String acco 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -598,9 +597,9 @@ public okhttp3.Call getConferenceMemberAsync(String accountId, String conference } /** * Build call for getConferenceRecording - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -614,7 +613,7 @@ public okhttp3.Call getConferenceMemberAsync(String accountId, String conference 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -689,9 +688,9 @@ private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, /** * Get Conference Recording Information * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ConferenceRecordingMetadata * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -704,7 +703,7 @@ private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -716,9 +715,9 @@ public ConferenceRecordingMetadata getConferenceRecording(String accountId, Stri /** * Get Conference Recording Information * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<ConferenceRecordingMetadata> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -731,7 +730,7 @@ public ConferenceRecordingMetadata getConferenceRecording(String accountId, Stri 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -744,9 +743,9 @@ public ApiResponse getConferenceRecordingWithHttpIn /** * Get Conference Recording Information (asynchronously) * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -760,7 +759,7 @@ public ApiResponse getConferenceRecordingWithHttpIn 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -773,8 +772,8 @@ public okhttp3.Call getConferenceRecordingAsync(String accountId, String confere } /** * Build call for listConferenceRecordings - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -788,7 +787,7 @@ public okhttp3.Call getConferenceRecordingAsync(String accountId, String confere 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -857,8 +856,8 @@ private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId /** * Get Conference Recordings * Returns a (potentially empty) list of metadata for the recordings that took place during the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @return List<ConferenceRecordingMetadata> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -871,7 +870,7 @@ private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -883,8 +882,8 @@ public List listConferenceRecordings(String account /** * Get Conference Recordings * Returns a (potentially empty) list of metadata for the recordings that took place during the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @return ApiResponse<List<ConferenceRecordingMetadata>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -897,7 +896,7 @@ public List listConferenceRecordings(String account 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -910,8 +909,8 @@ public ApiResponse> listConferenceRecordingsWi /** * Get Conference Recordings (asynchronously) * Returns a (potentially empty) list of metadata for the recordings that took place during the specified conference. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -925,7 +924,7 @@ public ApiResponse> listConferenceRecordingsWi 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -938,7 +937,7 @@ public okhttp3.Call listConferenceRecordingsAsync(String accountId, String confe } /** * Build call for listConferences - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param name Filter results by the `name` field. (optional) * @param minCreatedTime Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) * @param maxCreatedTime Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) @@ -957,7 +956,7 @@ public okhttp3.Call listConferenceRecordingsAsync(String accountId, String confe 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1040,7 +1039,7 @@ private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String /** * Get Conferences * Returns a max of 1000 conferences, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of conference records. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param name Filter results by the `name` field. (optional) * @param minCreatedTime Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) * @param maxCreatedTime Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) @@ -1058,7 +1057,7 @@ private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1070,7 +1069,7 @@ public List listConferences(String accountId, String name, String mi /** * Get Conferences * Returns a max of 1000 conferences, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of conference records. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param name Filter results by the `name` field. (optional) * @param minCreatedTime Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) * @param maxCreatedTime Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) @@ -1088,7 +1087,7 @@ public List listConferences(String accountId, String name, String mi 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1101,7 +1100,7 @@ public ApiResponse> listConferencesWithHttpInfo(String accountI /** * Get Conferences (asynchronously) * Returns a max of 1000 conferences, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of conference records. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param name Filter results by the `name` field. (optional) * @param minCreatedTime Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) * @param maxCreatedTime Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) @@ -1120,7 +1119,7 @@ public ApiResponse> listConferencesWithHttpInfo(String accountI 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1133,8 +1132,8 @@ public okhttp3.Call listConferencesAsync(String accountId, String name, String m } /** * Build call for updateConference - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param updateConference (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1142,14 +1141,14 @@ public okhttp3.Call listConferencesAsync(String accountId, String name, String m * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1224,21 +1223,21 @@ private okhttp3.Call updateConferenceValidateBeforeCall(String accountId, String /** * Update Conference * Update the conference state. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param updateConference (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1249,22 +1248,22 @@ public void updateConference(String accountId, String conferenceId, UpdateConfer /** * Update Conference * Update the conference state. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param updateConference (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1276,8 +1275,8 @@ public ApiResponse updateConferenceWithHttpInfo(String accountId, String c /** * Update Conference (asynchronously) * Update the conference state. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param updateConference (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1285,14 +1284,14 @@ public ApiResponse updateConferenceWithHttpInfo(String accountId, String c * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1304,8 +1303,8 @@ public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, } /** * Build call for updateConferenceBxml - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param body (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1313,14 +1312,14 @@ public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1395,21 +1394,21 @@ private okhttp3.Call updateConferenceBxmlValidateBeforeCall(String accountId, St /** * Update Conference BXML * Update the conference BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param body (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1420,22 +1419,22 @@ public void updateConferenceBxml(String accountId, String conferenceId, String b /** * Update Conference BXML * Update the conference BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param body (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1447,8 +1446,8 @@ public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, Stri /** * Update Conference BXML (asynchronously) * Update the conference BXML document. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) * @param body (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1456,14 +1455,14 @@ public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, Stri * @http.response.details - + - +
Status Code Description Response Headers
204 Conference successfully modified -
204 Conference successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1475,9 +1474,9 @@ public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenc } /** * Build call for updateConferenceMember - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param updateConferenceMember (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1485,14 +1484,14 @@ public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenc * @http.response.details - + - +
Status Code Description Response Headers
204 Conference member successfully modified -
204 Conference member was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1573,22 +1572,22 @@ private okhttp3.Call updateConferenceMemberValidateBeforeCall(String accountId, /** * Update Conference Member * Updates settings for a particular conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param updateConferenceMember (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference member successfully modified -
204 Conference member was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1599,23 +1598,23 @@ public void updateConferenceMember(String accountId, String conferenceId, String /** * Update Conference Member * Updates settings for a particular conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param updateConferenceMember (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Conference member successfully modified -
204 Conference member was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1627,9 +1626,9 @@ public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, St /** * Update Conference Member (asynchronously) * Updates settings for a particular conference member. - * @param accountId Your Bandwidth Account ID (required) - * @param conferenceId Programmable Voice API Conference ID (required) - * @param memberId Programmable Voice API Conference Member ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param conferenceId Programmable Voice API Conference ID. (required) + * @param memberId Programmable Voice API Conference Member ID. (required) * @param updateConferenceMember (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1637,14 +1636,14 @@ public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, St * @http.response.details - + - +
Status Code Description Response Headers
204 Conference member successfully modified -
204 Conference member was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ diff --git a/src/main/java/org/openapitools/client/api/MediaApi.java b/src/main/java/org/openapitools/client/api/MediaApi.java index 7d6d87d5..75f436f5 100644 --- a/src/main/java/org/openapitools/client/api/MediaApi.java +++ b/src/main/java/org/openapitools/client/api/MediaApi.java @@ -36,7 +36,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MediaApi { private ApiClient localVarApiClient; @@ -90,6 +89,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -171,6 +171,7 @@ private okhttp3.Call deleteMediaValidateBeforeCall(String accountId, String medi 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -195,6 +196,7 @@ public void deleteMedia(String accountId, String mediaId) throws ApiException { 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -221,6 +223,7 @@ public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaI 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -247,6 +250,7 @@ public okhttp3.Call deleteMediaAsync(String accountId, String mediaId, final Api 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -330,6 +334,7 @@ private okhttp3.Call getMediaValidateBeforeCall(String accountId, String mediaId 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -355,6 +360,7 @@ public File getMedia(String accountId, String mediaId) throws ApiException { 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -382,6 +388,7 @@ public ApiResponse getMediaWithHttpInfo(String accountId, String mediaId) 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -409,6 +416,7 @@ public okhttp3.Call getMediaAsync(String accountId, String mediaId, final ApiCal 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -489,6 +497,7 @@ private okhttp3.Call listMediaValidateBeforeCall(String accountId, String contin 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -514,6 +523,7 @@ public List listMedia(String accountId, String continuationToken) throws 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -541,6 +551,7 @@ public ApiResponse> listMediaWithHttpInfo(String accountId, String c 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -571,6 +582,7 @@ public okhttp3.Call listMediaAsync(String accountId, String continuationToken, f 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -712,6 +724,7 @@ private okhttp3.Call uploadMediaValidateBeforeCall(String accountId, String medi 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -739,6 +752,7 @@ public void uploadMedia(String accountId, String mediaId, File body, String cont 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -768,6 +782,7 @@ public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaI 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - diff --git a/src/main/java/org/openapitools/client/api/MessagesApi.java b/src/main/java/org/openapitools/client/api/MessagesApi.java index 37ded28f..7da2d4da 100644 --- a/src/main/java/org/openapitools/client/api/MessagesApi.java +++ b/src/main/java/org/openapitools/client/api/MessagesApi.java @@ -41,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MessagesApi { private ApiClient localVarApiClient; @@ -95,6 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -177,6 +177,7 @@ private okhttp3.Call createMessageValidateBeforeCall(String accountId, MessageRe 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -202,6 +203,7 @@ public Message createMessage(String accountId, MessageRequest messageRequest) th 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -229,6 +231,7 @@ public ApiResponse createMessageWithHttpInfo(String accountId, MessageR 401 Unauthorized - 403 Forbidden - 404 Not Found - + 406 Not Acceptable - 415 Unsupported Media Type - 429 Too Many Requests - 500 Internal Server Error - @@ -254,9 +257,11 @@ public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageR * @param errorCode The error code of the message. (optional) * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param campaignId The campaign ID of the message. (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param limitTotalCount When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -273,7 +278,7 @@ public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageR 500 Internal Server Error - */ - public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String sort, String pageToken, Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -339,6 +344,10 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("toDateTime", toDateTime)); } + if (campaignId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId)); + } + if (sort != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } @@ -351,6 +360,10 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } + if (limitTotalCount != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitTotalCount", limitTotalCount)); + } + final String[] localVarAccepts = { "application/json" }; @@ -371,13 +384,13 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String sort, String pageToken, Integer limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMessages(Async)"); } - return listMessagesCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit, _callback); + return listMessagesCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, _callback); } @@ -395,9 +408,11 @@ private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String mes * @param errorCode The error code of the message. (optional) * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param campaignId The campaign ID of the message. (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param limitTotalCount When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) * @return MessagesList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -413,8 +428,8 @@ private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String mes 500 Internal Server Error - */ - public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String sort, String pageToken, Integer limit) throws ApiException { - ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit); + public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount); return localVarResp.getData(); } @@ -432,9 +447,11 @@ public MessagesList listMessages(String accountId, String messageId, String sour * @param errorCode The error code of the message. (optional) * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param campaignId The campaign ID of the message. (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param limitTotalCount When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) * @return ApiResponse<MessagesList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -450,8 +467,8 @@ public MessagesList listMessages(String accountId, String messageId, String sour 500 Internal Server Error - */ - public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String sort, String pageToken, Integer limit) throws ApiException { - okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit, null); + public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -470,9 +487,11 @@ public ApiResponse listMessagesWithHttpInfo(String accountId, Stri * @param errorCode The error code of the message. (optional) * @param fromDateTime The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param toDateTime The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param campaignId The campaign ID of the message. (optional) * @param sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) * @param pageToken A base64 encoded value used for pagination of results. (optional) * @param limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param limitTotalCount When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -489,9 +508,9 @@ public ApiResponse listMessagesWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String sort, String pageToken, Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit, _callback); + okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/openapitools/client/api/MfaApi.java b/src/main/java/org/openapitools/client/api/MfaApi.java index d798428d..84ec5ca5 100644 --- a/src/main/java/org/openapitools/client/api/MfaApi.java +++ b/src/main/java/org/openapitools/client/api/MfaApi.java @@ -41,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MfaApi { private ApiClient localVarApiClient; @@ -82,7 +81,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for generateMessagingCode - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -162,7 +161,7 @@ private okhttp3.Call generateMessagingCodeValidateBeforeCall(String accountId, C /** * Messaging Authentication Code * Send an MFA code via text message (SMS). - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @return MessagingCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -184,7 +183,7 @@ public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest /** * Messaging Authentication Code * Send an MFA code via text message (SMS). - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @return ApiResponse<MessagingCodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -207,7 +206,7 @@ public ApiResponse generateMessagingCodeWithHttpInfo(Stri /** * Messaging Authentication Code (asynchronously) * Send an MFA code via text message (SMS). - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -231,7 +230,7 @@ public okhttp3.Call generateMessagingCodeAsync(String accountId, CodeRequest cod } /** * Build call for generateVoiceCode - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -311,7 +310,7 @@ private okhttp3.Call generateVoiceCodeValidateBeforeCall(String accountId, CodeR /** * Voice Authentication Code * Send an MFA Code via a phone call. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @return VoiceCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -333,7 +332,7 @@ public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeReq /** * Voice Authentication Code * Send an MFA Code via a phone call. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @return ApiResponse<VoiceCodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -356,7 +355,7 @@ public ApiResponse generateVoiceCodeWithHttpInfo(String accou /** * Voice Authentication Code (asynchronously) * Send an MFA Code via a phone call. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param codeRequest MFA code request body. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -380,7 +379,7 @@ public okhttp3.Call generateVoiceCodeAsync(String accountId, CodeRequest codeReq } /** * Build call for verifyCode - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param verifyCodeRequest MFA code verify request body. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -461,7 +460,7 @@ private okhttp3.Call verifyCodeValidateBeforeCall(String accountId, VerifyCodeRe /** * Verify Authentication Code * Verify a previously sent MFA code. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param verifyCodeRequest MFA code verify request body. (required) * @return VerifyCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -484,7 +483,7 @@ public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyC /** * Verify Authentication Code * Verify a previously sent MFA code. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param verifyCodeRequest MFA code verify request body. (required) * @return ApiResponse<VerifyCodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -508,7 +507,7 @@ public ApiResponse verifyCodeWithHttpInfo(String accountId, /** * Verify Authentication Code (asynchronously) * Verify a previously sent MFA code. - * @param accountId Bandwidth Account ID with Voice service enabled. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param verifyCodeRequest MFA code verify request body. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/org/openapitools/client/api/PhoneNumberLookupApi.java b/src/main/java/org/openapitools/client/api/PhoneNumberLookupApi.java index 340066bc..eb5e0e66 100644 --- a/src/main/java/org/openapitools/client/api/PhoneNumberLookupApi.java +++ b/src/main/java/org/openapitools/client/api/PhoneNumberLookupApi.java @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class PhoneNumberLookupApi { private ApiClient localVarApiClient; @@ -78,7 +77,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for createLookup - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param lookupRequest Phone number lookup request. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -160,7 +159,7 @@ private okhttp3.Call createLookupValidateBeforeCall(String accountId, LookupRequ /** * Create Lookup * Create a Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param lookupRequest Phone number lookup request. (required) * @return CreateLookupResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -184,7 +183,7 @@ public CreateLookupResponse createLookup(String accountId, LookupRequest lookupR /** * Create Lookup * Create a Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param lookupRequest Phone number lookup request. (required) * @return ApiResponse<CreateLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -209,7 +208,7 @@ public ApiResponse createLookupWithHttpInfo(String account /** * Create Lookup (asynchronously) * Create a Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param lookupRequest Phone number lookup request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -235,7 +234,7 @@ public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequ } /** * Build call for getLookupStatus - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param requestId The phone number lookup request ID from Bandwidth. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -317,7 +316,7 @@ private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, String /** * Get Lookup Request Status * Get an existing Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param requestId The phone number lookup request ID from Bandwidth. (required) * @return LookupStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -341,7 +340,7 @@ public LookupStatus getLookupStatus(String accountId, String requestId) throws A /** * Get Lookup Request Status * Get an existing Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param requestId The phone number lookup request ID from Bandwidth. (required) * @return ApiResponse<LookupStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -366,7 +365,7 @@ public ApiResponse getLookupStatusWithHttpInfo(String accountId, S /** * Get Lookup Request Status (asynchronously) * Get an existing Phone Number Lookup Request. - * @param accountId The ID of the Bandwidth account that the user belongs to. (required) + * @param accountId Your Bandwidth Account ID. (required) * @param requestId The phone number lookup request ID from Bandwidth. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/org/openapitools/client/api/RecordingsApi.java b/src/main/java/org/openapitools/client/api/RecordingsApi.java index 669eaea1..4f707e4c 100644 --- a/src/main/java/org/openapitools/client/api/RecordingsApi.java +++ b/src/main/java/org/openapitools/client/api/RecordingsApi.java @@ -39,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class RecordingsApi { private ApiClient localVarApiClient; @@ -80,23 +79,23 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for deleteCallTranscription - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 The transcription was successfully deleted -
204 The transcription was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -171,21 +170,21 @@ private okhttp3.Call deleteCallTranscriptionValidateBeforeCall(String accountId, /** * Delete Transcription * Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 The transcription was successfully deleted -
204 The transcription was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -196,22 +195,22 @@ public void deleteCallTranscription(String accountId, String callId, String reco /** * Delete Transcription * Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 The transcription was successfully deleted -
204 The transcription was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -223,23 +222,23 @@ public ApiResponse deleteCallTranscriptionWithHttpInfo(String accountId, S /** * Delete Transcription (asynchronously) * Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 The transcription was successfully deleted -
204 The transcription was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -251,23 +250,23 @@ public okhttp3.Call deleteCallTranscriptionAsync(String accountId, String callId } /** * Build call for deleteRecording - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 Recording Deleted -
204 Recording was deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -342,21 +341,21 @@ private okhttp3.Call deleteRecordingValidateBeforeCall(String accountId, String /** * Delete Recording * Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Recording Deleted -
204 Recording was deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -367,22 +366,22 @@ public void deleteRecording(String accountId, String callId, String recordingId) /** * Delete Recording * Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Recording Deleted -
204 Recording was deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -394,23 +393,23 @@ public ApiResponse deleteRecordingWithHttpInfo(String accountId, String ca /** * Delete Recording (asynchronously) * Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 Recording Deleted -
204 Recording was deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -422,23 +421,23 @@ public okhttp3.Call deleteRecordingAsync(String accountId, String callId, String } /** * Build call for deleteRecordingMedia - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 The recording media was successfully deleted -
204 The recording media was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -513,21 +512,21 @@ private okhttp3.Call deleteRecordingMediaValidateBeforeCall(String accountId, St /** * Delete Recording Media * Deletes the specified recording's media. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 The recording media was successfully deleted -
204 The recording media was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -538,22 +537,22 @@ public void deleteRecordingMedia(String accountId, String callId, String recordi /** * Delete Recording Media * Deletes the specified recording's media. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 The recording media was successfully deleted -
204 The recording media was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -565,23 +564,23 @@ public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, Stri /** * Delete Recording Media (asynchronously) * Deletes the specified recording's media. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + - +
Status Code Description Response Headers
204 The recording media was successfully deleted -
204 The recording media was successfully deleted. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -593,9 +592,9 @@ public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, S } /** * Build call for downloadCallRecording - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -609,7 +608,7 @@ public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -686,9 +685,9 @@ private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, S /** * Download Recording * Downloads the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -701,7 +700,7 @@ private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -713,9 +712,9 @@ public File downloadCallRecording(String accountId, String callId, String record /** * Download Recording * Downloads the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -728,7 +727,7 @@ public File downloadCallRecording(String accountId, String callId, String record 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -741,9 +740,9 @@ public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, Str /** * Download Recording (asynchronously) * Downloads the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -757,7 +756,7 @@ public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, Str 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -770,9 +769,9 @@ public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, } /** * Build call for getCallRecording - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -786,7 +785,7 @@ public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -861,9 +860,9 @@ private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String /** * Get Call Recording * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return CallRecordingMetadata * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -876,7 +875,7 @@ private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -888,9 +887,9 @@ public CallRecordingMetadata getCallRecording(String accountId, String callId, S /** * Get Call Recording * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<CallRecordingMetadata> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -903,7 +902,7 @@ public CallRecordingMetadata getCallRecording(String accountId, String callId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -916,9 +915,9 @@ public ApiResponse getCallRecordingWithHttpInfo(String ac /** * Get Call Recording (asynchronously) * Returns metadata for the specified recording. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -932,7 +931,7 @@ public ApiResponse getCallRecordingWithHttpInfo(String ac 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -945,9 +944,9 @@ public okhttp3.Call getCallRecordingAsync(String accountId, String callId, Strin } /** * Build call for getCallTranscription - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -961,7 +960,7 @@ public okhttp3.Call getCallRecordingAsync(String accountId, String callId, Strin 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1036,9 +1035,9 @@ private okhttp3.Call getCallTranscriptionValidateBeforeCall(String accountId, St /** * Get Transcription * Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return TranscriptionList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1051,7 +1050,7 @@ private okhttp3.Call getCallTranscriptionValidateBeforeCall(String accountId, St 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1063,9 +1062,9 @@ public TranscriptionList getCallTranscription(String accountId, String callId, S /** * Get Transcription * Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @return ApiResponse<TranscriptionList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1078,7 +1077,7 @@ public TranscriptionList getCallTranscription(String accountId, String callId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1091,9 +1090,9 @@ public ApiResponse getCallTranscriptionWithHttpInfo(String ac /** * Get Transcription (asynchronously) * Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1107,7 +1106,7 @@ public ApiResponse getCallTranscriptionWithHttpInfo(String ac 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1120,7 +1119,7 @@ public okhttp3.Call getCallTranscriptionAsync(String accountId, String callId, S } /** * Build call for listAccountCallRecordings - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param to Filter results by the `to` field. (optional) * @param from Filter results by the `from` field. (optional) * @param minStartTime Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) @@ -1138,7 +1137,7 @@ public okhttp3.Call getCallTranscriptionAsync(String accountId, String callId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1217,7 +1216,7 @@ private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountI /** * Get Call Recordings * Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param to Filter results by the `to` field. (optional) * @param from Filter results by the `from` field. (optional) * @param minStartTime Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) @@ -1234,7 +1233,7 @@ private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountI 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1246,7 +1245,7 @@ public List listAccountCallRecordings(String accountId, S /** * Get Call Recordings * Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param to Filter results by the `to` field. (optional) * @param from Filter results by the `from` field. (optional) * @param minStartTime Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) @@ -1263,7 +1262,7 @@ public List listAccountCallRecordings(String accountId, S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1276,7 +1275,7 @@ public ApiResponse> listAccountCallRecordingsWithHtt /** * Get Call Recordings (asynchronously) * Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param to Filter results by the `to` field. (optional) * @param from Filter results by the `from` field. (optional) * @param minStartTime Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) @@ -1294,7 +1293,7 @@ public ApiResponse> listAccountCallRecordingsWithHtt 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1307,8 +1306,8 @@ public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, } /** * Build call for listCallRecordings - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1322,7 +1321,7 @@ public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1391,8 +1390,8 @@ private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, Stri /** * List Call Recordings * Returns a (potentially empty) list of metadata for the recordings that took place during the specified call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @return List<CallRecordingMetadata> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1405,7 +1404,7 @@ private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, Stri 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1417,8 +1416,8 @@ public List listCallRecordings(String accountId, String c /** * List Call Recordings * Returns a (potentially empty) list of metadata for the recordings that took place during the specified call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @return ApiResponse<List<CallRecordingMetadata>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1431,7 +1430,7 @@ public List listCallRecordings(String accountId, String c 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1444,8 +1443,8 @@ public ApiResponse> listCallRecordingsWithHttpInfo(S /** * List Call Recordings (asynchronously) * Returns a (potentially empty) list of metadata for the recordings that took place during the specified call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1459,7 +1458,7 @@ public ApiResponse> listCallRecordingsWithHttpInfo(S 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -1472,9 +1471,9 @@ public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, fin } /** * Build call for transcribeCallRecording - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param transcribeRecording (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1482,14 +1481,14 @@ public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, fin * @http.response.details - + - +
Status Code Description Response Headers
204 Transcription successfully requested -
204 Transcription was successfully requested. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1570,22 +1569,22 @@ private okhttp3.Call transcribeCallRecordingValidateBeforeCall(String accountId, /** * Create Transcription Request * Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param transcribeRecording (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Transcription successfully requested -
204 Transcription was successfully requested. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1596,23 +1595,23 @@ public void transcribeCallRecording(String accountId, String callId, String reco /** * Create Transcription Request * Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param transcribeRecording (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
204 Transcription successfully requested -
204 Transcription was successfully requested. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1624,9 +1623,9 @@ public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, S /** * Create Transcription Request (asynchronously) * Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) - * @param recordingId Programmable Voice API Recording ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) + * @param recordingId Programmable Voice API Recording ID. (required) * @param transcribeRecording (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1634,14 +1633,14 @@ public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, S * @http.response.details - + - +
Status Code Description Response Headers
204 Transcription successfully requested -
204 Transcription was successfully requested. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1653,8 +1652,8 @@ public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId } /** * Build call for updateCallRecordingState - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCallRecording (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1662,14 +1661,14 @@ public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId * @http.response.details - + - +
Status Code Description Response Headers
200 Recording state successfully modified -
200 Recording state was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1744,21 +1743,21 @@ private okhttp3.Call updateCallRecordingStateValidateBeforeCall(String accountId /** * Update Recording * Pause or resume a recording on an active phone call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCallRecording (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
200 Recording state successfully modified -
200 Recording state was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1769,22 +1768,22 @@ public void updateCallRecordingState(String accountId, String callId, UpdateCall /** * Update Recording * Pause or resume a recording on an active phone call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCallRecording (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Status Code Description Response Headers
200 Recording state successfully modified -
200 Recording state was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ @@ -1796,8 +1795,8 @@ public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, /** * Update Recording (asynchronously) * Pause or resume a recording on an active phone call. - * @param accountId Your Bandwidth Account ID (required) - * @param callId Programmable Voice API Call ID (required) + * @param accountId Your Bandwidth Account ID. (required) + * @param callId Programmable Voice API Call ID. (required) * @param updateCallRecording (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1805,14 +1804,14 @@ public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, * @http.response.details - + - +
Status Code Description Response Headers
200 Recording state successfully modified -
200 Recording state was successfully modified. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - When you should try your request again
429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
*/ diff --git a/src/main/java/org/openapitools/client/api/StatisticsApi.java b/src/main/java/org/openapitools/client/api/StatisticsApi.java index 207815e7..348ca4b8 100644 --- a/src/main/java/org/openapitools/client/api/StatisticsApi.java +++ b/src/main/java/org/openapitools/client/api/StatisticsApi.java @@ -35,7 +35,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class StatisticsApi { private ApiClient localVarApiClient; @@ -76,7 +75,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for getStatistics - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -90,7 +89,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -153,7 +152,7 @@ private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final Api /** * Get Account Statistics * Returns details about the current state of the account. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @return AccountStatistics * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -166,7 +165,7 @@ private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final Api 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -178,7 +177,7 @@ public AccountStatistics getStatistics(String accountId) throws ApiException { /** * Get Account Statistics * Returns details about the current state of the account. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @return ApiResponse<AccountStatistics> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -191,7 +190,7 @@ public AccountStatistics getStatistics(String accountId) throws ApiException { 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ @@ -204,7 +203,7 @@ public ApiResponse getStatisticsWithHttpInfo(String accountId /** * Get Account Statistics (asynchronously) * Returns details about the current state of the account. - * @param accountId Your Bandwidth Account ID (required) + * @param accountId Your Bandwidth Account ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -218,7 +217,7 @@ public ApiResponse getStatisticsWithHttpInfo(String accountId 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - - 429 Too Many Requests * Retry-After - When you should try your request again
+ 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error - */ diff --git a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 069fd9e7..76a10680 100644 --- a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/src/main/java/org/openapitools/client/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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 473c44cb..0d050f4e 100644 --- a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/src/main/java/org/openapitools/client/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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 9a48cc34..f26fbaef 100644 --- a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -17,14 +17,13 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -import javax.ws.rs.core.GenericType; //import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -46,7 +45,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map getSchemas(); + public abstract Map> getSchemas(); /** * Get the actual instance diff --git a/src/main/java/org/openapitools/client/model/AccountStatistics.java b/src/main/java/org/openapitools/client/model/AccountStatistics.java index 790d8ff2..5a77b4b5 100644 --- a/src/main/java/org/openapitools/client/model/AccountStatistics.java +++ b/src/main/java/org/openapitools/client/model/AccountStatistics.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) @@ -70,7 +74,6 @@ public AccountStatistics currentCallQueueSize(Integer currentCallQueueSize) { * @return currentCallQueueSize **/ @javax.annotation.Nullable - public Integer getCurrentCallQueueSize() { return currentCallQueueSize; } @@ -92,7 +95,6 @@ public AccountStatistics maxCallQueueSize(Integer maxCallQueueSize) { * @return maxCallQueueSize **/ @javax.annotation.Nullable - public Integer getMaxCallQueueSize() { return maxCallQueueSize; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccountStatistics + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AccountStatistics */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccountStatistics.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountStatistics.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!AccountStatistics.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountStatistics` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountStatistics` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -199,9 +202,9 @@ public void write(JsonWriter out, AccountStatistics value) throws IOException { @Override public AccountStatistics read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/AnswerCallback.java b/src/main/java/org/openapitools/client/model/AnswerCallback.java index b489288f..9a580f9a 100644 --- a/src/main/java/org/openapitools/client/model/AnswerCallback.java +++ b/src/main/java/org/openapitools/client/model/AnswerCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,7 +21,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; +import org.openapitools.client.model.MachineDetectionResult; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +62,7 @@ public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -105,7 +110,7 @@ public class AnswerCallback { public static final String SERIALIZED_NAME_MACHINE_DETECTION_RESULT = "machineDetectionResult"; @SerializedName(SERIALIZED_NAME_MACHINE_DETECTION_RESULT) - private String machineDetectionResult; + private MachineDetectionResult machineDetectionResult; public AnswerCallback() { } @@ -121,7 +126,6 @@ public AnswerCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -132,7 +136,7 @@ public void setEventType(String eventType) { } - public AnswerCallback eventTime(String eventTime) { + public AnswerCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -143,13 +147,12 @@ public AnswerCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -165,7 +168,6 @@ public AnswerCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -187,7 +189,6 @@ public AnswerCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -209,7 +210,6 @@ public AnswerCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -231,7 +231,6 @@ public AnswerCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -253,7 +252,6 @@ public AnswerCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -275,7 +273,6 @@ public AnswerCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -297,7 +294,6 @@ public AnswerCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -319,7 +315,6 @@ public AnswerCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -341,7 +336,6 @@ public AnswerCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -363,7 +357,6 @@ public AnswerCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -385,7 +378,6 @@ public AnswerCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -396,24 +388,23 @@ public void setTag(String tag) { } - public AnswerCallback machineDetectionResult(String machineDetectionResult) { + public AnswerCallback machineDetectionResult(MachineDetectionResult machineDetectionResult) { this.machineDetectionResult = machineDetectionResult; return this; } /** - * (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 + * Get machineDetectionResult * @return machineDetectionResult **/ @javax.annotation.Nullable - - public String getMachineDetectionResult() { + public MachineDetectionResult getMachineDetectionResult() { return machineDetectionResult; } - public void setMachineDetectionResult(String machineDetectionResult) { + public void setMachineDetectionResult(MachineDetectionResult machineDetectionResult) { this.machineDetectionResult = machineDetectionResult; } @@ -520,31 +511,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AnswerCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnswerCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!AnswerCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AnswerCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AnswerCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -566,8 +555,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } - if ((jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) && !jsonObj.get("machineDetectionResult").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `machineDetectionResult` to be a primitive type in the JSON string but got `%s`", jsonObj.get("machineDetectionResult").toString())); + // validate the optional field `machineDetectionResult` + if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { + MachineDetectionResult.validateJsonElement(jsonObj.get("machineDetectionResult")); } } @@ -591,9 +581,9 @@ public void write(JsonWriter out, AnswerCallback value) throws IOException { @Override public AnswerCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/BridgeCompleteCallback.java b/src/main/java/org/openapitools/client/model/BridgeCompleteCallback.java index 180c0745..806f6a4f 100644 --- a/src/main/java/org/openapitools/client/model/BridgeCompleteCallback.java +++ b/src/main/java/org/openapitools/client/model/BridgeCompleteCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -129,7 +133,6 @@ public BridgeCompleteCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -140,7 +143,7 @@ public void setEventType(String eventType) { } - public BridgeCompleteCallback eventTime(String eventTime) { + public BridgeCompleteCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -151,13 +154,12 @@ public BridgeCompleteCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -173,7 +175,6 @@ public BridgeCompleteCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -195,7 +196,6 @@ public BridgeCompleteCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -217,7 +217,6 @@ public BridgeCompleteCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -239,7 +238,6 @@ public BridgeCompleteCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -261,7 +259,6 @@ public BridgeCompleteCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -283,7 +280,6 @@ public BridgeCompleteCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -305,7 +301,6 @@ public BridgeCompleteCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -327,7 +322,6 @@ public BridgeCompleteCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -349,7 +343,6 @@ public BridgeCompleteCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -371,7 +364,6 @@ public BridgeCompleteCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -393,7 +385,6 @@ public BridgeCompleteCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -415,7 +406,6 @@ public BridgeCompleteCallback cause(String cause) { * @return cause **/ @javax.annotation.Nullable - public String getCause() { return cause; } @@ -437,7 +427,6 @@ public BridgeCompleteCallback errorMessage(String errorMessage) { * @return errorMessage **/ @javax.annotation.Nullable - public String getErrorMessage() { return errorMessage; } @@ -459,7 +448,6 @@ public BridgeCompleteCallback errorId(String errorId) { * @return errorId **/ @javax.annotation.Nullable - public String getErrorId() { return errorId; } @@ -578,31 +566,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BridgeCompleteCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BridgeCompleteCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BridgeCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BridgeCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!BridgeCompleteCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BridgeCompleteCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BridgeCompleteCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -655,9 +641,9 @@ public void write(JsonWriter out, BridgeCompleteCallback value) throws IOExcepti @Override public BridgeCompleteCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/BridgeTargetCompleteCallback.java b/src/main/java/org/openapitools/client/model/BridgeTargetCompleteCallback.java index dbffafa1..b326da2c 100644 --- a/src/main/java/org/openapitools/client/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/org/openapitools/client/model/BridgeTargetCompleteCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -117,7 +121,6 @@ public BridgeTargetCompleteCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -128,7 +131,7 @@ public void setEventType(String eventType) { } - public BridgeTargetCompleteCallback eventTime(String eventTime) { + public BridgeTargetCompleteCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -139,13 +142,12 @@ public BridgeTargetCompleteCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -161,7 +163,6 @@ public BridgeTargetCompleteCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -183,7 +184,6 @@ public BridgeTargetCompleteCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -205,7 +205,6 @@ public BridgeTargetCompleteCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -227,7 +226,6 @@ public BridgeTargetCompleteCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -249,7 +247,6 @@ public BridgeTargetCompleteCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -271,7 +268,6 @@ public BridgeTargetCompleteCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -293,7 +289,6 @@ public BridgeTargetCompleteCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -315,7 +310,6 @@ public BridgeTargetCompleteCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -337,7 +331,6 @@ public BridgeTargetCompleteCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -359,7 +352,6 @@ public BridgeTargetCompleteCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -381,7 +373,6 @@ public BridgeTargetCompleteCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -491,31 +482,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BridgeTargetCompleteCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BridgeTargetCompleteCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BridgeTargetCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BridgeTargetCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!BridgeTargetCompleteCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BridgeTargetCompleteCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BridgeTargetCompleteCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -559,9 +548,9 @@ public void write(JsonWriter out, BridgeTargetCompleteCallback value) throws IOE @Override public BridgeTargetCompleteCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CallDirectionEnum.java b/src/main/java/org/openapitools/client/model/CallDirectionEnum.java index d478cf47..4789d24a 100644 --- a/src/main/java/org/openapitools/client/model/CallDirectionEnum.java +++ b/src/main/java/org/openapitools/client/model/CallDirectionEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/CallRecordingMetadata.java b/src/main/java/org/openapitools/client/model/CallRecordingMetadata.java index 690ae9bb..7e3d89e1 100644 --- a/src/main/java/org/openapitools/client/model/CallRecordingMetadata.java +++ b/src/main/java/org/openapitools/client/model/CallRecordingMetadata.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.client.model.TranscriptionMetadata; @@ -38,6 +38,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,7 +56,7 @@ /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -140,7 +144,6 @@ public CallRecordingMetadata applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -162,7 +165,6 @@ public CallRecordingMetadata accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -184,7 +186,6 @@ public CallRecordingMetadata callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -206,7 +207,6 @@ public CallRecordingMetadata parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -228,7 +228,6 @@ public CallRecordingMetadata recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -250,7 +249,6 @@ public CallRecordingMetadata to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -272,7 +270,6 @@ public CallRecordingMetadata from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -294,7 +291,6 @@ public CallRecordingMetadata transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -316,7 +312,6 @@ public CallRecordingMetadata transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -338,7 +333,6 @@ public CallRecordingMetadata duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -360,7 +354,6 @@ public CallRecordingMetadata direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -382,7 +375,6 @@ public CallRecordingMetadata channels(Integer channels) { * @return channels **/ @javax.annotation.Nullable - public Integer getChannels() { return channels; } @@ -404,7 +396,6 @@ public CallRecordingMetadata startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -426,7 +417,6 @@ public CallRecordingMetadata endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -448,7 +438,6 @@ public CallRecordingMetadata fileFormat(FileFormatEnum fileFormat) { * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -470,7 +459,6 @@ public CallRecordingMetadata status(String status) { * @return status **/ @javax.annotation.Nullable - public String getStatus() { return status; } @@ -492,7 +480,6 @@ public CallRecordingMetadata mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -514,7 +501,6 @@ public CallRecordingMetadata transcription(TranscriptionMetadata transcription) * @return transcription **/ @javax.annotation.Nullable - public TranscriptionMetadata getTranscription() { return transcription; } @@ -639,25 +625,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CallRecordingMetadata + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CallRecordingMetadata */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CallRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CallRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CallRecordingMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CallRecordingMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CallRecordingMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -696,7 +683,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { - TranscriptionMetadata.validateJsonObject(jsonObj.getAsJsonObject("transcription")); + TranscriptionMetadata.validateJsonElement(jsonObj.get("transcription")); } } @@ -720,9 +707,9 @@ public void write(JsonWriter out, CallRecordingMetadata value) throws IOExceptio @Override public CallRecordingMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CallState.java b/src/main/java/org/openapitools/client/model/CallState.java index 5b454c6a..5ba9d3bc 100644 --- a/src/main/java/org/openapitools/client/model/CallState.java +++ b/src/main/java/org/openapitools/client/model/CallState.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.openapitools.client.model.CallDirectionEnum; @@ -37,6 +37,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -51,7 +55,7 @@ /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -139,7 +143,6 @@ public CallState applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -161,7 +164,6 @@ public CallState accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -183,7 +185,6 @@ public CallState callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -205,7 +206,6 @@ public CallState parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -223,11 +223,10 @@ public CallState to(String to) { } /** - * 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 + * 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. * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -249,7 +248,6 @@ public CallState from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -271,7 +269,6 @@ public CallState direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -293,7 +290,6 @@ public CallState state(String state) { * @return state **/ @javax.annotation.Nullable - public String getState() { return state; } @@ -311,16 +307,18 @@ public CallState stirShaken(Map stirShaken) { } public CallState putStirShakenItem(String key, String stirShakenItem) { + if (this.stirShaken == null) { + this.stirShaken = new HashMap<>(); + } this.stirShaken.put(key, stirShakenItem); return this; } /** - * For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Verification-Passed` or `TN-Verification-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken) + * For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Verification-Passed` or `TN-Verification-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). * @return stirShaken **/ @javax.annotation.Nullable - public Map getStirShaken() { return stirShaken; } @@ -342,7 +340,6 @@ public CallState identity(String identity) { * @return identity **/ @javax.annotation.Nullable - public String getIdentity() { return identity; } @@ -364,7 +361,6 @@ public CallState enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -386,7 +382,6 @@ public CallState startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -408,7 +403,6 @@ public CallState answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -430,7 +424,6 @@ public CallState endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -452,7 +445,6 @@ public CallState disconnectCause(String disconnectCause) { * @return disconnectCause **/ @javax.annotation.Nullable - public String getDisconnectCause() { return disconnectCause; } @@ -474,7 +466,6 @@ public CallState errorMessage(String errorMessage) { * @return errorMessage **/ @javax.annotation.Nullable - public String getErrorMessage() { return errorMessage; } @@ -496,7 +487,6 @@ public CallState errorId(String errorId) { * @return errorId **/ @javax.annotation.Nullable - public String getErrorId() { return errorId; } @@ -518,7 +508,6 @@ public CallState lastUpdate(OffsetDateTime lastUpdate) { * @return lastUpdate **/ @javax.annotation.Nullable - public OffsetDateTime getLastUpdate() { return lastUpdate; } @@ -643,25 +632,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CallState + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CallState */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CallState.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CallState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CallState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CallState` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CallState` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -717,9 +707,9 @@ public void write(JsonWriter out, CallState value) throws IOException { @Override public CallState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CallStateEnum.java b/src/main/java/org/openapitools/client/model/CallStateEnum.java index 9d22e043..07fe61c5 100644 --- a/src/main/java/org/openapitools/client/model/CallStateEnum.java +++ b/src/main/java/org/openapitools/client/model/CallStateEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/CallbackMethodEnum.java b/src/main/java/org/openapitools/client/model/CallbackMethodEnum.java index 93ec6dc4..f0e512a5 100644 --- a/src/main/java/org/openapitools/client/model/CallbackMethodEnum.java +++ b/src/main/java/org/openapitools/client/model/CallbackMethodEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/CodeRequest.java b/src/main/java/org/openapitools/client/model/CodeRequest.java index ac520071..da04737a 100644 --- a/src/main/java/org/openapitools/client/model/CodeRequest.java +++ b/src/main/java/org/openapitools/client/model/CodeRequest.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -86,7 +90,6 @@ public CodeRequest to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -108,7 +111,6 @@ public CodeRequest from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -130,7 +132,6 @@ public CodeRequest applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -152,7 +153,6 @@ public CodeRequest scope(String scope) { * @return scope **/ @javax.annotation.Nullable - public String getScope() { return scope; } @@ -174,7 +174,6 @@ public CodeRequest message(String message) { * @return message **/ @javax.annotation.Nonnull - public String getMessage() { return message; } @@ -198,7 +197,6 @@ public CodeRequest digits(Integer digits) { * @return digits **/ @javax.annotation.Nonnull - public Integer getDigits() { return digits; } @@ -281,32 +279,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CodeRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CodeRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CodeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CodeRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CodeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CodeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!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())); } @@ -344,9 +343,9 @@ public void write(JsonWriter out, CodeRequest value) throws IOException { @Override public CodeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Conference.java b/src/main/java/org/openapitools/client/model/Conference.java index 658bc5ab..d65ee25f 100644 --- a/src/main/java/org/openapitools/client/model/Conference.java +++ b/src/main/java/org/openapitools/client/model/Conference.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +23,7 @@ import java.net.URI; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.CallbackMethodEnum; import org.openapitools.client.model.ConferenceMember; @@ -39,6 +39,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -53,7 +57,7 @@ /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -97,11 +101,10 @@ public Conference id(String id) { } /** - * The Bandwidth-generated conference ID + * The Bandwidth-generated conference ID. * @return id **/ @javax.annotation.Nullable - public String getId() { return id; } @@ -119,11 +122,10 @@ public Conference name(String name) { } /** - * The name of the conference, as specified by your application + * The name of the conference, as specified by your application. * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -145,7 +147,6 @@ public Conference createdTime(OffsetDateTime createdTime) { * @return createdTime **/ @javax.annotation.Nullable - public OffsetDateTime getCreatedTime() { return createdTime; } @@ -167,7 +168,6 @@ public Conference completedTime(OffsetDateTime completedTime) { * @return completedTime **/ @javax.annotation.Nullable - public OffsetDateTime getCompletedTime() { return completedTime; } @@ -189,7 +189,6 @@ public Conference conferenceEventUrl(URI conferenceEventUrl) { * @return conferenceEventUrl **/ @javax.annotation.Nullable - public URI getConferenceEventUrl() { return conferenceEventUrl; } @@ -211,7 +210,6 @@ public Conference conferenceEventMethod(CallbackMethodEnum conferenceEventMethod * @return conferenceEventMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getConferenceEventMethod() { return conferenceEventMethod; } @@ -233,7 +231,6 @@ public Conference tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -251,16 +248,18 @@ public Conference activeMembers(List activeMembers) { } public Conference addActiveMembersItem(ConferenceMember activeMembersItem) { + if (this.activeMembers == null) { + this.activeMembers = new ArrayList<>(); + } this.activeMembers.add(activeMembersItem); return this; } /** - * A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences) + * A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). * @return activeMembers **/ @javax.annotation.Nullable - public List getActiveMembers() { return activeMembers; } @@ -355,25 +354,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Conference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Conference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Conference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Conference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Conference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Conference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Conference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -396,7 +396,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `activeMembers` (array) for (int i = 0; i < jsonArrayactiveMembers.size(); i++) { - ConferenceMember.validateJsonObject(jsonArrayactiveMembers.get(i).getAsJsonObject()); + ConferenceMember.validateJsonElement(jsonArrayactiveMembers.get(i)); }; } } @@ -422,9 +422,9 @@ public void write(JsonWriter out, Conference value) throws IOException { @Override public Conference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceCompletedCallback.java b/src/main/java/org/openapitools/client/model/ConferenceCompletedCallback.java index 9c4fb87c..303b57f5 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceCompletedCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceCompletedCallback.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +52,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -55,7 +60,7 @@ public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -83,7 +88,6 @@ public ConferenceCompletedCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -94,7 +98,7 @@ public void setEventType(String eventType) { } - public ConferenceCompletedCallback eventTime(String eventTime) { + public ConferenceCompletedCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -105,13 +109,12 @@ public ConferenceCompletedCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -127,7 +130,6 @@ public ConferenceCompletedCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -149,7 +151,6 @@ public ConferenceCompletedCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -171,7 +172,6 @@ public ConferenceCompletedCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -257,31 +257,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceCompletedCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceCompletedCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceCompletedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceCompletedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceCompletedCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceCompletedCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceCompletedCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -313,9 +311,9 @@ public void write(JsonWriter out, ConferenceCompletedCallback value) throws IOEx @Override public ConferenceCompletedCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceCreatedCallback.java b/src/main/java/org/openapitools/client/model/ConferenceCreatedCallback.java index 64cc886a..737f5d40 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceCreatedCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceCreatedCallback.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +52,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -55,7 +60,7 @@ public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -83,7 +88,6 @@ public ConferenceCreatedCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -94,7 +98,7 @@ public void setEventType(String eventType) { } - public ConferenceCreatedCallback eventTime(String eventTime) { + public ConferenceCreatedCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -105,13 +109,12 @@ public ConferenceCreatedCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -127,7 +130,6 @@ public ConferenceCreatedCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -149,7 +151,6 @@ public ConferenceCreatedCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -171,7 +172,6 @@ public ConferenceCreatedCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -257,31 +257,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceCreatedCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceCreatedCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceCreatedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceCreatedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceCreatedCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceCreatedCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceCreatedCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -313,9 +311,9 @@ public void write(JsonWriter out, ConferenceCreatedCallback value) throws IOExce @Override public ConferenceCreatedCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceMember.java b/src/main/java/org/openapitools/client/model/ConferenceMember.java index 37ad2a82..3dccd303 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceMember.java +++ b/src/main/java/org/openapitools/client/model/ConferenceMember.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,7 @@ /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -89,7 +93,6 @@ public ConferenceMember callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -111,7 +114,6 @@ public ConferenceMember conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -133,7 +135,6 @@ public ConferenceMember memberUrl(String memberUrl) { * @return memberUrl **/ @javax.annotation.Nullable - public String getMemberUrl() { return memberUrl; } @@ -155,7 +156,6 @@ public ConferenceMember mute(Boolean mute) { * @return mute **/ @javax.annotation.Nullable - public Boolean getMute() { return mute; } @@ -177,7 +177,6 @@ public ConferenceMember hold(Boolean hold) { * @return hold **/ @javax.annotation.Nullable - public Boolean getHold() { return hold; } @@ -195,6 +194,9 @@ public ConferenceMember callIdsToCoach(List callIdsToCoach) { } public ConferenceMember addCallIdsToCoachItem(String callIdsToCoachItem) { + if (this.callIdsToCoach == null) { + this.callIdsToCoach = new ArrayList<>(); + } this.callIdsToCoach.add(callIdsToCoachItem); return this; } @@ -204,7 +206,6 @@ public ConferenceMember addCallIdsToCoachItem(String callIdsToCoachItem) { * @return callIdsToCoach **/ @javax.annotation.Nullable - public List getCallIdsToCoach() { return callIdsToCoach; } @@ -293,25 +294,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceMember + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceMember */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceMember.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMember` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMember` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -322,7 +324,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonArray()) { + if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -347,9 +349,9 @@ public void write(JsonWriter out, ConferenceMember value) throws IOException { @Override public ConferenceMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceMemberExitCallback.java b/src/main/java/org/openapitools/client/model/ConferenceMemberExitCallback.java index 1e0a4eea..ae8828fc 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceMemberExitCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceMemberExitCallback.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +52,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -55,7 +60,7 @@ public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -95,7 +100,6 @@ public ConferenceMemberExitCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -106,7 +110,7 @@ public void setEventType(String eventType) { } - public ConferenceMemberExitCallback eventTime(String eventTime) { + public ConferenceMemberExitCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -117,13 +121,12 @@ public ConferenceMemberExitCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -139,7 +142,6 @@ public ConferenceMemberExitCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -161,7 +163,6 @@ public ConferenceMemberExitCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -183,7 +184,6 @@ public ConferenceMemberExitCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -205,7 +205,6 @@ public ConferenceMemberExitCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -227,7 +226,6 @@ public ConferenceMemberExitCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -249,7 +247,6 @@ public ConferenceMemberExitCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -344,31 +341,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceMemberExitCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceMemberExitCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceMemberExitCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceMemberExitCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceMemberExitCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMemberExitCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMemberExitCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -409,9 +404,9 @@ public void write(JsonWriter out, ConferenceMemberExitCallback value) throws IOE @Override public ConferenceMemberExitCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceMemberJoinCallback.java b/src/main/java/org/openapitools/client/model/ConferenceMemberJoinCallback.java index 39bdc13c..005fb349 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceMemberJoinCallback.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +52,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -55,7 +60,7 @@ public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -95,7 +100,6 @@ public ConferenceMemberJoinCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -106,7 +110,7 @@ public void setEventType(String eventType) { } - public ConferenceMemberJoinCallback eventTime(String eventTime) { + public ConferenceMemberJoinCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -117,13 +121,12 @@ public ConferenceMemberJoinCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -139,7 +142,6 @@ public ConferenceMemberJoinCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -161,7 +163,6 @@ public ConferenceMemberJoinCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -183,7 +184,6 @@ public ConferenceMemberJoinCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -205,7 +205,6 @@ public ConferenceMemberJoinCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -227,7 +226,6 @@ public ConferenceMemberJoinCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -249,7 +247,6 @@ public ConferenceMemberJoinCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -344,31 +341,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceMemberJoinCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceMemberJoinCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceMemberJoinCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceMemberJoinCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceMemberJoinCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMemberJoinCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceMemberJoinCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -409,9 +404,9 @@ public void write(JsonWriter out, ConferenceMemberJoinCallback value) throws IOE @Override public ConferenceMemberJoinCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceRecordingAvailableCallback.java b/src/main/java/org/openapitools/client/model/ConferenceRecordingAvailableCallback.java index a1e6b48a..3e99fc64 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceRecordingAvailableCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -58,7 +62,7 @@ public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -122,7 +126,6 @@ public ConferenceRecordingAvailableCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -133,7 +136,7 @@ public void setEventType(String eventType) { } - public ConferenceRecordingAvailableCallback eventTime(String eventTime) { + public ConferenceRecordingAvailableCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -144,13 +147,12 @@ public ConferenceRecordingAvailableCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -166,7 +168,6 @@ public ConferenceRecordingAvailableCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -188,7 +189,6 @@ public ConferenceRecordingAvailableCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -210,7 +210,6 @@ public ConferenceRecordingAvailableCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -232,7 +231,6 @@ public ConferenceRecordingAvailableCallback recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -254,7 +252,6 @@ public ConferenceRecordingAvailableCallback channels(Integer channels) { * @return channels **/ @javax.annotation.Nullable - public Integer getChannels() { return channels; } @@ -276,7 +273,6 @@ public ConferenceRecordingAvailableCallback startTime(OffsetDateTime startTime) * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -298,7 +294,6 @@ public ConferenceRecordingAvailableCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -320,7 +315,6 @@ public ConferenceRecordingAvailableCallback duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -342,7 +336,6 @@ public ConferenceRecordingAvailableCallback fileFormat(FileFormatEnum fileFormat * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -364,7 +357,6 @@ public ConferenceRecordingAvailableCallback mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -386,7 +378,6 @@ public ConferenceRecordingAvailableCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -408,7 +399,6 @@ public ConferenceRecordingAvailableCallback status(String status) { * @return status **/ @javax.annotation.Nullable - public String getStatus() { return status; } @@ -521,31 +511,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceRecordingAvailableCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceRecordingAvailableCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceRecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceRecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceRecordingAvailableCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRecordingAvailableCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRecordingAvailableCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -592,9 +580,9 @@ public void write(JsonWriter out, ConferenceRecordingAvailableCallback value) th @Override public ConferenceRecordingAvailableCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceRecordingMetadata.java b/src/main/java/org/openapitools/client/model/ConferenceRecordingMetadata.java index f638c2b1..4d3ff35e 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceRecordingMetadata.java +++ b/src/main/java/org/openapitools/client/model/ConferenceRecordingMetadata.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,7 @@ /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -110,7 +114,6 @@ public ConferenceRecordingMetadata accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -132,7 +135,6 @@ public ConferenceRecordingMetadata conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -154,7 +156,6 @@ public ConferenceRecordingMetadata name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -176,7 +177,6 @@ public ConferenceRecordingMetadata recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -198,7 +198,6 @@ public ConferenceRecordingMetadata duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -220,7 +219,6 @@ public ConferenceRecordingMetadata channels(Integer channels) { * @return channels **/ @javax.annotation.Nullable - public Integer getChannels() { return channels; } @@ -242,7 +240,6 @@ public ConferenceRecordingMetadata startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -264,7 +261,6 @@ public ConferenceRecordingMetadata endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -286,7 +282,6 @@ public ConferenceRecordingMetadata fileFormat(FileFormatEnum fileFormat) { * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -308,7 +303,6 @@ public ConferenceRecordingMetadata status(String status) { * @return status **/ @javax.annotation.Nullable - public String getStatus() { return status; } @@ -330,7 +324,6 @@ public ConferenceRecordingMetadata mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -434,25 +427,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceRecordingMetadata + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceRecordingMetadata */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceRecordingMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRecordingMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRecordingMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -496,9 +490,9 @@ public void write(JsonWriter out, ConferenceRecordingMetadata value) throws IOEx @Override public ConferenceRecordingMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceRedirectCallback.java b/src/main/java/org/openapitools/client/model/ConferenceRedirectCallback.java index 12ec1321..a31cec18 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceRedirectCallback.java +++ b/src/main/java/org/openapitools/client/model/ConferenceRedirectCallback.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +52,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -55,7 +60,7 @@ public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_CONFERENCE_ID = "conferenceId"; @SerializedName(SERIALIZED_NAME_CONFERENCE_ID) @@ -83,7 +88,6 @@ public ConferenceRedirectCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -94,7 +98,7 @@ public void setEventType(String eventType) { } - public ConferenceRedirectCallback eventTime(String eventTime) { + public ConferenceRedirectCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -105,13 +109,12 @@ public ConferenceRedirectCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -127,7 +130,6 @@ public ConferenceRedirectCallback conferenceId(String conferenceId) { * @return conferenceId **/ @javax.annotation.Nullable - public String getConferenceId() { return conferenceId; } @@ -149,7 +151,6 @@ public ConferenceRedirectCallback name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { return name; } @@ -171,7 +172,6 @@ public ConferenceRedirectCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -257,31 +257,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ConferenceRedirectCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConferenceRedirectCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ConferenceRedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConferenceRedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ConferenceRedirectCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRedirectCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ConferenceRedirectCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } @@ -313,9 +311,9 @@ public void write(JsonWriter out, ConferenceRedirectCallback value) throws IOExc @Override public ConferenceRedirectCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ConferenceStateEnum.java b/src/main/java/org/openapitools/client/model/ConferenceStateEnum.java index 473cb96d..ac568f6a 100644 --- a/src/main/java/org/openapitools/client/model/ConferenceStateEnum.java +++ b/src/main/java/org/openapitools/client/model/ConferenceStateEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; @@ -24,7 +23,7 @@ import com.google.gson.stream.JsonWriter; /** - * Setting the conference state to `completed` ends the conference and ejects all members + * Setting the conference state to `completed` ends the conference and ejects all members. */ @JsonAdapter(ConferenceStateEnum.Adapter.class) public enum ConferenceStateEnum { diff --git a/src/main/java/org/openapitools/client/model/CreateCall.java b/src/main/java/org/openapitools/client/model/CreateCall.java index 13b8f467..ea9921f1 100644 --- a/src/main/java/org/openapitools/client/model/CreateCall.java +++ b/src/main/java/org/openapitools/client/model/CreateCall.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import org.openapitools.client.model.CallbackMethodEnum; import org.openapitools.client.model.MachineDetectionConfiguration; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,7 @@ /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -60,6 +64,10 @@ public class CreateCall { @SerializedName(SERIALIZED_NAME_FROM) private String from; + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + public static final String SERIALIZED_NAME_UUI = "uui"; @SerializedName(SERIALIZED_NAME_UUI) private String uui; @@ -138,11 +146,10 @@ public CreateCall to(String to) { } /** - * The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.com`)). + * The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -164,7 +171,6 @@ public CreateCall from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -175,6 +181,27 @@ public void setFrom(String from) { } + public CreateCall displayName(String displayName) { + + this.displayName = displayName; + return this; + } + + /** + * The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public CreateCall uui(String uui) { this.uui = uui; @@ -186,7 +213,6 @@ public CreateCall uui(String uui) { * @return uui **/ @javax.annotation.Nullable - public String getUui() { return uui; } @@ -208,7 +234,6 @@ public CreateCall applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -226,11 +251,10 @@ public CreateCall answerUrl(URI answerUrl) { } /** - * The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password` + * The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. * @return answerUrl **/ @javax.annotation.Nonnull - public URI getAnswerUrl() { return answerUrl; } @@ -252,7 +276,6 @@ public CreateCall answerMethod(CallbackMethodEnum answerMethod) { * @return answerMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getAnswerMethod() { return answerMethod; } @@ -274,7 +297,6 @@ public CreateCall username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -296,7 +318,6 @@ public CreateCall password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -314,11 +335,10 @@ public CreateCall answerFallbackUrl(URI answerFallbackUrl) { } /** - * A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword` + * A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. * @return answerFallbackUrl **/ @javax.annotation.Nullable - public URI getAnswerFallbackUrl() { return answerFallbackUrl; } @@ -340,7 +360,6 @@ public CreateCall answerFallbackMethod(CallbackMethodEnum answerFallbackMethod) * @return answerFallbackMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getAnswerFallbackMethod() { return answerFallbackMethod; } @@ -362,7 +381,6 @@ public CreateCall fallbackUsername(String fallbackUsername) { * @return fallbackUsername **/ @javax.annotation.Nullable - public String getFallbackUsername() { return fallbackUsername; } @@ -384,7 +402,6 @@ public CreateCall fallbackPassword(String fallbackPassword) { * @return fallbackPassword **/ @javax.annotation.Nullable - public String getFallbackPassword() { return fallbackPassword; } @@ -406,7 +423,6 @@ public CreateCall disconnectUrl(URI disconnectUrl) { * @return disconnectUrl **/ @javax.annotation.Nullable - public URI getDisconnectUrl() { return disconnectUrl; } @@ -428,7 +444,6 @@ public CreateCall disconnectMethod(CallbackMethodEnum disconnectMethod) { * @return disconnectMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getDisconnectMethod() { return disconnectMethod; } @@ -452,7 +467,6 @@ public CreateCall callTimeout(Double callTimeout) { * @return callTimeout **/ @javax.annotation.Nullable - public Double getCallTimeout() { return callTimeout; } @@ -476,7 +490,6 @@ public CreateCall callbackTimeout(Double callbackTimeout) { * @return callbackTimeout **/ @javax.annotation.Nullable - public Double getCallbackTimeout() { return callbackTimeout; } @@ -498,7 +511,6 @@ public CreateCall machineDetection(MachineDetectionConfiguration machineDetectio * @return machineDetection **/ @javax.annotation.Nullable - public MachineDetectionConfiguration getMachineDetection() { return machineDetection; } @@ -522,7 +534,6 @@ public CreateCall priority(Integer priority) { * @return priority **/ @javax.annotation.Nullable - public Integer getPriority() { return priority; } @@ -544,7 +555,6 @@ public CreateCall tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -567,6 +577,7 @@ public boolean equals(Object o) { CreateCall createCall = (CreateCall) o; return Objects.equals(this.to, createCall.to) && Objects.equals(this.from, createCall.from) && + Objects.equals(this.displayName, createCall.displayName) && Objects.equals(this.uui, createCall.uui) && Objects.equals(this.applicationId, createCall.applicationId) && Objects.equals(this.answerUrl, createCall.answerUrl) && @@ -592,7 +603,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(to, from, uui, applicationId, answerUrl, answerMethod, username, password, answerFallbackUrl, answerFallbackMethod, fallbackUsername, fallbackPassword, disconnectUrl, disconnectMethod, callTimeout, callbackTimeout, machineDetection, priority, tag); + return Objects.hash(to, from, displayName, uui, applicationId, answerUrl, answerMethod, username, password, answerFallbackUrl, answerFallbackMethod, fallbackUsername, fallbackPassword, disconnectUrl, disconnectMethod, callTimeout, callbackTimeout, machineDetection, priority, tag); } private static int hashCodeNullable(JsonNullable a) { @@ -608,6 +619,7 @@ public String toString() { sb.append("class CreateCall {\n"); sb.append(" to: ").append(toIndentedString(to)).append("\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" uui: ").append(toIndentedString(uui)).append("\n"); sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); sb.append(" answerUrl: ").append(toIndentedString(answerUrl)).append("\n"); @@ -649,6 +661,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("to"); openapiFields.add("from"); + openapiFields.add("displayName"); openapiFields.add("uui"); openapiFields.add("applicationId"); openapiFields.add("answerUrl"); @@ -676,38 +689,42 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateCall + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCall */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CreateCall.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCall` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCall` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCall.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!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())); } if (!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())); } + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } @@ -737,7 +754,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `machineDetection` if (jsonObj.get("machineDetection") != null && !jsonObj.get("machineDetection").isJsonNull()) { - MachineDetectionConfiguration.validateJsonObject(jsonObj.getAsJsonObject("machineDetection")); + MachineDetectionConfiguration.validateJsonElement(jsonObj.get("machineDetection")); } 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())); @@ -764,9 +781,9 @@ public void write(JsonWriter out, CreateCall value) throws IOException { @Override public CreateCall read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CreateCallResponse.java b/src/main/java/org/openapitools/client/model/CreateCallResponse.java index 1a1bb1cb..f6f99a11 100644 --- a/src/main/java/org/openapitools/client/model/CreateCallResponse.java +++ b/src/main/java/org/openapitools/client/model/CreateCallResponse.java @@ -14,16 +14,15 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.math.BigDecimal; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallbackMethodEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -51,7 +54,7 @@ /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -135,7 +138,7 @@ public class CreateCallResponse { public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) - private BigDecimal priority; + private Integer priority; public CreateCallResponse() { } @@ -151,7 +154,6 @@ public CreateCallResponse applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -169,11 +171,10 @@ public CreateCallResponse accountId(String accountId) { } /** - * The bandwidth account ID associated with the call + * The bandwidth account ID associated with the call. * @return accountId **/ @javax.annotation.Nonnull - public String getAccountId() { return accountId; } @@ -191,11 +192,10 @@ public CreateCallResponse callId(String callId) { } /** - * Programmable Voice API Call ID + * Programmable Voice API Call ID. * @return callId **/ @javax.annotation.Nonnull - public String getCallId() { return callId; } @@ -213,11 +213,10 @@ public CreateCallResponse to(String to) { } /** - * Recipient of the outgoing call + * Recipient of the outgoing call. * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -235,11 +234,10 @@ public CreateCallResponse from(String from) { } /** - * Phone number that created the outbound call + * Phone number that created the outbound call. * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -257,11 +255,10 @@ public CreateCallResponse enqueuedTime(OffsetDateTime enqueuedTime) { } /** - * Time the call was accepted into the queue + * The time at which the call was accepted into the queue. * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -279,11 +276,10 @@ public CreateCallResponse callUrl(URI callUrl) { } /** - * The URL to update call state + * The URL to update this call's state. * @return callUrl **/ @javax.annotation.Nonnull - public URI getCallUrl() { return callUrl; } @@ -305,7 +301,6 @@ public CreateCallResponse callTimeout(Double callTimeout) { * @return callTimeout **/ @javax.annotation.Nullable - public Double getCallTimeout() { return callTimeout; } @@ -327,7 +322,6 @@ public CreateCallResponse callbackTimeout(Double callbackTimeout) { * @return callbackTimeout **/ @javax.annotation.Nullable - public Double getCallbackTimeout() { return callbackTimeout; } @@ -345,11 +339,10 @@ public CreateCallResponse tag(String tag) { } /** - * Custom tag value + * Custom tag value. * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -371,7 +364,6 @@ public CreateCallResponse answerMethod(CallbackMethodEnum answerMethod) { * @return answerMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getAnswerMethod() { return answerMethod; } @@ -393,7 +385,6 @@ public CreateCallResponse answerUrl(URI answerUrl) { * @return answerUrl **/ @javax.annotation.Nonnull - public URI getAnswerUrl() { return answerUrl; } @@ -415,7 +406,6 @@ public CreateCallResponse answerFallbackMethod(CallbackMethodEnum answerFallback * @return answerFallbackMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getAnswerFallbackMethod() { return answerFallbackMethod; } @@ -437,7 +427,6 @@ public CreateCallResponse answerFallbackUrl(URI answerFallbackUrl) { * @return answerFallbackUrl **/ @javax.annotation.Nullable - public URI getAnswerFallbackUrl() { return answerFallbackUrl; } @@ -459,7 +448,6 @@ public CreateCallResponse disconnectMethod(CallbackMethodEnum disconnectMethod) * @return disconnectMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getDisconnectMethod() { return disconnectMethod; } @@ -481,7 +469,6 @@ public CreateCallResponse disconnectUrl(URI disconnectUrl) { * @return disconnectUrl **/ @javax.annotation.Nullable - public URI getDisconnectUrl() { return disconnectUrl; } @@ -503,7 +490,6 @@ public CreateCallResponse username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -525,7 +511,6 @@ public CreateCallResponse password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -547,7 +532,6 @@ public CreateCallResponse fallbackUsername(String fallbackUsername) { * @return fallbackUsername **/ @javax.annotation.Nullable - public String getFallbackUsername() { return fallbackUsername; } @@ -569,7 +553,6 @@ public CreateCallResponse fallbackPassword(String fallbackPassword) { * @return fallbackPassword **/ @javax.annotation.Nullable - public String getFallbackPassword() { return fallbackPassword; } @@ -580,7 +563,7 @@ public void setFallbackPassword(String fallbackPassword) { } - public CreateCallResponse priority(BigDecimal priority) { + public CreateCallResponse priority(Integer priority) { this.priority = priority; return this; @@ -591,13 +574,12 @@ public CreateCallResponse priority(BigDecimal priority) { * @return priority **/ @javax.annotation.Nullable - - public BigDecimal getPriority() { + public Integer getPriority() { return priority; } - public void setPriority(BigDecimal priority) { + public void setPriority(Integer priority) { this.priority = priority; } @@ -734,32 +716,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateCallResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCallResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateCallResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCallResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CreateCallResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCallResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCallResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCallResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -824,9 +807,9 @@ public void write(JsonWriter out, CreateCallResponse value) throws IOException { @Override public CreateCallResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CreateLookupResponse.java b/src/main/java/org/openapitools/client/model/CreateLookupResponse.java index 54ff0fcc..fbe23738 100644 --- a/src/main/java/org/openapitools/client/model/CreateLookupResponse.java +++ b/src/main/java/org/openapitools/client/model/CreateLookupResponse.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import org.openapitools.client.model.LookupStatusEnum; import com.google.gson.Gson; @@ -33,6 +33,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +51,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CreateLookupResponse { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -71,7 +75,6 @@ public CreateLookupResponse requestId(String requestId) { * @return requestId **/ @javax.annotation.Nullable - public String getRequestId() { return requestId; } @@ -93,7 +96,6 @@ public CreateLookupResponse status(LookupStatusEnum status) { * @return status **/ @javax.annotation.Nullable - public LookupStatusEnum getStatus() { return status; } @@ -159,25 +161,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateLookupResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateLookupResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CreateLookupResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateLookupResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateLookupResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -203,9 +206,9 @@ public void write(JsonWriter out, CreateLookupResponse value) throws IOException @Override public CreateLookupResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/CreateMessageRequestError.java b/src/main/java/org/openapitools/client/model/CreateMessageRequestError.java index 2d7095b1..0769022c 100644 --- a/src/main/java/org/openapitools/client/model/CreateMessageRequestError.java +++ b/src/main/java/org/openapitools/client/model/CreateMessageRequestError.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.FieldError; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,7 @@ /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -61,7 +65,7 @@ public class CreateMessageRequestError { public static final String SERIALIZED_NAME_FIELD_ERRORS = "fieldErrors"; @SerializedName(SERIALIZED_NAME_FIELD_ERRORS) - private List fieldErrors = new ArrayList<>(); + private List fieldErrors; public CreateMessageRequestError() { } @@ -77,7 +81,6 @@ public CreateMessageRequestError type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -99,7 +102,6 @@ public CreateMessageRequestError description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -129,7 +131,6 @@ public CreateMessageRequestError addFieldErrorsItem(FieldError fieldErrorsItem) * @return fieldErrors **/ @javax.annotation.Nullable - public List getFieldErrors() { return fieldErrors; } @@ -200,32 +201,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateMessageRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateMessageRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateMessageRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateMessageRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!CreateMessageRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateMessageRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateMessageRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateMessageRequestError.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -242,7 +244,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `fieldErrors` (array) for (int i = 0; i < jsonArrayfieldErrors.size(); i++) { - FieldError.validateJsonObject(jsonArrayfieldErrors.get(i).getAsJsonObject()); + FieldError.validateJsonElement(jsonArrayfieldErrors.get(i)); }; } } @@ -268,9 +270,9 @@ public void write(JsonWriter out, CreateMessageRequestError value) throws IOExce @Override public CreateMessageRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/DeferredResult.java b/src/main/java/org/openapitools/client/model/DeferredResult.java index 1db070ce..2fa8b522 100644 --- a/src/main/java/org/openapitools/client/model/DeferredResult.java +++ b/src/main/java/org/openapitools/client/model/DeferredResult.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * DeferredResult */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class DeferredResult { public static final String SERIALIZED_NAME_RESULT = "result"; @SerializedName(SERIALIZED_NAME_RESULT) @@ -70,7 +74,6 @@ public DeferredResult result(Object result) { * @return result **/ @javax.annotation.Nullable - public Object getResult() { return result; } @@ -92,7 +95,6 @@ public DeferredResult setOrExpired(Boolean setOrExpired) { * @return setOrExpired **/ @javax.annotation.Nullable - public Boolean getSetOrExpired() { return setOrExpired; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeferredResult + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeferredResult */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeferredResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeferredResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DeferredResult is not found in the empty JSON string", DeferredResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!DeferredResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeferredResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeferredResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -199,9 +202,9 @@ public void write(JsonWriter out, DeferredResult value) throws IOException { @Override public DeferredResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/DisconnectCallback.java b/src/main/java/org/openapitools/client/model/DisconnectCallback.java index a89e4d5e..d36f7120 100644 --- a/src/main/java/org/openapitools/client/model/DisconnectCallback.java +++ b/src/main/java/org/openapitools/client/model/DisconnectCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,7 @@ /** * The Disconnect event is fired when a call ends, for any reason. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -133,7 +137,6 @@ public DisconnectCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -144,7 +147,7 @@ public void setEventType(String eventType) { } - public DisconnectCallback eventTime(String eventTime) { + public DisconnectCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -155,13 +158,12 @@ public DisconnectCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -177,7 +179,6 @@ public DisconnectCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -199,7 +200,6 @@ public DisconnectCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -221,7 +221,6 @@ public DisconnectCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -243,7 +242,6 @@ public DisconnectCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -265,7 +263,6 @@ public DisconnectCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -287,7 +284,6 @@ public DisconnectCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -309,7 +305,6 @@ public DisconnectCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -331,7 +326,6 @@ public DisconnectCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -353,7 +347,6 @@ public DisconnectCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -375,7 +368,6 @@ public DisconnectCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -397,7 +389,6 @@ public DisconnectCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -419,7 +410,6 @@ public DisconnectCallback cause(String cause) { * @return cause **/ @javax.annotation.Nullable - public String getCause() { return cause; } @@ -441,7 +431,6 @@ public DisconnectCallback errorMessage(String errorMessage) { * @return errorMessage **/ @javax.annotation.Nullable - public String getErrorMessage() { return errorMessage; } @@ -463,7 +452,6 @@ public DisconnectCallback errorId(String errorId) { * @return errorId **/ @javax.annotation.Nullable - public String getErrorId() { return errorId; } @@ -485,7 +473,6 @@ public DisconnectCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -607,31 +594,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DisconnectCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DisconnectCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!DisconnectCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisconnectCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DisconnectCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -684,9 +669,9 @@ public void write(JsonWriter out, DisconnectCallback value) throws IOException { @Override public DisconnectCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Diversion.java b/src/main/java/org/openapitools/client/model/Diversion.java index e5cbaa5d..dcb7ba5c 100644 --- a/src/main/java/org/openapitools/client/model/Diversion.java +++ b/src/main/java/org/openapitools/client/model/Diversion.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) @@ -90,7 +94,6 @@ public Diversion reason(String reason) { * @return reason **/ @javax.annotation.Nullable - public String getReason() { return reason; } @@ -112,7 +115,6 @@ public Diversion privacy(String privacy) { * @return privacy **/ @javax.annotation.Nullable - public String getPrivacy() { return privacy; } @@ -134,7 +136,6 @@ public Diversion screen(String screen) { * @return screen **/ @javax.annotation.Nullable - public String getScreen() { return screen; } @@ -156,7 +157,6 @@ public Diversion counter(String counter) { * @return counter **/ @javax.annotation.Nullable - public String getCounter() { return counter; } @@ -178,7 +178,6 @@ public Diversion limit(String limit) { * @return limit **/ @javax.annotation.Nullable - public String getLimit() { return limit; } @@ -200,7 +199,6 @@ public Diversion unknown(String unknown) { * @return unknown **/ @javax.annotation.Nullable - public String getUnknown() { return unknown; } @@ -222,7 +220,6 @@ public Diversion origTo(String origTo) { * @return origTo **/ @javax.annotation.Nullable - public String getOrigTo() { return origTo; } @@ -303,25 +300,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Diversion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Diversion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Diversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Diversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Diversion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Diversion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Diversion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } @@ -365,9 +363,9 @@ public void write(JsonWriter out, Diversion value) throws IOException { @Override public Diversion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/DtmfCallback.java b/src/main/java/org/openapitools/client/model/DtmfCallback.java index 486c19b3..7200b1f0 100644 --- a/src/main/java/org/openapitools/client/model/DtmfCallback.java +++ b/src/main/java/org/openapitools/client/model/DtmfCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -133,7 +137,6 @@ public DtmfCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -144,7 +147,7 @@ public void setEventType(String eventType) { } - public DtmfCallback eventTime(String eventTime) { + public DtmfCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -155,13 +158,12 @@ public DtmfCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -177,7 +179,6 @@ public DtmfCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -199,7 +200,6 @@ public DtmfCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -221,7 +221,6 @@ public DtmfCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -243,7 +242,6 @@ public DtmfCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -265,7 +263,6 @@ public DtmfCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -287,7 +284,6 @@ public DtmfCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -309,7 +305,6 @@ public DtmfCallback digit(String digit) { * @return digit **/ @javax.annotation.Nullable - public String getDigit() { return digit; } @@ -331,7 +326,6 @@ public DtmfCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -353,7 +347,6 @@ public DtmfCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -375,7 +368,6 @@ public DtmfCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -397,7 +389,6 @@ public DtmfCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -419,7 +410,6 @@ public DtmfCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -441,7 +431,6 @@ public DtmfCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -463,7 +452,6 @@ public DtmfCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -485,7 +473,6 @@ public DtmfCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -607,31 +594,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DtmfCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DtmfCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DtmfCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DtmfCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!DtmfCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DtmfCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DtmfCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -687,9 +672,9 @@ public void write(JsonWriter out, DtmfCallback value) throws IOException { @Override public DtmfCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/FieldError.java b/src/main/java/org/openapitools/client/model/FieldError.java index e904aa75..52969146 100644 --- a/src/main/java/org/openapitools/client/model/FieldError.java +++ b/src/main/java/org/openapitools/client/model/FieldError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @@ -70,7 +74,6 @@ public FieldError fieldName(String fieldName) { * @return fieldName **/ @javax.annotation.Nullable - public String getFieldName() { return fieldName; } @@ -92,7 +95,6 @@ public FieldError description(String description) { * @return description **/ @javax.annotation.Nullable - public String getDescription() { return description; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FieldError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FieldError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FieldError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FieldError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!FieldError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FieldError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FieldError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fieldName") != null && !jsonObj.get("fieldName").isJsonNull()) && !jsonObj.get("fieldName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); } @@ -205,9 +208,9 @@ public void write(JsonWriter out, FieldError value) throws IOException { @Override public FieldError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/FileFormatEnum.java b/src/main/java/org/openapitools/client/model/FileFormatEnum.java index 584d73e3..03a9470b 100644 --- a/src/main/java/org/openapitools/client/model/FileFormatEnum.java +++ b/src/main/java/org/openapitools/client/model/FileFormatEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; @@ -24,7 +23,7 @@ import com.google.gson.stream.JsonWriter; /** - * The format that the recording is stored in + * The format that the recording is stored in. */ @JsonAdapter(FileFormatEnum.Adapter.class) public enum FileFormatEnum { diff --git a/src/main/java/org/openapitools/client/model/GatherCallback.java b/src/main/java/org/openapitools/client/model/GatherCallback.java index b2de808a..1d9f8c11 100644 --- a/src/main/java/org/openapitools/client/model/GatherCallback.java +++ b/src/main/java/org/openapitools/client/model/GatherCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -137,7 +141,6 @@ public GatherCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -148,7 +151,7 @@ public void setEventType(String eventType) { } - public GatherCallback eventTime(String eventTime) { + public GatherCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -159,13 +162,12 @@ public GatherCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -181,7 +183,6 @@ public GatherCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -203,7 +204,6 @@ public GatherCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -225,7 +225,6 @@ public GatherCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -247,7 +246,6 @@ public GatherCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -269,7 +267,6 @@ public GatherCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -291,7 +288,6 @@ public GatherCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -313,7 +309,6 @@ public GatherCallback digits(String digits) { * @return digits **/ @javax.annotation.Nullable - public String getDigits() { return digits; } @@ -335,7 +330,6 @@ public GatherCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -357,7 +351,6 @@ public GatherCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -379,7 +372,6 @@ public GatherCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -401,7 +393,6 @@ public GatherCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -423,7 +414,6 @@ public GatherCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -445,7 +435,6 @@ public GatherCallback terminatingDigit(String terminatingDigit) { * @return terminatingDigit **/ @javax.annotation.Nullable - public String getTerminatingDigit() { return terminatingDigit; } @@ -467,7 +456,6 @@ public GatherCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -489,7 +477,6 @@ public GatherCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -511,7 +498,6 @@ public GatherCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -636,31 +622,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GatherCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GatherCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GatherCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GatherCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!GatherCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GatherCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GatherCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -719,9 +703,9 @@ public void write(JsonWriter out, GatherCallback value) throws IOException { @Override public GatherCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/InboundMessageCallback.java b/src/main/java/org/openapitools/client/model/InboundMessageCallback.java index 4dfb8dfa..708e9ea5 100644 --- a/src/main/java/org/openapitools/client/model/InboundMessageCallback.java +++ b/src/main/java/org/openapitools/client/model/InboundMessageCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.InboundMessageCallbackMessage; import com.google.gson.Gson; @@ -34,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,7 +52,7 @@ /** * Inbound Message Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class InboundMessageCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -84,7 +88,6 @@ public InboundMessageCallback time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -106,7 +109,6 @@ public InboundMessageCallback type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -128,7 +130,6 @@ public InboundMessageCallback to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -150,7 +151,6 @@ public InboundMessageCallback description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -172,7 +172,6 @@ public InboundMessageCallback message(InboundMessageCallbackMessage message) { * @return message **/ @javax.annotation.Nonnull - public InboundMessageCallbackMessage getMessage() { return message; } @@ -252,32 +251,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InboundMessageCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InboundMessageCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InboundMessageCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InboundMessageCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InboundMessageCallback is not found in the empty JSON string", InboundMessageCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!InboundMessageCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InboundMessageCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InboundMessageCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundMessageCallback.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -288,7 +288,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` - InboundMessageCallbackMessage.validateJsonObject(jsonObj.getAsJsonObject("message")); + InboundMessageCallbackMessage.validateJsonElement(jsonObj.get("message")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -311,9 +311,9 @@ public void write(JsonWriter out, InboundMessageCallback value) throws IOExcepti @Override public InboundMessageCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/InboundMessageCallbackMessage.java b/src/main/java/org/openapitools/client/model/InboundMessageCallbackMessage.java index 76439be0..9e527f8f 100644 --- a/src/main/java/org/openapitools/client/model/InboundMessageCallbackMessage.java +++ b/src/main/java/org/openapitools/client/model/InboundMessageCallbackMessage.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +23,7 @@ import java.net.URI; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,6 +40,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,9 +56,9 @@ import org.openapitools.client.JSON; /** - * InboundMessageCallbackMessage + * Inbound Message Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class InboundMessageCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -98,7 +102,7 @@ public class InboundMessageCallbackMessage { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) - private List media = new ArrayList<>(); + private List media; public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) @@ -118,7 +122,6 @@ public InboundMessageCallbackMessage id(String id) { * @return id **/ @javax.annotation.Nonnull - public String getId() { return id; } @@ -140,7 +143,6 @@ public InboundMessageCallbackMessage owner(String owner) { * @return owner **/ @javax.annotation.Nonnull - public String getOwner() { return owner; } @@ -162,7 +164,6 @@ public InboundMessageCallbackMessage applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -184,7 +185,6 @@ public InboundMessageCallbackMessage time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -206,7 +206,6 @@ public InboundMessageCallbackMessage segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nonnull - public Integer getSegmentCount() { return segmentCount; } @@ -228,7 +227,6 @@ public InboundMessageCallbackMessage direction(MessageDirectionEnum direction) { * @return direction **/ @javax.annotation.Nonnull - public MessageDirectionEnum getDirection() { return direction; } @@ -246,6 +244,9 @@ public InboundMessageCallbackMessage to(Set to) { } public InboundMessageCallbackMessage addToItem(String toItem) { + if (this.to == null) { + this.to = new LinkedHashSet<>(); + } this.to.add(toItem); return this; } @@ -255,7 +256,6 @@ public InboundMessageCallbackMessage addToItem(String toItem) { * @return to **/ @javax.annotation.Nonnull - public Set getTo() { return to; } @@ -277,7 +277,6 @@ public InboundMessageCallbackMessage from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -299,7 +298,6 @@ public InboundMessageCallbackMessage text(String text) { * @return text **/ @javax.annotation.Nonnull - public String getText() { return text; } @@ -321,7 +319,6 @@ public InboundMessageCallbackMessage tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -351,7 +348,6 @@ public InboundMessageCallbackMessage addMediaItem(URI mediaItem) { * @return media **/ @javax.annotation.Nullable - public List getMedia() { return media; } @@ -373,7 +369,6 @@ public InboundMessageCallbackMessage priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nullable - public PriorityEnum getPriority() { return priority; } @@ -478,32 +473,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InboundMessageCallbackMessage + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InboundMessageCallbackMessage */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InboundMessageCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InboundMessageCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InboundMessageCallbackMessage is not found in the empty JSON string", InboundMessageCallbackMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!InboundMessageCallbackMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InboundMessageCallbackMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InboundMessageCallbackMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundMessageCallbackMessage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -529,7 +525,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } // ensure the optional json data is an array if present - if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonArray()) { + 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())); } } @@ -554,9 +550,9 @@ public void write(JsonWriter out, InboundMessageCallbackMessage value) throws IO @Override public InboundMessageCallbackMessage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/InitiateCallback.java b/src/main/java/org/openapitools/client/model/InitiateCallback.java index ed6a3921..193d9044 100644 --- a/src/main/java/org/openapitools/client/model/InitiateCallback.java +++ b/src/main/java/org/openapitools/client/model/InitiateCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.client.model.Diversion; import org.openapitools.client.model.StirShaken; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -58,7 +62,7 @@ public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -114,7 +118,6 @@ public InitiateCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -125,7 +128,7 @@ public void setEventType(String eventType) { } - public InitiateCallback eventTime(String eventTime) { + public InitiateCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -136,13 +139,12 @@ public InitiateCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -158,7 +160,6 @@ public InitiateCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -180,7 +181,6 @@ public InitiateCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -202,7 +202,6 @@ public InitiateCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -224,7 +223,6 @@ public InitiateCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -246,7 +244,6 @@ public InitiateCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -268,7 +265,6 @@ public InitiateCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -290,7 +286,6 @@ public InitiateCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -312,7 +307,6 @@ public InitiateCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -334,7 +328,6 @@ public InitiateCallback diversion(Diversion diversion) { * @return diversion **/ @javax.annotation.Nullable - public Diversion getDiversion() { return diversion; } @@ -356,7 +349,6 @@ public InitiateCallback stirShaken(StirShaken stirShaken) { * @return stirShaken **/ @javax.annotation.Nullable - public StirShaken getStirShaken() { return stirShaken; } @@ -452,31 +444,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InitiateCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InitiateCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InitiateCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InitiateCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!InitiateCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InitiateCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InitiateCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -497,11 +487,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `diversion` if (jsonObj.get("diversion") != null && !jsonObj.get("diversion").isJsonNull()) { - Diversion.validateJsonObject(jsonObj.getAsJsonObject("diversion")); + Diversion.validateJsonElement(jsonObj.get("diversion")); } // validate the optional field `stirShaken` if (jsonObj.get("stirShaken") != null && !jsonObj.get("stirShaken").isJsonNull()) { - StirShaken.validateJsonObject(jsonObj.getAsJsonObject("stirShaken")); + StirShaken.validateJsonElement(jsonObj.get("stirShaken")); } } @@ -525,9 +515,9 @@ public void write(JsonWriter out, InitiateCallback value) throws IOException { @Override public InitiateCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/ListMessageDirectionEnum.java b/src/main/java/org/openapitools/client/model/ListMessageDirectionEnum.java index f66b6b55..b3f72267 100644 --- a/src/main/java/org/openapitools/client/model/ListMessageDirectionEnum.java +++ b/src/main/java/org/openapitools/client/model/ListMessageDirectionEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/ListMessageItem.java b/src/main/java/org/openapitools/client/model/ListMessageItem.java index 8d1db552..718fd3af 100644 --- a/src/main/java/org/openapitools/client/model/ListMessageItem.java +++ b/src/main/java/org/openapitools/client/model/ListMessageItem.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.ListMessageDirectionEnum; import org.openapitools.client.model.MessageStatusEnum; import org.openapitools.client.model.MessageTypeEnum; @@ -36,6 +37,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +55,7 @@ /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -90,7 +95,7 @@ public class ListMessageItem { public static final String SERIALIZED_NAME_RECEIVE_TIME = "receiveTime"; @SerializedName(SERIALIZED_NAME_RECEIVE_TIME) - private String receiveTime; + private OffsetDateTime receiveTime; public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; @SerializedName(SERIALIZED_NAME_CARRIER_NAME) @@ -116,6 +121,10 @@ public class ListMessageItem { @SerializedName(SERIALIZED_NAME_CAMPAIGN_CLASS) private String campaignClass; + public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId"; + @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID) + private String campaignId; + public ListMessageItem() { } @@ -130,7 +139,6 @@ public ListMessageItem messageId(String messageId) { * @return messageId **/ @javax.annotation.Nullable - public String getMessageId() { return messageId; } @@ -152,7 +160,6 @@ public ListMessageItem accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -174,7 +181,6 @@ public ListMessageItem sourceTn(String sourceTn) { * @return sourceTn **/ @javax.annotation.Nullable - public String getSourceTn() { return sourceTn; } @@ -196,7 +202,6 @@ public ListMessageItem destinationTn(String destinationTn) { * @return destinationTn **/ @javax.annotation.Nullable - public String getDestinationTn() { return destinationTn; } @@ -218,7 +223,6 @@ public ListMessageItem messageStatus(MessageStatusEnum messageStatus) { * @return messageStatus **/ @javax.annotation.Nullable - public MessageStatusEnum getMessageStatus() { return messageStatus; } @@ -240,7 +244,6 @@ public ListMessageItem messageDirection(ListMessageDirectionEnum messageDirectio * @return messageDirection **/ @javax.annotation.Nullable - public ListMessageDirectionEnum getMessageDirection() { return messageDirection; } @@ -262,7 +265,6 @@ public ListMessageItem messageType(MessageTypeEnum messageType) { * @return messageType **/ @javax.annotation.Nullable - public MessageTypeEnum getMessageType() { return messageType; } @@ -284,7 +286,6 @@ public ListMessageItem segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nullable - public Integer getSegmentCount() { return segmentCount; } @@ -306,7 +307,6 @@ public ListMessageItem errorCode(Integer errorCode) { * @return errorCode **/ @javax.annotation.Nullable - public Integer getErrorCode() { return errorCode; } @@ -317,7 +317,7 @@ public void setErrorCode(Integer errorCode) { } - public ListMessageItem receiveTime(String receiveTime) { + public ListMessageItem receiveTime(OffsetDateTime receiveTime) { this.receiveTime = receiveTime; return this; @@ -328,13 +328,12 @@ public ListMessageItem receiveTime(String receiveTime) { * @return receiveTime **/ @javax.annotation.Nullable - - public String getReceiveTime() { + public OffsetDateTime getReceiveTime() { return receiveTime; } - public void setReceiveTime(String receiveTime) { + public void setReceiveTime(OffsetDateTime receiveTime) { this.receiveTime = receiveTime; } @@ -350,7 +349,6 @@ public ListMessageItem carrierName(String carrierName) { * @return carrierName **/ @javax.annotation.Nullable - public String getCarrierName() { return carrierName; } @@ -372,7 +370,6 @@ public ListMessageItem messageSize(Integer messageSize) { * @return messageSize **/ @javax.annotation.Nullable - public Integer getMessageSize() { return messageSize; } @@ -394,7 +391,6 @@ public ListMessageItem messageLength(Integer messageLength) { * @return messageLength **/ @javax.annotation.Nullable - public Integer getMessageLength() { return messageLength; } @@ -416,7 +412,6 @@ public ListMessageItem attachmentCount(Integer attachmentCount) { * @return attachmentCount **/ @javax.annotation.Nullable - public Integer getAttachmentCount() { return attachmentCount; } @@ -438,7 +433,6 @@ public ListMessageItem recipientCount(Integer recipientCount) { * @return recipientCount **/ @javax.annotation.Nullable - public Integer getRecipientCount() { return recipientCount; } @@ -460,7 +454,6 @@ public ListMessageItem campaignClass(String campaignClass) { * @return campaignClass **/ @javax.annotation.Nullable - public String getCampaignClass() { return campaignClass; } @@ -471,6 +464,27 @@ public void setCampaignClass(String campaignClass) { } + public ListMessageItem campaignId(String campaignId) { + + this.campaignId = campaignId; + return this; + } + + /** + * The campaign ID of the message if it has one. + * @return campaignId + **/ + @javax.annotation.Nullable + public String getCampaignId() { + return campaignId; + } + + + public void setCampaignId(String campaignId) { + this.campaignId = campaignId; + } + + @Override public boolean equals(Object o) { @@ -496,7 +510,8 @@ public boolean equals(Object o) { Objects.equals(this.messageLength, listMessageItem.messageLength) && Objects.equals(this.attachmentCount, listMessageItem.attachmentCount) && Objects.equals(this.recipientCount, listMessageItem.recipientCount) && - Objects.equals(this.campaignClass, listMessageItem.campaignClass); + Objects.equals(this.campaignClass, listMessageItem.campaignClass) && + Objects.equals(this.campaignId, listMessageItem.campaignId); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -505,7 +520,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(messageId, accountId, sourceTn, destinationTn, messageStatus, messageDirection, messageType, segmentCount, errorCode, receiveTime, carrierName, messageSize, messageLength, attachmentCount, recipientCount, campaignClass); + return Objects.hash(messageId, accountId, sourceTn, destinationTn, messageStatus, messageDirection, messageType, segmentCount, errorCode, receiveTime, carrierName, messageSize, messageLength, attachmentCount, recipientCount, campaignClass, campaignId); } private static int hashCodeNullable(JsonNullable a) { @@ -535,6 +550,7 @@ public String toString() { sb.append(" attachmentCount: ").append(toIndentedString(attachmentCount)).append("\n"); sb.append(" recipientCount: ").append(toIndentedString(recipientCount)).append("\n"); sb.append(" campaignClass: ").append(toIndentedString(campaignClass)).append("\n"); + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -573,31 +589,33 @@ private String toIndentedString(Object o) { openapiFields.add("attachmentCount"); openapiFields.add("recipientCount"); openapiFields.add("campaignClass"); + openapiFields.add("campaignId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ListMessageItem + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ListMessageItem */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ListMessageItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListMessageItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!ListMessageItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListMessageItem` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListMessageItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } @@ -610,15 +628,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } - if ((jsonObj.get("receiveTime") != null && !jsonObj.get("receiveTime").isJsonNull()) && !jsonObj.get("receiveTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiveTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiveTime").toString())); - } 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())); } if ((jsonObj.get("campaignClass") != null && !jsonObj.get("campaignClass").isJsonNull()) && !jsonObj.get("campaignClass").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); } + if ((jsonObj.get("campaignId") != null && !jsonObj.get("campaignId").isJsonNull()) && !jsonObj.get("campaignId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -641,9 +659,9 @@ public void write(JsonWriter out, ListMessageItem value) throws IOException { @Override public ListMessageItem read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/LookupRequest.java b/src/main/java/org/openapitools/client/model/LookupRequest.java index 84b9eba7..c2ecc74d 100644 --- a/src/main/java/org/openapitools/client/model/LookupRequest.java +++ b/src/main/java/org/openapitools/client/model/LookupRequest.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -34,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,7 +52,7 @@ /** * Create phone number lookup request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class LookupRequest { public static final String SERIALIZED_NAME_TNS = "tns"; @SerializedName(SERIALIZED_NAME_TNS) @@ -64,6 +68,9 @@ public LookupRequest tns(List tns) { } public LookupRequest addTnsItem(String tnsItem) { + if (this.tns == null) { + this.tns = new ArrayList<>(); + } this.tns.add(tnsItem); return this; } @@ -73,7 +80,6 @@ public LookupRequest addTnsItem(String tnsItem) { * @return tns **/ @javax.annotation.Nonnull - public List getTns() { return tns; } @@ -137,32 +143,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LookupRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!LookupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LookupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("tns") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -191,9 +198,9 @@ public void write(JsonWriter out, LookupRequest value) throws IOException { @Override public LookupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/LookupResult.java b/src/main/java/org/openapitools/client/model/LookupResult.java index 2ba456b7..940cf293 100644 --- a/src/main/java/org/openapitools/client/model/LookupResult.java +++ b/src/main/java/org/openapitools/client/model/LookupResult.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class LookupResult { public static final String SERIALIZED_NAME_RESPONSE_CODE = "Response Code"; @SerializedName(SERIALIZED_NAME_RESPONSE_CODE) @@ -98,7 +102,6 @@ public LookupResult responseCode(Integer responseCode) { * @return responseCode **/ @javax.annotation.Nullable - public Integer getResponseCode() { return responseCode; } @@ -120,7 +123,6 @@ public LookupResult message(String message) { * @return message **/ @javax.annotation.Nullable - public String getMessage() { return message; } @@ -142,7 +144,6 @@ public LookupResult e164Format(String e164Format) { * @return e164Format **/ @javax.annotation.Nullable - public String getE164Format() { return e164Format; } @@ -164,7 +165,6 @@ public LookupResult formatted(String formatted) { * @return formatted **/ @javax.annotation.Nullable - public String getFormatted() { return formatted; } @@ -186,7 +186,6 @@ public LookupResult country(String country) { * @return country **/ @javax.annotation.Nullable - public String getCountry() { return country; } @@ -208,7 +207,6 @@ public LookupResult lineType(String lineType) { * @return lineType **/ @javax.annotation.Nullable - public String getLineType() { return lineType; } @@ -230,7 +228,6 @@ public LookupResult lineProvider(String lineProvider) { * @return lineProvider **/ @javax.annotation.Nullable - public String getLineProvider() { return lineProvider; } @@ -252,7 +249,6 @@ public LookupResult mobileCountryCode(String mobileCountryCode) { * @return mobileCountryCode **/ @javax.annotation.Nullable - public String getMobileCountryCode() { return mobileCountryCode; } @@ -274,7 +270,6 @@ public LookupResult mobileNetworkCode(String mobileNetworkCode) { * @return mobileNetworkCode **/ @javax.annotation.Nullable - public String getMobileNetworkCode() { return mobileNetworkCode; } @@ -361,25 +356,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LookupResult + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupResult */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LookupResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LookupResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!LookupResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("Message") != null && !jsonObj.get("Message").isJsonNull()) && !jsonObj.get("Message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `Message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Message").toString())); } @@ -426,9 +422,9 @@ public void write(JsonWriter out, LookupResult value) throws IOException { @Override public LookupResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/LookupStatus.java b/src/main/java/org/openapitools/client/model/LookupStatus.java index b2c17c3f..d790f45d 100644 --- a/src/main/java/org/openapitools/client/model/LookupStatus.java +++ b/src/main/java/org/openapitools/client/model/LookupStatus.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.LookupResult; import org.openapitools.client.model.LookupStatusEnum; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class LookupStatus { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -62,11 +66,11 @@ public class LookupStatus { public static final String SERIALIZED_NAME_RESULT = "result"; @SerializedName(SERIALIZED_NAME_RESULT) - private List result = new ArrayList<>(); + private List result; public static final String SERIALIZED_NAME_FAILED_TELEPHONE_NUMBERS = "failedTelephoneNumbers"; @SerializedName(SERIALIZED_NAME_FAILED_TELEPHONE_NUMBERS) - private List failedTelephoneNumbers = new ArrayList<>(); + private List failedTelephoneNumbers; public LookupStatus() { } @@ -82,7 +86,6 @@ public LookupStatus requestId(String requestId) { * @return requestId **/ @javax.annotation.Nullable - public String getRequestId() { return requestId; } @@ -104,7 +107,6 @@ public LookupStatus status(LookupStatusEnum status) { * @return status **/ @javax.annotation.Nullable - public LookupStatusEnum getStatus() { return status; } @@ -134,7 +136,6 @@ public LookupStatus addResultItem(LookupResult resultItem) { * @return result **/ @javax.annotation.Nullable - public List getResult() { return result; } @@ -164,7 +165,6 @@ public LookupStatus addFailedTelephoneNumbersItem(String failedTelephoneNumbersI * @return failedTelephoneNumbers **/ @javax.annotation.Nullable - public List getFailedTelephoneNumbers() { return failedTelephoneNumbers; } @@ -236,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LookupStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LookupStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LookupStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!LookupStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LookupStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -268,12 +269,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `result` (array) for (int i = 0; i < jsonArrayresult.size(); i++) { - LookupResult.validateJsonObject(jsonArrayresult.get(i).getAsJsonObject()); + LookupResult.validateJsonElement(jsonArrayresult.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("failedTelephoneNumbers") != null && !jsonObj.get("failedTelephoneNumbers").isJsonArray()) { + if (jsonObj.get("failedTelephoneNumbers") != null && !jsonObj.get("failedTelephoneNumbers").isJsonNull() && !jsonObj.get("failedTelephoneNumbers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); } } @@ -298,9 +299,9 @@ public void write(JsonWriter out, LookupStatus value) throws IOException { @Override public LookupStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/LookupStatusEnum.java b/src/main/java/org/openapitools/client/model/LookupStatusEnum.java index 865a311b..7ea9d1fa 100644 --- a/src/main/java/org/openapitools/client/model/LookupStatusEnum.java +++ b/src/main/java/org/openapitools/client/model/LookupStatusEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/MachineDetectionCompleteCallback.java b/src/main/java/org/openapitools/client/model/MachineDetectionCompleteCallback.java index 69aeb028..9c6215b0 100644 --- a/src/main/java/org/openapitools/client/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/org/openapitools/client/model/MachineDetectionCompleteCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,7 +21,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; +import org.openapitools.client.model.MachineDetectionResult; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +62,7 @@ public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -105,7 +110,7 @@ public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_MACHINE_DETECTION_RESULT = "machineDetectionResult"; @SerializedName(SERIALIZED_NAME_MACHINE_DETECTION_RESULT) - private String machineDetectionResult; + private MachineDetectionResult machineDetectionResult; public MachineDetectionCompleteCallback() { } @@ -121,7 +126,6 @@ public MachineDetectionCompleteCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -132,7 +136,7 @@ public void setEventType(String eventType) { } - public MachineDetectionCompleteCallback eventTime(String eventTime) { + public MachineDetectionCompleteCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -143,13 +147,12 @@ public MachineDetectionCompleteCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -165,7 +168,6 @@ public MachineDetectionCompleteCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -187,7 +189,6 @@ public MachineDetectionCompleteCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -209,7 +210,6 @@ public MachineDetectionCompleteCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -231,7 +231,6 @@ public MachineDetectionCompleteCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -253,7 +252,6 @@ public MachineDetectionCompleteCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -275,7 +273,6 @@ public MachineDetectionCompleteCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -297,7 +294,6 @@ public MachineDetectionCompleteCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -319,7 +315,6 @@ public MachineDetectionCompleteCallback enqueuedTime(OffsetDateTime enqueuedTime * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -341,7 +336,6 @@ public MachineDetectionCompleteCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -363,7 +357,6 @@ public MachineDetectionCompleteCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -385,7 +378,6 @@ public MachineDetectionCompleteCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -396,24 +388,23 @@ public void setTag(String tag) { } - public MachineDetectionCompleteCallback machineDetectionResult(String machineDetectionResult) { + public MachineDetectionCompleteCallback machineDetectionResult(MachineDetectionResult machineDetectionResult) { this.machineDetectionResult = machineDetectionResult; return this; } /** - * (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 + * Get machineDetectionResult * @return machineDetectionResult **/ @javax.annotation.Nullable - - public String getMachineDetectionResult() { + public MachineDetectionResult getMachineDetectionResult() { return machineDetectionResult; } - public void setMachineDetectionResult(String machineDetectionResult) { + public void setMachineDetectionResult(MachineDetectionResult machineDetectionResult) { this.machineDetectionResult = machineDetectionResult; } @@ -520,31 +511,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MachineDetectionCompleteCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MachineDetectionCompleteCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MachineDetectionCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MachineDetectionCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MachineDetectionCompleteCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MachineDetectionCompleteCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MachineDetectionCompleteCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -566,8 +555,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } - if ((jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) && !jsonObj.get("machineDetectionResult").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `machineDetectionResult` to be a primitive type in the JSON string but got `%s`", jsonObj.get("machineDetectionResult").toString())); + // validate the optional field `machineDetectionResult` + if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { + MachineDetectionResult.validateJsonElement(jsonObj.get("machineDetectionResult")); } } @@ -591,9 +581,9 @@ public void write(JsonWriter out, MachineDetectionCompleteCallback value) throws @Override public MachineDetectionCompleteCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MachineDetectionConfiguration.java b/src/main/java/org/openapitools/client/model/MachineDetectionConfiguration.java index 3c7ff233..f4e56cb2 100644 --- a/src/main/java/org/openapitools/client/model/MachineDetectionConfiguration.java +++ b/src/main/java/org/openapitools/client/model/MachineDetectionConfiguration.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import org.openapitools.client.model.CallbackMethodEnum; import org.openapitools.client.model.MachineDetectionModeEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -126,7 +130,6 @@ public MachineDetectionConfiguration mode(MachineDetectionModeEnum mode) { * @return mode **/ @javax.annotation.Nullable - public MachineDetectionModeEnum getMode() { return mode; } @@ -148,7 +151,6 @@ public MachineDetectionConfiguration detectionTimeout(Double detectionTimeout) { * @return detectionTimeout **/ @javax.annotation.Nullable - public Double getDetectionTimeout() { return detectionTimeout; } @@ -170,7 +172,6 @@ public MachineDetectionConfiguration silenceTimeout(Double silenceTimeout) { * @return silenceTimeout **/ @javax.annotation.Nullable - public Double getSilenceTimeout() { return silenceTimeout; } @@ -192,7 +193,6 @@ public MachineDetectionConfiguration speechThreshold(Double speechThreshold) { * @return speechThreshold **/ @javax.annotation.Nullable - public Double getSpeechThreshold() { return speechThreshold; } @@ -214,7 +214,6 @@ public MachineDetectionConfiguration speechEndThreshold(Double speechEndThreshol * @return speechEndThreshold **/ @javax.annotation.Nullable - public Double getSpeechEndThreshold() { return speechEndThreshold; } @@ -236,7 +235,6 @@ public MachineDetectionConfiguration machineSpeechEndThreshold(Double machineSpe * @return machineSpeechEndThreshold **/ @javax.annotation.Nullable - public Double getMachineSpeechEndThreshold() { return machineSpeechEndThreshold; } @@ -258,7 +256,6 @@ public MachineDetectionConfiguration delayResult(Boolean delayResult) { * @return delayResult **/ @javax.annotation.Nullable - public Boolean getDelayResult() { return delayResult; } @@ -280,7 +277,6 @@ public MachineDetectionConfiguration callbackUrl(URI callbackUrl) { * @return callbackUrl **/ @javax.annotation.Nullable - public URI getCallbackUrl() { return callbackUrl; } @@ -302,7 +298,6 @@ public MachineDetectionConfiguration callbackMethod(CallbackMethodEnum callbackM * @return callbackMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getCallbackMethod() { return callbackMethod; } @@ -324,7 +319,6 @@ public MachineDetectionConfiguration username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -346,7 +340,6 @@ public MachineDetectionConfiguration password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -368,7 +361,6 @@ public MachineDetectionConfiguration fallbackUrl(URI fallbackUrl) { * @return fallbackUrl **/ @javax.annotation.Nullable - public URI getFallbackUrl() { return fallbackUrl; } @@ -390,7 +382,6 @@ public MachineDetectionConfiguration fallbackMethod(CallbackMethodEnum fallbackM * @return fallbackMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getFallbackMethod() { return fallbackMethod; } @@ -412,7 +403,6 @@ public MachineDetectionConfiguration fallbackUsername(String fallbackUsername) { * @return fallbackUsername **/ @javax.annotation.Nullable - public String getFallbackUsername() { return fallbackUsername; } @@ -434,7 +424,6 @@ public MachineDetectionConfiguration fallbackPassword(String fallbackPassword) { * @return fallbackPassword **/ @javax.annotation.Nullable - public String getFallbackPassword() { return fallbackPassword; } @@ -550,25 +539,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MachineDetectionConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MachineDetectionConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MachineDetectionConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MachineDetectionConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MachineDetectionConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MachineDetectionConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MachineDetectionConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -609,9 +599,9 @@ public void write(JsonWriter out, MachineDetectionConfiguration value) throws IO @Override public MachineDetectionConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MachineDetectionModeEnum.java b/src/main/java/org/openapitools/client/model/MachineDetectionModeEnum.java index 9ae5c16b..d2baa323 100644 --- a/src/main/java/org/openapitools/client/model/MachineDetectionModeEnum.java +++ b/src/main/java/org/openapitools/client/model/MachineDetectionModeEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/MachineDetectionResult.java b/src/main/java/org/openapitools/client/model/MachineDetectionResult.java new file mode 100644 index 00000000..d3ee1827 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/MachineDetectionResult.java @@ -0,0 +1,240 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * (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-08-25T14:55:39.427023-04:00[America/New_York]") +public class MachineDetectionResult { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private String duration; + + public MachineDetectionResult() { + } + + public MachineDetectionResult value(String value) { + + this.value = value; + return this; + } + + /** + * Possible values are answering-machine, human, silence, timeout, or error. + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + + public MachineDetectionResult duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * The amount of time it took to determine the result. + * @return duration + **/ + @javax.annotation.Nullable + public String getDuration() { + return duration; + } + + + public void setDuration(String duration) { + this.duration = duration; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MachineDetectionResult machineDetectionResult = (MachineDetectionResult) o; + return Objects.equals(this.value, machineDetectionResult.value) && + Objects.equals(this.duration, machineDetectionResult.duration); + } + + @Override + public int hashCode() { + return Objects.hash(value, duration); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MachineDetectionResult {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("duration"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MachineDetectionResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MachineDetectionResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!MachineDetectionResult.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MachineDetectionResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MachineDetectionResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MachineDetectionResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MachineDetectionResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MachineDetectionResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MachineDetectionResult read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MachineDetectionResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of MachineDetectionResult + * @throws IOException if the JSON string is invalid with respect to MachineDetectionResult + */ + public static MachineDetectionResult fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MachineDetectionResult.class); + } + + /** + * Convert an instance of MachineDetectionResult to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/Media.java b/src/main/java/org/openapitools/client/model/Media.java index ac93d066..3ffefb17 100644 --- a/src/main/java/org/openapitools/client/model/Media.java +++ b/src/main/java/org/openapitools/client/model/Media.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -74,7 +78,6 @@ public Media content(String content) { * @return content **/ @javax.annotation.Nullable - public String getContent() { return content; } @@ -96,7 +99,6 @@ public Media contentLength(Integer contentLength) { * @return contentLength **/ @javax.annotation.Nullable - public Integer getContentLength() { return contentLength; } @@ -118,7 +120,6 @@ public Media mediaName(String mediaName) { * @return mediaName **/ @javax.annotation.Nullable - public String getMediaName() { return mediaName; } @@ -187,25 +188,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Media + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Media */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Media.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Media.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Media.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Media` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Media` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) && !jsonObj.get("content").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); } @@ -234,9 +236,9 @@ public void write(JsonWriter out, Media value) throws IOException { @Override public Media read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Message.java b/src/main/java/org/openapitools/client/model/Message.java index bfca3954..e245512d 100644 --- a/src/main/java/org/openapitools/client/model/Message.java +++ b/src/main/java/org/openapitools/client/model/Message.java @@ -14,13 +14,14 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; import org.openapitools.client.model.MessageDirectionEnum; @@ -36,6 +37,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +55,7 @@ /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -66,7 +71,7 @@ public class Message { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) - private String time; + private OffsetDateTime time; public static final String SERIALIZED_NAME_SEGMENT_COUNT = "segmentCount"; @SerializedName(SERIALIZED_NAME_SEGMENT_COUNT) @@ -78,7 +83,7 @@ public class Message { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) - private Set to = new LinkedHashSet<>(); + private Set to; public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -86,7 +91,7 @@ public class Message { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) - private Set media = new LinkedHashSet<>(); + private Set media; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -100,6 +105,10 @@ public class Message { @SerializedName(SERIALIZED_NAME_PRIORITY) private PriorityEnum priority; + public static final String SERIALIZED_NAME_EXPIRATION = "expiration"; + @SerializedName(SERIALIZED_NAME_EXPIRATION) + private OffsetDateTime expiration; + public Message() { } @@ -114,7 +123,6 @@ public Message id(String id) { * @return id **/ @javax.annotation.Nullable - public String getId() { return id; } @@ -136,7 +144,6 @@ public Message owner(String owner) { * @return owner **/ @javax.annotation.Nullable - public String getOwner() { return owner; } @@ -158,7 +165,6 @@ public Message applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -169,7 +175,7 @@ public void setApplicationId(String applicationId) { } - public Message time(String time) { + public Message time(OffsetDateTime time) { this.time = time; return this; @@ -180,13 +186,12 @@ public Message time(String time) { * @return time **/ @javax.annotation.Nullable - - public String getTime() { + public OffsetDateTime getTime() { return time; } - public void setTime(String time) { + public void setTime(OffsetDateTime time) { this.time = time; } @@ -202,7 +207,6 @@ public Message segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nullable - public Integer getSegmentCount() { return segmentCount; } @@ -224,7 +228,6 @@ public Message direction(MessageDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public MessageDirectionEnum getDirection() { return direction; } @@ -254,7 +257,6 @@ public Message addToItem(String toItem) { * @return to **/ @javax.annotation.Nullable - public Set getTo() { return to; } @@ -276,7 +278,6 @@ public Message from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -306,7 +307,6 @@ public Message addMediaItem(String mediaItem) { * @return media **/ @javax.annotation.Nullable - public Set getMedia() { return media; } @@ -328,7 +328,6 @@ public Message text(String text) { * @return text **/ @javax.annotation.Nullable - public String getText() { return text; } @@ -350,7 +349,6 @@ public Message tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -372,7 +370,6 @@ public Message priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nullable - public PriorityEnum getPriority() { return priority; } @@ -383,6 +380,27 @@ public void setPriority(PriorityEnum priority) { } + public Message expiration(OffsetDateTime expiration) { + + this.expiration = expiration; + return this; + } + + /** + * The expiration date-time set by the user. + * @return expiration + **/ + @javax.annotation.Nullable + public OffsetDateTime getExpiration() { + return expiration; + } + + + public void setExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + } + + @Override public boolean equals(Object o) { @@ -404,12 +422,13 @@ public boolean equals(Object o) { Objects.equals(this.media, message.media) && Objects.equals(this.text, message.text) && Objects.equals(this.tag, message.tag) && - Objects.equals(this.priority, message.priority); + Objects.equals(this.priority, message.priority) && + Objects.equals(this.expiration, message.expiration); } @Override public int hashCode() { - return Objects.hash(id, owner, applicationId, time, segmentCount, direction, to, from, media, text, tag, priority); + return Objects.hash(id, owner, applicationId, time, segmentCount, direction, to, from, media, text, tag, priority, expiration); } @Override @@ -428,6 +447,7 @@ public String toString() { sb.append(" text: ").append(toIndentedString(text)).append("\n"); sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); sb.append("}"); return sb.toString(); } @@ -462,31 +482,33 @@ private String toIndentedString(Object o) { openapiFields.add("text"); openapiFields.add("tag"); openapiFields.add("priority"); + openapiFields.add("expiration"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Message + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Message */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Message.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Message` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Message` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -496,18 +518,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } - if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); - } // ensure the optional json data is an array if present - if (jsonObj.get("to") != null && !jsonObj.get("to").isJsonArray()) { + 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())); } 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())); } // ensure the optional json data is an array if present - if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonArray()) { + 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())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { @@ -538,9 +557,9 @@ public void write(JsonWriter out, Message value) throws IOException { @Override public Message read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageDeliveredCallback.java b/src/main/java/org/openapitools/client/model/MessageDeliveredCallback.java index 4be7301a..efa96fb6 100644 --- a/src/main/java/org/openapitools/client/model/MessageDeliveredCallback.java +++ b/src/main/java/org/openapitools/client/model/MessageDeliveredCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.MessageDeliveredCallbackMessage; import com.google.gson.Gson; @@ -34,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,7 +52,7 @@ /** * Message Delivered Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageDeliveredCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -84,7 +88,6 @@ public MessageDeliveredCallback time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -106,7 +109,6 @@ public MessageDeliveredCallback type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -128,7 +130,6 @@ public MessageDeliveredCallback to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -150,7 +151,6 @@ public MessageDeliveredCallback description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -172,7 +172,6 @@ public MessageDeliveredCallback message(MessageDeliveredCallbackMessage message) * @return message **/ @javax.annotation.Nonnull - public MessageDeliveredCallbackMessage getMessage() { return message; } @@ -252,32 +251,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageDeliveredCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageDeliveredCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageDeliveredCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageDeliveredCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageDeliveredCallback is not found in the empty JSON string", MessageDeliveredCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageDeliveredCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageDeliveredCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageDeliveredCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageDeliveredCallback.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -288,7 +288,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` - MessageDeliveredCallbackMessage.validateJsonObject(jsonObj.getAsJsonObject("message")); + MessageDeliveredCallbackMessage.validateJsonElement(jsonObj.get("message")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -311,9 +311,9 @@ public void write(JsonWriter out, MessageDeliveredCallback value) throws IOExcep @Override public MessageDeliveredCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageDeliveredCallbackMessage.java b/src/main/java/org/openapitools/client/model/MessageDeliveredCallbackMessage.java index 7dbf6c35..6e3d4b5a 100644 --- a/src/main/java/org/openapitools/client/model/MessageDeliveredCallbackMessage.java +++ b/src/main/java/org/openapitools/client/model/MessageDeliveredCallbackMessage.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +23,7 @@ import java.net.URI; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,6 +40,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,9 +56,9 @@ import org.openapitools.client.JSON; /** - * MessageDeliveredCallbackMessage + * Message Delivered Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageDeliveredCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -98,7 +102,7 @@ public class MessageDeliveredCallbackMessage { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) - private List media = new ArrayList<>(); + private List media; public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) @@ -118,7 +122,6 @@ public MessageDeliveredCallbackMessage id(String id) { * @return id **/ @javax.annotation.Nonnull - public String getId() { return id; } @@ -140,7 +143,6 @@ public MessageDeliveredCallbackMessage owner(String owner) { * @return owner **/ @javax.annotation.Nonnull - public String getOwner() { return owner; } @@ -162,7 +164,6 @@ public MessageDeliveredCallbackMessage applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -184,7 +185,6 @@ public MessageDeliveredCallbackMessage time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -206,7 +206,6 @@ public MessageDeliveredCallbackMessage segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nonnull - public Integer getSegmentCount() { return segmentCount; } @@ -228,7 +227,6 @@ public MessageDeliveredCallbackMessage direction(MessageDirectionEnum direction) * @return direction **/ @javax.annotation.Nonnull - public MessageDirectionEnum getDirection() { return direction; } @@ -246,6 +244,9 @@ public MessageDeliveredCallbackMessage to(Set to) { } public MessageDeliveredCallbackMessage addToItem(String toItem) { + if (this.to == null) { + this.to = new LinkedHashSet<>(); + } this.to.add(toItem); return this; } @@ -255,7 +256,6 @@ public MessageDeliveredCallbackMessage addToItem(String toItem) { * @return to **/ @javax.annotation.Nonnull - public Set getTo() { return to; } @@ -277,7 +277,6 @@ public MessageDeliveredCallbackMessage from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -299,7 +298,6 @@ public MessageDeliveredCallbackMessage text(String text) { * @return text **/ @javax.annotation.Nonnull - public String getText() { return text; } @@ -321,7 +319,6 @@ public MessageDeliveredCallbackMessage tag(String tag) { * @return tag **/ @javax.annotation.Nonnull - public String getTag() { return tag; } @@ -351,7 +348,6 @@ public MessageDeliveredCallbackMessage addMediaItem(URI mediaItem) { * @return media **/ @javax.annotation.Nullable - public List getMedia() { return media; } @@ -373,7 +369,6 @@ public MessageDeliveredCallbackMessage priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nullable - public PriorityEnum getPriority() { return priority; } @@ -479,32 +474,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageDeliveredCallbackMessage + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageDeliveredCallbackMessage */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageDeliveredCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageDeliveredCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageDeliveredCallbackMessage is not found in the empty JSON string", MessageDeliveredCallbackMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageDeliveredCallbackMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageDeliveredCallbackMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageDeliveredCallbackMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageDeliveredCallbackMessage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -530,7 +526,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } // ensure the optional json data is an array if present - if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonArray()) { + 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())); } } @@ -555,9 +551,9 @@ public void write(JsonWriter out, MessageDeliveredCallbackMessage value) throws @Override public MessageDeliveredCallbackMessage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageDirectionEnum.java b/src/main/java/org/openapitools/client/model/MessageDirectionEnum.java index d74ce7ed..5c49b47a 100644 --- a/src/main/java/org/openapitools/client/model/MessageDirectionEnum.java +++ b/src/main/java/org/openapitools/client/model/MessageDirectionEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/MessageFailedCallback.java b/src/main/java/org/openapitools/client/model/MessageFailedCallback.java index 6c6e3dea..edd64536 100644 --- a/src/main/java/org/openapitools/client/model/MessageFailedCallback.java +++ b/src/main/java/org/openapitools/client/model/MessageFailedCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.MessageFailedCallbackMessage; import com.google.gson.Gson; @@ -34,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,7 +52,7 @@ /** * Message Failed Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageFailedCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -88,7 +92,6 @@ public MessageFailedCallback time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -110,7 +113,6 @@ public MessageFailedCallback type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -132,7 +134,6 @@ public MessageFailedCallback to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -154,7 +155,6 @@ public MessageFailedCallback description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -176,7 +176,6 @@ public MessageFailedCallback message(MessageFailedCallbackMessage message) { * @return message **/ @javax.annotation.Nonnull - public MessageFailedCallbackMessage getMessage() { return message; } @@ -198,7 +197,6 @@ public MessageFailedCallback errorCode(Integer errorCode) { * @return errorCode **/ @javax.annotation.Nonnull - public Integer getErrorCode() { return errorCode; } @@ -282,32 +280,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageFailedCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageFailedCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageFailedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageFailedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageFailedCallback is not found in the empty JSON string", MessageFailedCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageFailedCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageFailedCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageFailedCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageFailedCallback.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -318,7 +317,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` - MessageFailedCallbackMessage.validateJsonObject(jsonObj.getAsJsonObject("message")); + MessageFailedCallbackMessage.validateJsonElement(jsonObj.get("message")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -341,9 +340,9 @@ public void write(JsonWriter out, MessageFailedCallback value) throws IOExceptio @Override public MessageFailedCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageFailedCallbackMessage.java b/src/main/java/org/openapitools/client/model/MessageFailedCallbackMessage.java index 957a7eac..8e31d477 100644 --- a/src/main/java/org/openapitools/client/model/MessageFailedCallbackMessage.java +++ b/src/main/java/org/openapitools/client/model/MessageFailedCallbackMessage.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +23,7 @@ import java.net.URI; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,6 +40,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,9 +56,9 @@ import org.openapitools.client.JSON; /** - * MessageFailedCallbackMessage + * Message Failed Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageFailedCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -98,7 +102,7 @@ public class MessageFailedCallbackMessage { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) - private List media = new ArrayList<>(); + private List media; public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) @@ -118,7 +122,6 @@ public MessageFailedCallbackMessage id(String id) { * @return id **/ @javax.annotation.Nonnull - public String getId() { return id; } @@ -140,7 +143,6 @@ public MessageFailedCallbackMessage owner(String owner) { * @return owner **/ @javax.annotation.Nonnull - public String getOwner() { return owner; } @@ -162,7 +164,6 @@ public MessageFailedCallbackMessage applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -184,7 +185,6 @@ public MessageFailedCallbackMessage time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -206,7 +206,6 @@ public MessageFailedCallbackMessage segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nonnull - public Integer getSegmentCount() { return segmentCount; } @@ -228,7 +227,6 @@ public MessageFailedCallbackMessage direction(MessageDirectionEnum direction) { * @return direction **/ @javax.annotation.Nonnull - public MessageDirectionEnum getDirection() { return direction; } @@ -246,6 +244,9 @@ public MessageFailedCallbackMessage to(Set to) { } public MessageFailedCallbackMessage addToItem(String toItem) { + if (this.to == null) { + this.to = new LinkedHashSet<>(); + } this.to.add(toItem); return this; } @@ -255,7 +256,6 @@ public MessageFailedCallbackMessage addToItem(String toItem) { * @return to **/ @javax.annotation.Nonnull - public Set getTo() { return to; } @@ -277,7 +277,6 @@ public MessageFailedCallbackMessage from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -299,7 +298,6 @@ public MessageFailedCallbackMessage text(String text) { * @return text **/ @javax.annotation.Nonnull - public String getText() { return text; } @@ -321,7 +319,6 @@ public MessageFailedCallbackMessage tag(String tag) { * @return tag **/ @javax.annotation.Nonnull - public String getTag() { return tag; } @@ -351,7 +348,6 @@ public MessageFailedCallbackMessage addMediaItem(URI mediaItem) { * @return media **/ @javax.annotation.Nullable - public List getMedia() { return media; } @@ -373,7 +369,6 @@ public MessageFailedCallbackMessage priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nonnull - public PriorityEnum getPriority() { return priority; } @@ -480,32 +475,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageFailedCallbackMessage + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageFailedCallbackMessage */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageFailedCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageFailedCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageFailedCallbackMessage is not found in the empty JSON string", MessageFailedCallbackMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageFailedCallbackMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageFailedCallbackMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageFailedCallbackMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageFailedCallbackMessage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -531,7 +527,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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())); } // ensure the optional json data is an array if present - if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonArray()) { + 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())); } } @@ -556,9 +552,9 @@ public void write(JsonWriter out, MessageFailedCallbackMessage value) throws IOE @Override public MessageFailedCallbackMessage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageRequest.java b/src/main/java/org/openapitools/client/model/MessageRequest.java index 7739a01b..fa46288d 100644 --- a/src/main/java/org/openapitools/client/model/MessageRequest.java +++ b/src/main/java/org/openapitools/client/model/MessageRequest.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,7 +21,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -38,6 +39,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,7 +57,7 @@ /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -72,7 +77,7 @@ public class MessageRequest { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) - private List media = new ArrayList<>(); + private List media; public static final String SERIALIZED_NAME_TAG = "tag"; @SerializedName(SERIALIZED_NAME_TAG) @@ -84,7 +89,7 @@ public class MessageRequest { public static final String SERIALIZED_NAME_EXPIRATION = "expiration"; @SerializedName(SERIALIZED_NAME_EXPIRATION) - private String expiration; + private OffsetDateTime expiration; public MessageRequest() { } @@ -100,7 +105,6 @@ public MessageRequest applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -118,6 +122,9 @@ public MessageRequest to(Set to) { } public MessageRequest addToItem(String toItem) { + if (this.to == null) { + this.to = new LinkedHashSet<>(); + } this.to.add(toItem); return this; } @@ -127,7 +134,6 @@ public MessageRequest addToItem(String toItem) { * @return to **/ @javax.annotation.Nonnull - public Set getTo() { return to; } @@ -149,7 +155,6 @@ public MessageRequest from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -171,7 +176,6 @@ public MessageRequest text(String text) { * @return text **/ @javax.annotation.Nullable - public String getText() { return text; } @@ -201,7 +205,6 @@ public MessageRequest addMediaItem(URI mediaItem) { * @return media **/ @javax.annotation.Nullable - public List getMedia() { return media; } @@ -223,7 +226,6 @@ public MessageRequest tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -245,7 +247,6 @@ public MessageRequest priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nullable - public PriorityEnum getPriority() { return priority; } @@ -256,24 +257,23 @@ public void setPriority(PriorityEnum priority) { } - public MessageRequest expiration(String expiration) { + public MessageRequest expiration(OffsetDateTime expiration) { this.expiration = expiration; return this; } /** - * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + * A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. Not supported on MMS. * @return expiration **/ @javax.annotation.Nullable - - public String getExpiration() { + public OffsetDateTime getExpiration() { return expiration; } - public void setExpiration(String expiration) { + public void setExpiration(OffsetDateTime expiration) { this.expiration = expiration; } @@ -354,32 +354,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -396,15 +397,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonArray()) { + 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())); } 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())); } - if ((jsonObj.get("expiration") != null && !jsonObj.get("expiration").isJsonNull()) && !jsonObj.get("expiration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiration").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -427,9 +425,9 @@ public void write(JsonWriter out, MessageRequest value) throws IOException { @Override public MessageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageSendingCallback.java b/src/main/java/org/openapitools/client/model/MessageSendingCallback.java index 98d940b5..52ccb568 100644 --- a/src/main/java/org/openapitools/client/model/MessageSendingCallback.java +++ b/src/main/java/org/openapitools/client/model/MessageSendingCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.MessageSendingCallbackMessage; import com.google.gson.Gson; @@ -34,6 +34,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,7 +52,7 @@ /** * Message Sending Callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageSendingCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -84,7 +88,6 @@ public MessageSendingCallback time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -106,7 +109,6 @@ public MessageSendingCallback type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -128,7 +130,6 @@ public MessageSendingCallback to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -150,7 +151,6 @@ public MessageSendingCallback description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -172,7 +172,6 @@ public MessageSendingCallback message(MessageSendingCallbackMessage message) { * @return message **/ @javax.annotation.Nonnull - public MessageSendingCallbackMessage getMessage() { return message; } @@ -252,32 +251,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageSendingCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageSendingCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageSendingCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageSendingCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageSendingCallback is not found in the empty JSON string", MessageSendingCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageSendingCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageSendingCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageSendingCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageSendingCallback.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -288,7 +288,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` - MessageSendingCallbackMessage.validateJsonObject(jsonObj.getAsJsonObject("message")); + MessageSendingCallbackMessage.validateJsonElement(jsonObj.get("message")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -311,9 +311,9 @@ public void write(JsonWriter out, MessageSendingCallback value) throws IOExcepti @Override public MessageSendingCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageSendingCallbackMessage.java b/src/main/java/org/openapitools/client/model/MessageSendingCallbackMessage.java index adaf570f..841cf490 100644 --- a/src/main/java/org/openapitools/client/model/MessageSendingCallbackMessage.java +++ b/src/main/java/org/openapitools/client/model/MessageSendingCallbackMessage.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +23,7 @@ import java.net.URI; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,6 +40,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,9 +56,9 @@ import org.openapitools.client.JSON; /** - * MessageSendingCallbackMessage + * Message Sending Callback Message Schema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessageSendingCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -118,7 +122,6 @@ public MessageSendingCallbackMessage id(String id) { * @return id **/ @javax.annotation.Nonnull - public String getId() { return id; } @@ -140,7 +143,6 @@ public MessageSendingCallbackMessage owner(String owner) { * @return owner **/ @javax.annotation.Nonnull - public String getOwner() { return owner; } @@ -162,7 +164,6 @@ public MessageSendingCallbackMessage applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nonnull - public String getApplicationId() { return applicationId; } @@ -184,7 +185,6 @@ public MessageSendingCallbackMessage time(OffsetDateTime time) { * @return time **/ @javax.annotation.Nonnull - public OffsetDateTime getTime() { return time; } @@ -206,7 +206,6 @@ public MessageSendingCallbackMessage segmentCount(Integer segmentCount) { * @return segmentCount **/ @javax.annotation.Nonnull - public Integer getSegmentCount() { return segmentCount; } @@ -228,7 +227,6 @@ public MessageSendingCallbackMessage direction(MessageDirectionEnum direction) { * @return direction **/ @javax.annotation.Nonnull - public MessageDirectionEnum getDirection() { return direction; } @@ -246,6 +244,9 @@ public MessageSendingCallbackMessage to(Set to) { } public MessageSendingCallbackMessage addToItem(String toItem) { + if (this.to == null) { + this.to = new LinkedHashSet<>(); + } this.to.add(toItem); return this; } @@ -255,7 +256,6 @@ public MessageSendingCallbackMessage addToItem(String toItem) { * @return to **/ @javax.annotation.Nonnull - public Set getTo() { return to; } @@ -277,7 +277,6 @@ public MessageSendingCallbackMessage from(String from) { * @return from **/ @javax.annotation.Nonnull - public String getFrom() { return from; } @@ -299,7 +298,6 @@ public MessageSendingCallbackMessage text(String text) { * @return text **/ @javax.annotation.Nonnull - public String getText() { return text; } @@ -321,7 +319,6 @@ public MessageSendingCallbackMessage tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -339,6 +336,9 @@ public MessageSendingCallbackMessage media(List media) { } public MessageSendingCallbackMessage addMediaItem(URI mediaItem) { + if (this.media == null) { + this.media = new ArrayList<>(); + } this.media.add(mediaItem); return this; } @@ -348,7 +348,6 @@ public MessageSendingCallbackMessage addMediaItem(URI mediaItem) { * @return media **/ @javax.annotation.Nonnull - public List getMedia() { return media; } @@ -370,7 +369,6 @@ public MessageSendingCallbackMessage priority(PriorityEnum priority) { * @return priority **/ @javax.annotation.Nonnull - public PriorityEnum getPriority() { return priority; } @@ -477,32 +475,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessageSendingCallbackMessage + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessageSendingCallbackMessage */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessageSendingCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessageSendingCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessageSendingCallbackMessage is not found in the empty JSON string", MessageSendingCallbackMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessageSendingCallbackMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageSendingCallbackMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageSendingCallbackMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageSendingCallbackMessage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -555,9 +554,9 @@ public void write(JsonWriter out, MessageSendingCallbackMessage value) throws IO @Override public MessageSendingCallbackMessage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessageStatusEnum.java b/src/main/java/org/openapitools/client/model/MessageStatusEnum.java index a98c8ea7..d9be3ced 100644 --- a/src/main/java/org/openapitools/client/model/MessageStatusEnum.java +++ b/src/main/java/org/openapitools/client/model/MessageStatusEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/MessageTypeEnum.java b/src/main/java/org/openapitools/client/model/MessageTypeEnum.java index 37e975cc..61e77c04 100644 --- a/src/main/java/org/openapitools/client/model/MessageTypeEnum.java +++ b/src/main/java/org/openapitools/client/model/MessageTypeEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/MessagesList.java b/src/main/java/org/openapitools/client/model/MessagesList.java index 9e0f174b..cb0d9921 100644 --- a/src/main/java/org/openapitools/client/model/MessagesList.java +++ b/src/main/java/org/openapitools/client/model/MessagesList.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ListMessageItem; import org.openapitools.client.model.PageInfo; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,7 @@ /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) @@ -62,7 +66,7 @@ public class MessagesList { public static final String SERIALIZED_NAME_MESSAGES = "messages"; @SerializedName(SERIALIZED_NAME_MESSAGES) - private List messages = new ArrayList<>(); + private List messages; public MessagesList() { } @@ -74,11 +78,10 @@ public MessagesList totalCount(Integer totalCount) { } /** - * Total number of messages matched by the search. + * The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. * @return totalCount **/ @javax.annotation.Nullable - public Integer getTotalCount() { return totalCount; } @@ -100,7 +103,6 @@ public MessagesList pageInfo(PageInfo pageInfo) { * @return pageInfo **/ @javax.annotation.Nullable - public PageInfo getPageInfo() { return pageInfo; } @@ -130,7 +132,6 @@ public MessagesList addMessagesItem(ListMessageItem messagesItem) { * @return messages **/ @javax.annotation.Nullable - public List getMessages() { return messages; } @@ -199,28 +200,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessagesList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessagesList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessagesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessagesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessagesList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagesList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagesList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `pageInfo` if (jsonObj.get("pageInfo") != null && !jsonObj.get("pageInfo").isJsonNull()) { - PageInfo.validateJsonObject(jsonObj.getAsJsonObject("pageInfo")); + PageInfo.validateJsonElement(jsonObj.get("pageInfo")); } if (jsonObj.get("messages") != null && !jsonObj.get("messages").isJsonNull()) { JsonArray jsonArraymessages = jsonObj.getAsJsonArray("messages"); @@ -232,7 +234,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `messages` (array) for (int i = 0; i < jsonArraymessages.size(); i++) { - ListMessageItem.validateJsonObject(jsonArraymessages.get(i).getAsJsonObject()); + ListMessageItem.validateJsonElement(jsonArraymessages.get(i)); }; } } @@ -258,9 +260,9 @@ public void write(JsonWriter out, MessagesList value) throws IOException { @Override public MessagesList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessagingCodeResponse.java b/src/main/java/org/openapitools/client/model/MessagingCodeResponse.java index e5b5504b..e72b83fe 100644 --- a/src/main/java/org/openapitools/client/model/MessagingCodeResponse.java +++ b/src/main/java/org/openapitools/client/model/MessagingCodeResponse.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -66,7 +70,6 @@ public MessagingCodeResponse messageId(String messageId) { * @return messageId **/ @javax.annotation.Nullable - public String getMessageId() { return messageId; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessagingCodeResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessagingCodeResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessagingCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessagingCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessagingCodeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagingCodeResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagingCodeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } @@ -173,9 +177,9 @@ public void write(JsonWriter out, MessagingCodeResponse value) throws IOExceptio @Override public MessagingCodeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MessagingRequestError.java b/src/main/java/org/openapitools/client/model/MessagingRequestError.java index 20e64d7d..cd32cc58 100644 --- a/src/main/java/org/openapitools/client/model/MessagingRequestError.java +++ b/src/main/java/org/openapitools/client/model/MessagingRequestError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -70,7 +74,6 @@ public MessagingRequestError type(String type) { * @return type **/ @javax.annotation.Nonnull - public String getType() { return type; } @@ -92,7 +95,6 @@ public MessagingRequestError description(String description) { * @return description **/ @javax.annotation.Nonnull - public String getDescription() { return description; } @@ -160,32 +162,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MessagingRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MessagingRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MessagingRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MessagingRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MessagingRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagingRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessagingRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessagingRequestError.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -214,9 +217,9 @@ public void write(JsonWriter out, MessagingRequestError value) throws IOExceptio @Override public MessagingRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MfaForbiddenRequestError.java b/src/main/java/org/openapitools/client/model/MfaForbiddenRequestError.java index ea57abe7..099d60fd 100644 --- a/src/main/java/org/openapitools/client/model/MfaForbiddenRequestError.java +++ b/src/main/java/org/openapitools/client/model/MfaForbiddenRequestError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -66,7 +70,6 @@ public MfaForbiddenRequestError message(String message) { * @return message **/ @javax.annotation.Nullable - public String getMessage() { return message; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MfaForbiddenRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MfaForbiddenRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MfaForbiddenRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MfaForbiddenRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MfaForbiddenRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaForbiddenRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaForbiddenRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -173,9 +177,9 @@ public void write(JsonWriter out, MfaForbiddenRequestError value) throws IOExcep @Override public MfaForbiddenRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MfaRequestError.java b/src/main/java/org/openapitools/client/model/MfaRequestError.java index 29368db3..9fc8eda5 100644 --- a/src/main/java/org/openapitools/client/model/MfaRequestError.java +++ b/src/main/java/org/openapitools/client/model/MfaRequestError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -70,7 +74,6 @@ public MfaRequestError error(String error) { * @return error **/ @javax.annotation.Nullable - public String getError() { return error; } @@ -92,7 +95,6 @@ public MfaRequestError requestId(String requestId) { * @return requestId **/ @javax.annotation.Nullable - public String getRequestId() { return requestId; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MfaRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MfaRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MfaRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MfaRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MfaRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -205,9 +208,9 @@ public void write(JsonWriter out, MfaRequestError value) throws IOException { @Override public MfaRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/MfaUnauthorizedRequestError.java b/src/main/java/org/openapitools/client/model/MfaUnauthorizedRequestError.java index c7a8dc55..9f65bbc1 100644 --- a/src/main/java/org/openapitools/client/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/org/openapitools/client/model/MfaUnauthorizedRequestError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -66,7 +70,6 @@ public MfaUnauthorizedRequestError message(String message) { * @return message **/ @javax.annotation.Nullable - public String getMessage() { return message; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MfaUnauthorizedRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MfaUnauthorizedRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MfaUnauthorizedRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MfaUnauthorizedRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MfaUnauthorizedRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaUnauthorizedRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MfaUnauthorizedRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -173,9 +177,9 @@ public void write(JsonWriter out, MfaUnauthorizedRequestError value) throws IOEx @Override public MfaUnauthorizedRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/PageInfo.java b/src/main/java/org/openapitools/client/model/PageInfo.java index ec932305..ce615795 100644 --- a/src/main/java/org/openapitools/client/model/PageInfo.java +++ b/src/main/java/org/openapitools/client/model/PageInfo.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) @@ -78,7 +82,6 @@ public PageInfo prevPage(String prevPage) { * @return prevPage **/ @javax.annotation.Nullable - public String getPrevPage() { return prevPage; } @@ -100,7 +103,6 @@ public PageInfo nextPage(String nextPage) { * @return nextPage **/ @javax.annotation.Nullable - public String getNextPage() { return nextPage; } @@ -122,7 +124,6 @@ public PageInfo prevPageToken(String prevPageToken) { * @return prevPageToken **/ @javax.annotation.Nullable - public String getPrevPageToken() { return prevPageToken; } @@ -144,7 +145,6 @@ public PageInfo nextPageToken(String nextPageToken) { * @return nextPageToken **/ @javax.annotation.Nullable - public String getNextPageToken() { return nextPageToken; } @@ -216,25 +216,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PageInfo + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PageInfo */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PageInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PageInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!PageInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("prevPage") != null && !jsonObj.get("prevPage").isJsonNull()) && !jsonObj.get("prevPage").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); } @@ -269,9 +270,9 @@ public void write(JsonWriter out, PageInfo value) throws IOException { @Override public PageInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/PriorityEnum.java b/src/main/java/org/openapitools/client/model/PriorityEnum.java index 97f5f5df..8da4b4af 100644 --- a/src/main/java/org/openapitools/client/model/PriorityEnum.java +++ b/src/main/java/org/openapitools/client/model/PriorityEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; @@ -24,7 +23,7 @@ import com.google.gson.stream.JsonWriter; /** - * The priority specified by the user. + * The priority specified by the user. Not supported on MMS. */ @JsonAdapter(PriorityEnum.Adapter.class) public enum PriorityEnum { diff --git a/src/main/java/org/openapitools/client/model/RecordingAvailableCallback.java b/src/main/java/org/openapitools/client/model/RecordingAvailableCallback.java index 4997787c..1823455a 100644 --- a/src/main/java/org/openapitools/client/model/RecordingAvailableCallback.java +++ b/src/main/java/org/openapitools/client/model/RecordingAvailableCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,6 +37,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -51,7 +55,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -59,7 +63,7 @@ public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -155,7 +159,6 @@ public RecordingAvailableCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -166,7 +169,7 @@ public void setEventType(String eventType) { } - public RecordingAvailableCallback eventTime(String eventTime) { + public RecordingAvailableCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -177,13 +180,12 @@ public RecordingAvailableCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -199,7 +201,6 @@ public RecordingAvailableCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -221,7 +222,6 @@ public RecordingAvailableCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -243,7 +243,6 @@ public RecordingAvailableCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -265,7 +264,6 @@ public RecordingAvailableCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -287,7 +285,6 @@ public RecordingAvailableCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -309,7 +306,6 @@ public RecordingAvailableCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -331,7 +327,6 @@ public RecordingAvailableCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -353,7 +348,6 @@ public RecordingAvailableCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -375,7 +369,6 @@ public RecordingAvailableCallback recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -397,7 +390,6 @@ public RecordingAvailableCallback mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -419,7 +411,6 @@ public RecordingAvailableCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -441,7 +432,6 @@ public RecordingAvailableCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -463,7 +453,6 @@ public RecordingAvailableCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -485,7 +474,6 @@ public RecordingAvailableCallback duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -507,7 +495,6 @@ public RecordingAvailableCallback fileFormat(FileFormatEnum fileFormat) { * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -529,7 +516,6 @@ public RecordingAvailableCallback channels(String channels) { * @return channels **/ @javax.annotation.Nullable - public String getChannels() { return channels; } @@ -551,7 +537,6 @@ public RecordingAvailableCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -573,7 +558,6 @@ public RecordingAvailableCallback status(String status) { * @return status **/ @javax.annotation.Nullable - public String getStatus() { return status; } @@ -595,7 +579,6 @@ public RecordingAvailableCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -617,7 +600,6 @@ public RecordingAvailableCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -754,31 +736,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RecordingAvailableCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecordingAvailableCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!RecordingAvailableCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecordingAvailableCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecordingAvailableCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -846,9 +826,9 @@ public void write(JsonWriter out, RecordingAvailableCallback value) throws IOExc @Override public RecordingAvailableCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/RecordingCompleteCallback.java b/src/main/java/org/openapitools/client/model/RecordingCompleteCallback.java index eeba88b0..f414da28 100644 --- a/src/main/java/org/openapitools/client/model/RecordingCompleteCallback.java +++ b/src/main/java/org/openapitools/client/model/RecordingCompleteCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,6 +37,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -51,7 +55,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -59,7 +63,7 @@ public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -155,7 +159,6 @@ public RecordingCompleteCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -166,7 +169,7 @@ public void setEventType(String eventType) { } - public RecordingCompleteCallback eventTime(String eventTime) { + public RecordingCompleteCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -177,13 +180,12 @@ public RecordingCompleteCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -199,7 +201,6 @@ public RecordingCompleteCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -221,7 +222,6 @@ public RecordingCompleteCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -243,7 +243,6 @@ public RecordingCompleteCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -265,7 +264,6 @@ public RecordingCompleteCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -287,7 +285,6 @@ public RecordingCompleteCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -309,7 +306,6 @@ public RecordingCompleteCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -331,7 +327,6 @@ public RecordingCompleteCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -353,7 +348,6 @@ public RecordingCompleteCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -375,7 +369,6 @@ public RecordingCompleteCallback recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -397,7 +390,6 @@ public RecordingCompleteCallback mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -419,7 +411,6 @@ public RecordingCompleteCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -441,7 +432,6 @@ public RecordingCompleteCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -463,7 +453,6 @@ public RecordingCompleteCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -485,7 +474,6 @@ public RecordingCompleteCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -507,7 +495,6 @@ public RecordingCompleteCallback duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -529,7 +516,6 @@ public RecordingCompleteCallback fileFormat(FileFormatEnum fileFormat) { * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -551,7 +537,6 @@ public RecordingCompleteCallback channels(Integer channels) { * @return channels **/ @javax.annotation.Nullable - public Integer getChannels() { return channels; } @@ -573,7 +558,6 @@ public RecordingCompleteCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -595,7 +579,6 @@ public RecordingCompleteCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -617,7 +600,6 @@ public RecordingCompleteCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -754,31 +736,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RecordingCompleteCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RecordingCompleteCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RecordingCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RecordingCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!RecordingCompleteCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecordingCompleteCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RecordingCompleteCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -840,9 +820,9 @@ public void write(JsonWriter out, RecordingCompleteCallback value) throws IOExce @Override public RecordingCompleteCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/RecordingStateEnum.java b/src/main/java/org/openapitools/client/model/RecordingStateEnum.java index 9448b5a8..29d972d7 100644 --- a/src/main/java/org/openapitools/client/model/RecordingStateEnum.java +++ b/src/main/java/org/openapitools/client/model/RecordingStateEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; diff --git a/src/main/java/org/openapitools/client/model/RedirectCallback.java b/src/main/java/org/openapitools/client/model/RedirectCallback.java index 0169d6d8..0f6e8b84 100644 --- a/src/main/java/org/openapitools/client/model/RedirectCallback.java +++ b/src/main/java/org/openapitools/client/model/RedirectCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -129,7 +133,6 @@ public RedirectCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -140,7 +143,7 @@ public void setEventType(String eventType) { } - public RedirectCallback eventTime(String eventTime) { + public RedirectCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -151,13 +154,12 @@ public RedirectCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -173,7 +175,6 @@ public RedirectCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -195,7 +196,6 @@ public RedirectCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -217,7 +217,6 @@ public RedirectCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -239,7 +238,6 @@ public RedirectCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -261,7 +259,6 @@ public RedirectCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -283,7 +280,6 @@ public RedirectCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -305,7 +301,6 @@ public RedirectCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -327,7 +322,6 @@ public RedirectCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -349,7 +343,6 @@ public RedirectCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -371,7 +364,6 @@ public RedirectCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -393,7 +385,6 @@ public RedirectCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -415,7 +406,6 @@ public RedirectCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -437,7 +427,6 @@ public RedirectCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -459,7 +448,6 @@ public RedirectCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -578,31 +566,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RedirectCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RedirectCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!RedirectCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RedirectCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RedirectCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -655,9 +641,9 @@ public void write(JsonWriter out, RedirectCallback value) throws IOException { @Override public RedirectCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/RedirectMethodEnum.java b/src/main/java/org/openapitools/client/model/RedirectMethodEnum.java index 98f1f459..1f385c28 100644 --- a/src/main/java/org/openapitools/client/model/RedirectMethodEnum.java +++ b/src/main/java/org/openapitools/client/model/RedirectMethodEnum.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; @@ -24,7 +23,7 @@ import com.google.gson.stream.JsonWriter; /** - * The HTTP method to use for the request to `redirectUrl`. GET or POST. Default value is POST.<br><br>Not allowed if `state` is `completed` + * The HTTP method to use for the request to `redirectUrl`. GET or POST. Default value is POST.<br><br>Not allowed if `state` is `completed`. */ @JsonAdapter(RedirectMethodEnum.Adapter.class) public enum RedirectMethodEnum { diff --git a/src/main/java/org/openapitools/client/model/StirShaken.java b/src/main/java/org/openapitools/client/model/StirShaken.java index 10dfbb47..30e32af9 100644 --- a/src/main/java/org/openapitools/client/model/StirShaken.java +++ b/src/main/java/org/openapitools/client/model/StirShaken.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) @@ -74,7 +78,6 @@ public StirShaken verstat(String verstat) { * @return verstat **/ @javax.annotation.Nullable - public String getVerstat() { return verstat; } @@ -96,7 +99,6 @@ public StirShaken attestationIndicator(String attestationIndicator) { * @return attestationIndicator **/ @javax.annotation.Nullable - public String getAttestationIndicator() { return attestationIndicator; } @@ -118,7 +120,6 @@ public StirShaken originatingId(String originatingId) { * @return originatingId **/ @javax.annotation.Nullable - public String getOriginatingId() { return originatingId; } @@ -187,25 +188,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StirShaken + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StirShaken */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StirShaken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StirShaken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!StirShaken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StirShaken` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StirShaken` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("verstat") != null && !jsonObj.get("verstat").isJsonNull()) && !jsonObj.get("verstat").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); } @@ -237,9 +239,9 @@ public void write(JsonWriter out, StirShaken value) throws IOException { @Override public StirShaken read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Tag.java b/src/main/java/org/openapitools/client/model/Tag.java index 9b1e1c0b..e170122d 100644 --- a/src/main/java/org/openapitools/client/model/Tag.java +++ b/src/main/java/org/openapitools/client/model/Tag.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Tag { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -70,7 +74,6 @@ public Tag key(String key) { * @return key **/ @javax.annotation.Nullable - public String getKey() { return key; } @@ -92,7 +95,6 @@ public Tag value(String value) { * @return value **/ @javax.annotation.Nullable - public String getValue() { return value; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Tag + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Tag */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Tag.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Tag.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Tag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -205,9 +208,9 @@ public void write(JsonWriter out, Tag value) throws IOException { @Override public Tag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TnLookupRequestError.java b/src/main/java/org/openapitools/client/model/TnLookupRequestError.java index 79466114..6fa28155 100644 --- a/src/main/java/org/openapitools/client/model/TnLookupRequestError.java +++ b/src/main/java/org/openapitools/client/model/TnLookupRequestError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * TnLookupRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TnLookupRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -66,7 +70,6 @@ public TnLookupRequestError message(String message) { * @return message **/ @javax.annotation.Nullable - public String getMessage() { return message; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TnLookupRequestError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TnLookupRequestError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TnLookupRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TnLookupRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TnLookupRequestError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TnLookupRequestError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TnLookupRequestError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -173,9 +177,9 @@ public void write(JsonWriter out, TnLookupRequestError value) throws IOException @Override public TnLookupRequestError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TranscribeRecording.java b/src/main/java/org/openapitools/client/model/TranscribeRecording.java index dc53bf36..a6437f1b 100644 --- a/src/main/java/org/openapitools/client/model/TranscribeRecording.java +++ b/src/main/java/org/openapitools/client/model/TranscribeRecording.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import org.openapitools.client.model.CallbackMethodEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,7 @@ /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -75,6 +79,10 @@ public class TranscribeRecording { @SerializedName(SERIALIZED_NAME_CALLBACK_TIMEOUT) private Double callbackTimeout = 15d; + public static final String SERIALIZED_NAME_DETECT_LANGUAGE = "detectLanguage"; + @SerializedName(SERIALIZED_NAME_DETECT_LANGUAGE) + private Boolean detectLanguage = false; + public TranscribeRecording() { } @@ -89,7 +97,6 @@ public TranscribeRecording callbackUrl(URI callbackUrl) { * @return callbackUrl **/ @javax.annotation.Nullable - public URI getCallbackUrl() { return callbackUrl; } @@ -111,7 +118,6 @@ public TranscribeRecording callbackMethod(CallbackMethodEnum callbackMethod) { * @return callbackMethod **/ @javax.annotation.Nullable - public CallbackMethodEnum getCallbackMethod() { return callbackMethod; } @@ -133,7 +139,6 @@ public TranscribeRecording username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -155,7 +160,6 @@ public TranscribeRecording password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -177,7 +181,6 @@ public TranscribeRecording tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -201,7 +204,6 @@ public TranscribeRecording callbackTimeout(Double callbackTimeout) { * @return callbackTimeout **/ @javax.annotation.Nullable - public Double getCallbackTimeout() { return callbackTimeout; } @@ -212,6 +214,27 @@ public void setCallbackTimeout(Double callbackTimeout) { } + public TranscribeRecording detectLanguage(Boolean detectLanguage) { + + this.detectLanguage = detectLanguage; + return this; + } + + /** + * A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. + * @return detectLanguage + **/ + @javax.annotation.Nullable + public Boolean getDetectLanguage() { + return detectLanguage; + } + + + public void setDetectLanguage(Boolean detectLanguage) { + this.detectLanguage = detectLanguage; + } + + @Override public boolean equals(Object o) { @@ -227,7 +250,8 @@ public boolean equals(Object o) { Objects.equals(this.username, transcribeRecording.username) && Objects.equals(this.password, transcribeRecording.password) && Objects.equals(this.tag, transcribeRecording.tag) && - Objects.equals(this.callbackTimeout, transcribeRecording.callbackTimeout); + Objects.equals(this.callbackTimeout, transcribeRecording.callbackTimeout) && + Objects.equals(this.detectLanguage, transcribeRecording.detectLanguage); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -236,7 +260,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(callbackUrl, callbackMethod, username, password, tag, callbackTimeout); + return Objects.hash(callbackUrl, callbackMethod, username, password, tag, callbackTimeout, detectLanguage); } private static int hashCodeNullable(JsonNullable a) { @@ -256,6 +280,7 @@ public String toString() { sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); sb.append(" callbackTimeout: ").append(toIndentedString(callbackTimeout)).append("\n"); + sb.append(" detectLanguage: ").append(toIndentedString(detectLanguage)).append("\n"); sb.append("}"); return sb.toString(); } @@ -284,31 +309,33 @@ private String toIndentedString(Object o) { openapiFields.add("password"); openapiFields.add("tag"); openapiFields.add("callbackTimeout"); + openapiFields.add("detectLanguage"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TranscribeRecording + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranscribeRecording */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TranscribeRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranscribeRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TranscribeRecording.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscribeRecording` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscribeRecording` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -343,9 +370,9 @@ public void write(JsonWriter out, TranscribeRecording value) throws IOException @Override public TranscribeRecording read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/Transcription.java b/src/main/java/org/openapitools/client/model/Transcription.java index f3d11c67..8aadcf60 100644 --- a/src/main/java/org/openapitools/client/model/Transcription.java +++ b/src/main/java/org/openapitools/client/model/Transcription.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -70,7 +74,6 @@ public Transcription text(String text) { * @return text **/ @javax.annotation.Nullable - public String getText() { return text; } @@ -92,7 +95,6 @@ public Transcription confidence(Double confidence) { * @return confidence **/ @javax.annotation.Nullable - public Double getConfidence() { return confidence; } @@ -158,25 +160,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Transcription + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Transcription */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Transcription.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Transcription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Transcription.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Transcription` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Transcription` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } @@ -202,9 +205,9 @@ public void write(JsonWriter out, Transcription value) throws IOException { @Override public Transcription read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TranscriptionAvailableCallback.java b/src/main/java/org/openapitools/client/model/TranscriptionAvailableCallback.java index 88c92186..055bc58a 100644 --- a/src/main/java/org/openapitools/client/model/TranscriptionAvailableCallback.java +++ b/src/main/java/org/openapitools/client/model/TranscriptionAvailableCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +22,7 @@ import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.client.model.FileFormatEnum; import org.openapitools.client.model.Transcription; @@ -38,6 +38,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -52,7 +56,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -60,7 +64,7 @@ public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -152,7 +156,6 @@ public TranscriptionAvailableCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -163,7 +166,7 @@ public void setEventType(String eventType) { } - public TranscriptionAvailableCallback eventTime(String eventTime) { + public TranscriptionAvailableCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -174,13 +177,12 @@ public TranscriptionAvailableCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -196,7 +198,6 @@ public TranscriptionAvailableCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -218,7 +219,6 @@ public TranscriptionAvailableCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -240,7 +240,6 @@ public TranscriptionAvailableCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -262,7 +261,6 @@ public TranscriptionAvailableCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -284,7 +282,6 @@ public TranscriptionAvailableCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -306,7 +303,6 @@ public TranscriptionAvailableCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -328,7 +324,6 @@ public TranscriptionAvailableCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -350,7 +345,6 @@ public TranscriptionAvailableCallback mediaUrl(URI mediaUrl) { * @return mediaUrl **/ @javax.annotation.Nullable - public URI getMediaUrl() { return mediaUrl; } @@ -372,7 +366,6 @@ public TranscriptionAvailableCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -394,7 +387,6 @@ public TranscriptionAvailableCallback recordingId(String recordingId) { * @return recordingId **/ @javax.annotation.Nullable - public String getRecordingId() { return recordingId; } @@ -416,7 +408,6 @@ public TranscriptionAvailableCallback enqueuedTime(OffsetDateTime enqueuedTime) * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -438,7 +429,6 @@ public TranscriptionAvailableCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -460,7 +450,6 @@ public TranscriptionAvailableCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -482,7 +471,6 @@ public TranscriptionAvailableCallback duration(String duration) { * @return duration **/ @javax.annotation.Nullable - public String getDuration() { return duration; } @@ -504,7 +492,6 @@ public TranscriptionAvailableCallback fileFormat(FileFormatEnum fileFormat) { * @return fileFormat **/ @javax.annotation.Nullable - public FileFormatEnum getFileFormat() { return fileFormat; } @@ -526,7 +513,6 @@ public TranscriptionAvailableCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -548,7 +534,6 @@ public TranscriptionAvailableCallback transcription(Transcription transcription) * @return transcription **/ @javax.annotation.Nullable - public Transcription getTranscription() { return transcription; } @@ -570,7 +555,6 @@ public TranscriptionAvailableCallback transferCallerId(String transferCallerId) * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -592,7 +576,6 @@ public TranscriptionAvailableCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -726,31 +709,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TranscriptionAvailableCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranscriptionAvailableCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TranscriptionAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranscriptionAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TranscriptionAvailableCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionAvailableCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionAvailableCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -786,7 +767,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { - Transcription.validateJsonObject(jsonObj.getAsJsonObject("transcription")); + Transcription.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); @@ -816,9 +797,9 @@ public void write(JsonWriter out, TranscriptionAvailableCallback value) throws I @Override public TranscriptionAvailableCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TranscriptionList.java b/src/main/java/org/openapitools/client/model/TranscriptionList.java index 40f552ef..a5e84ccd 100644 --- a/src/main/java/org/openapitools/client/model/TranscriptionList.java +++ b/src/main/java/org/openapitools/client/model/TranscriptionList.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.Transcription; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,11 +53,11 @@ /** * TranscriptionList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TranscriptionList { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) - private List transcripts = new ArrayList<>(); + private List transcripts; public TranscriptionList() { } @@ -77,7 +81,6 @@ public TranscriptionList addTranscriptsItem(Transcription transcriptsItem) { * @return transcripts **/ @javax.annotation.Nullable - public List getTranscripts() { return transcripts; } @@ -140,25 +143,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TranscriptionList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranscriptionList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TranscriptionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranscriptionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TranscriptionList is not found in the empty JSON string", TranscriptionList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TranscriptionList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("transcripts") != null && !jsonObj.get("transcripts").isJsonNull()) { JsonArray jsonArraytranscripts = jsonObj.getAsJsonArray("transcripts"); if (jsonArraytranscripts != null) { @@ -169,7 +173,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `transcripts` (array) for (int i = 0; i < jsonArraytranscripts.size(); i++) { - Transcription.validateJsonObject(jsonArraytranscripts.get(i).getAsJsonObject()); + Transcription.validateJsonElement(jsonArraytranscripts.get(i)); }; } } @@ -195,9 +199,9 @@ public void write(JsonWriter out, TranscriptionList value) throws IOException { @Override public TranscriptionList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TranscriptionMetadata.java b/src/main/java/org/openapitools/client/model/TranscriptionMetadata.java index a331fa74..486b2443 100644 --- a/src/main/java/org/openapitools/client/model/TranscriptionMetadata.java +++ b/src/main/java/org/openapitools/client/model/TranscriptionMetadata.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,6 +33,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +51,7 @@ /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -79,7 +83,6 @@ public TranscriptionMetadata id(String id) { * @return id **/ @javax.annotation.Nullable - public String getId() { return id; } @@ -101,7 +104,6 @@ public TranscriptionMetadata status(String status) { * @return status **/ @javax.annotation.Nullable - public String getStatus() { return status; } @@ -123,7 +125,6 @@ public TranscriptionMetadata completedTime(String completedTime) { * @return completedTime **/ @javax.annotation.Nullable - public String getCompletedTime() { return completedTime; } @@ -145,7 +146,6 @@ public TranscriptionMetadata url(URI url) { * @return url **/ @javax.annotation.Nullable - public URI getUrl() { return url; } @@ -217,25 +217,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TranscriptionMetadata + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranscriptionMetadata */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TranscriptionMetadata is not found in the empty JSON string", TranscriptionMetadata.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TranscriptionMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranscriptionMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -270,9 +271,9 @@ public void write(JsonWriter out, TranscriptionMetadata value) throws IOExceptio @Override public TranscriptionMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TransferAnswerCallback.java b/src/main/java/org/openapitools/client/model/TransferAnswerCallback.java index d81dcf2b..201a65d5 100644 --- a/src/main/java/org/openapitools/client/model/TransferAnswerCallback.java +++ b/src/main/java/org/openapitools/client/model/TransferAnswerCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -125,7 +129,6 @@ public TransferAnswerCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -136,7 +139,7 @@ public void setEventType(String eventType) { } - public TransferAnswerCallback eventTime(String eventTime) { + public TransferAnswerCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -147,13 +150,12 @@ public TransferAnswerCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -169,7 +171,6 @@ public TransferAnswerCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -191,7 +192,6 @@ public TransferAnswerCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -213,7 +213,6 @@ public TransferAnswerCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -235,7 +234,6 @@ public TransferAnswerCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -257,7 +255,6 @@ public TransferAnswerCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -279,7 +276,6 @@ public TransferAnswerCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -301,7 +297,6 @@ public TransferAnswerCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -323,7 +318,6 @@ public TransferAnswerCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -345,7 +339,6 @@ public TransferAnswerCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -367,7 +360,6 @@ public TransferAnswerCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -389,7 +381,6 @@ public TransferAnswerCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -411,7 +402,6 @@ public TransferAnswerCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -433,7 +423,6 @@ public TransferAnswerCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -549,31 +538,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransferAnswerCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransferAnswerCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransferAnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransferAnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TransferAnswerCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferAnswerCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferAnswerCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -623,9 +610,9 @@ public void write(JsonWriter out, TransferAnswerCallback value) throws IOExcepti @Override public TransferAnswerCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TransferCompleteCallback.java b/src/main/java/org/openapitools/client/model/TransferCompleteCallback.java index 23db52d6..100d612d 100644 --- a/src/main/java/org/openapitools/client/model/TransferCompleteCallback.java +++ b/src/main/java/org/openapitools/client/model/TransferCompleteCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -137,7 +141,6 @@ public TransferCompleteCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -148,7 +151,7 @@ public void setEventType(String eventType) { } - public TransferCompleteCallback eventTime(String eventTime) { + public TransferCompleteCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -159,13 +162,12 @@ public TransferCompleteCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -181,7 +183,6 @@ public TransferCompleteCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -203,7 +204,6 @@ public TransferCompleteCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -225,7 +225,6 @@ public TransferCompleteCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -247,7 +246,6 @@ public TransferCompleteCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -269,7 +267,6 @@ public TransferCompleteCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -291,7 +288,6 @@ public TransferCompleteCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -313,7 +309,6 @@ public TransferCompleteCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -335,7 +330,6 @@ public TransferCompleteCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -357,7 +351,6 @@ public TransferCompleteCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -379,7 +372,6 @@ public TransferCompleteCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -401,7 +393,6 @@ public TransferCompleteCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -423,7 +414,6 @@ public TransferCompleteCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -445,7 +435,6 @@ public TransferCompleteCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -467,7 +456,6 @@ public TransferCompleteCallback cause(String cause) { * @return cause **/ @javax.annotation.Nullable - public String getCause() { return cause; } @@ -489,7 +477,6 @@ public TransferCompleteCallback errorMessage(String errorMessage) { * @return errorMessage **/ @javax.annotation.Nullable - public String getErrorMessage() { return errorMessage; } @@ -511,7 +498,6 @@ public TransferCompleteCallback errorId(String errorId) { * @return errorId **/ @javax.annotation.Nullable - public String getErrorId() { return errorId; } @@ -636,31 +622,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransferCompleteCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransferCompleteCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransferCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransferCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TransferCompleteCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferCompleteCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferCompleteCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -719,9 +703,9 @@ public void write(JsonWriter out, TransferCompleteCallback value) throws IOExcep @Override public TransferCompleteCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/TransferDisconnectCallback.java b/src/main/java/org/openapitools/client/model/TransferDisconnectCallback.java index 4a947cd3..12365be2 100644 --- a/src/main/java/org/openapitools/client/model/TransferDisconnectCallback.java +++ b/src/main/java/org/openapitools/client/model/TransferDisconnectCallback.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.client.model.CallDirectionEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,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-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -57,7 +61,7 @@ public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; @SerializedName(SERIALIZED_NAME_EVENT_TIME) - private String eventTime; + private OffsetDateTime eventTime; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -145,7 +149,6 @@ public TransferDisconnectCallback eventType(String eventType) { * @return eventType **/ @javax.annotation.Nullable - public String getEventType() { return eventType; } @@ -156,7 +159,7 @@ public void setEventType(String eventType) { } - public TransferDisconnectCallback eventTime(String eventTime) { + public TransferDisconnectCallback eventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; return this; @@ -167,13 +170,12 @@ public TransferDisconnectCallback eventTime(String eventTime) { * @return eventTime **/ @javax.annotation.Nullable - - public String getEventTime() { + public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(String eventTime) { + public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } @@ -189,7 +191,6 @@ public TransferDisconnectCallback accountId(String accountId) { * @return accountId **/ @javax.annotation.Nullable - public String getAccountId() { return accountId; } @@ -211,7 +212,6 @@ public TransferDisconnectCallback applicationId(String applicationId) { * @return applicationId **/ @javax.annotation.Nullable - public String getApplicationId() { return applicationId; } @@ -233,7 +233,6 @@ public TransferDisconnectCallback from(String from) { * @return from **/ @javax.annotation.Nullable - public String getFrom() { return from; } @@ -255,7 +254,6 @@ public TransferDisconnectCallback to(String to) { * @return to **/ @javax.annotation.Nullable - public String getTo() { return to; } @@ -277,7 +275,6 @@ public TransferDisconnectCallback direction(CallDirectionEnum direction) { * @return direction **/ @javax.annotation.Nullable - public CallDirectionEnum getDirection() { return direction; } @@ -299,7 +296,6 @@ public TransferDisconnectCallback callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -321,7 +317,6 @@ public TransferDisconnectCallback callUrl(String callUrl) { * @return callUrl **/ @javax.annotation.Nullable - public String getCallUrl() { return callUrl; } @@ -343,7 +338,6 @@ public TransferDisconnectCallback parentCallId(String parentCallId) { * @return parentCallId **/ @javax.annotation.Nullable - public String getParentCallId() { return parentCallId; } @@ -365,7 +359,6 @@ public TransferDisconnectCallback enqueuedTime(OffsetDateTime enqueuedTime) { * @return enqueuedTime **/ @javax.annotation.Nullable - public OffsetDateTime getEnqueuedTime() { return enqueuedTime; } @@ -387,7 +380,6 @@ public TransferDisconnectCallback startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nullable - public OffsetDateTime getStartTime() { return startTime; } @@ -409,7 +401,6 @@ public TransferDisconnectCallback answerTime(OffsetDateTime answerTime) { * @return answerTime **/ @javax.annotation.Nullable - public OffsetDateTime getAnswerTime() { return answerTime; } @@ -431,7 +422,6 @@ public TransferDisconnectCallback endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable - public OffsetDateTime getEndTime() { return endTime; } @@ -453,7 +443,6 @@ public TransferDisconnectCallback tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -475,7 +464,6 @@ public TransferDisconnectCallback transferCallerId(String transferCallerId) { * @return transferCallerId **/ @javax.annotation.Nullable - public String getTransferCallerId() { return transferCallerId; } @@ -497,7 +485,6 @@ public TransferDisconnectCallback transferTo(String transferTo) { * @return transferTo **/ @javax.annotation.Nullable - public String getTransferTo() { return transferTo; } @@ -519,7 +506,6 @@ public TransferDisconnectCallback cause(String cause) { * @return cause **/ @javax.annotation.Nullable - public String getCause() { return cause; } @@ -541,7 +527,6 @@ public TransferDisconnectCallback errorMessage(String errorMessage) { * @return errorMessage **/ @javax.annotation.Nullable - public String getErrorMessage() { return errorMessage; } @@ -563,7 +548,6 @@ public TransferDisconnectCallback errorId(String errorId) { * @return errorId **/ @javax.annotation.Nullable - public String getErrorId() { return errorId; } @@ -694,31 +678,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransferDisconnectCallback + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransferDisconnectCallback */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransferDisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransferDisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!TransferDisconnectCallback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferDisconnectCallback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferDisconnectCallback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } - if ((jsonObj.get("eventTime") != null && !jsonObj.get("eventTime").isJsonNull()) && !jsonObj.get("eventTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTime").toString())); - } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } @@ -780,9 +762,9 @@ public void write(JsonWriter out, TransferDisconnectCallback value) throws IOExc @Override public TransferDisconnectCallback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/UpdateCall.java b/src/main/java/org/openapitools/client/model/UpdateCall.java index e4decc27..1001cb21 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCall.java +++ b/src/main/java/org/openapitools/client/model/UpdateCall.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import org.openapitools.client.model.CallStateEnum; import org.openapitools.client.model.RedirectMethodEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,7 @@ /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -106,7 +110,6 @@ public UpdateCall state(CallStateEnum state) { * @return state **/ @javax.annotation.Nullable - public CallStateEnum getState() { return state; } @@ -128,7 +131,6 @@ public UpdateCall redirectUrl(URI redirectUrl) { * @return redirectUrl **/ @javax.annotation.Nullable - public URI getRedirectUrl() { return redirectUrl; } @@ -150,7 +152,6 @@ public UpdateCall redirectMethod(RedirectMethodEnum redirectMethod) { * @return redirectMethod **/ @javax.annotation.Nullable - public RedirectMethodEnum getRedirectMethod() { return redirectMethod; } @@ -172,7 +173,6 @@ public UpdateCall username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -194,7 +194,6 @@ public UpdateCall password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -212,11 +211,10 @@ public UpdateCall redirectFallbackUrl(URI redirectFallbackUrl) { } /** - * A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond + * A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. * @return redirectFallbackUrl **/ @javax.annotation.Nullable - public URI getRedirectFallbackUrl() { return redirectFallbackUrl; } @@ -238,7 +236,6 @@ public UpdateCall redirectFallbackMethod(RedirectMethodEnum redirectFallbackMeth * @return redirectFallbackMethod **/ @javax.annotation.Nullable - public RedirectMethodEnum getRedirectFallbackMethod() { return redirectFallbackMethod; } @@ -260,7 +257,6 @@ public UpdateCall fallbackUsername(String fallbackUsername) { * @return fallbackUsername **/ @javax.annotation.Nullable - public String getFallbackUsername() { return fallbackUsername; } @@ -282,7 +278,6 @@ public UpdateCall fallbackPassword(String fallbackPassword) { * @return fallbackPassword **/ @javax.annotation.Nullable - public String getFallbackPassword() { return fallbackPassword; } @@ -304,7 +299,6 @@ public UpdateCall tag(String tag) { * @return tag **/ @javax.annotation.Nullable - public String getTag() { return tag; } @@ -405,25 +399,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateCall + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCall */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!UpdateCall.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCall` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCall` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -467,9 +462,9 @@ public void write(JsonWriter out, UpdateCall value) throws IOException { @Override public UpdateCall read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/UpdateCallRecording.java b/src/main/java/org/openapitools/client/model/UpdateCallRecording.java index cc43550d..bdec9d93 100644 --- a/src/main/java/org/openapitools/client/model/UpdateCallRecording.java +++ b/src/main/java/org/openapitools/client/model/UpdateCallRecording.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import org.openapitools.client.model.RecordingStateEnum; import com.google.gson.Gson; @@ -33,6 +33,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +51,7 @@ /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -67,7 +71,6 @@ public UpdateCallRecording state(RecordingStateEnum state) { * @return state **/ @javax.annotation.Nonnull - public RecordingStateEnum getState() { return state; } @@ -131,32 +134,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateCallRecording + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCallRecording */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateCallRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCallRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!UpdateCallRecording.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCallRecording` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCallRecording` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateCallRecording.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -179,9 +183,9 @@ public void write(JsonWriter out, UpdateCallRecording value) throws IOException @Override public UpdateCallRecording read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/UpdateConference.java b/src/main/java/org/openapitools/client/model/UpdateConference.java index f3e5c66d..f44e8fbe 100644 --- a/src/main/java/org/openapitools/client/model/UpdateConference.java +++ b/src/main/java/org/openapitools/client/model/UpdateConference.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import org.openapitools.client.model.ConferenceStateEnum; import org.openapitools.client.model.RedirectMethodEnum; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,6 +36,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -50,7 +54,7 @@ /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -102,7 +106,6 @@ public UpdateConference status(ConferenceStateEnum status) { * @return status **/ @javax.annotation.Nullable - public ConferenceStateEnum getStatus() { return status; } @@ -120,11 +123,10 @@ public UpdateConference redirectUrl(URI redirectUrl) { } /** - * The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active` + * The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. * @return redirectUrl **/ @javax.annotation.Nullable - public URI getRedirectUrl() { return redirectUrl; } @@ -146,7 +148,6 @@ public UpdateConference redirectMethod(RedirectMethodEnum redirectMethod) { * @return redirectMethod **/ @javax.annotation.Nullable - public RedirectMethodEnum getRedirectMethod() { return redirectMethod; } @@ -168,7 +169,6 @@ public UpdateConference username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { return username; } @@ -190,7 +190,6 @@ public UpdateConference password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { return password; } @@ -212,7 +211,6 @@ public UpdateConference redirectFallbackUrl(URI redirectFallbackUrl) { * @return redirectFallbackUrl **/ @javax.annotation.Nullable - public URI getRedirectFallbackUrl() { return redirectFallbackUrl; } @@ -234,7 +232,6 @@ public UpdateConference redirectFallbackMethod(RedirectMethodEnum redirectFallba * @return redirectFallbackMethod **/ @javax.annotation.Nullable - public RedirectMethodEnum getRedirectFallbackMethod() { return redirectFallbackMethod; } @@ -256,7 +253,6 @@ public UpdateConference fallbackUsername(String fallbackUsername) { * @return fallbackUsername **/ @javax.annotation.Nullable - public String getFallbackUsername() { return fallbackUsername; } @@ -278,7 +274,6 @@ public UpdateConference fallbackPassword(String fallbackPassword) { * @return fallbackPassword **/ @javax.annotation.Nullable - public String getFallbackPassword() { return fallbackPassword; } @@ -376,25 +371,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateConference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateConference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!UpdateConference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -435,9 +431,9 @@ public void write(JsonWriter out, UpdateConference value) throws IOException { @Override public UpdateConference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/UpdateConferenceMember.java b/src/main/java/org/openapitools/client/model/UpdateConferenceMember.java index ade85af1..6aeacf36 100644 --- a/src/main/java/org/openapitools/client/model/UpdateConferenceMember.java +++ b/src/main/java/org/openapitools/client/model/UpdateConferenceMember.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -35,6 +35,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -49,7 +53,7 @@ /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) @@ -77,7 +81,6 @@ public UpdateConferenceMember mute(Boolean mute) { * @return mute **/ @javax.annotation.Nullable - public Boolean getMute() { return mute; } @@ -99,7 +102,6 @@ public UpdateConferenceMember hold(Boolean hold) { * @return hold **/ @javax.annotation.Nullable - public Boolean getHold() { return hold; } @@ -117,6 +119,9 @@ public UpdateConferenceMember callIdsToCoach(List callIdsToCoach) { } public UpdateConferenceMember addCallIdsToCoachItem(String callIdsToCoachItem) { + if (this.callIdsToCoach == null) { + this.callIdsToCoach = new ArrayList<>(); + } this.callIdsToCoach.add(callIdsToCoachItem); return this; } @@ -126,7 +131,6 @@ public UpdateConferenceMember addCallIdsToCoachItem(String callIdsToCoachItem) { * @return callIdsToCoach **/ @javax.annotation.Nullable - public List getCallIdsToCoach() { return callIdsToCoach; } @@ -206,27 +210,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateConferenceMember + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateConferenceMember */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!UpdateConferenceMember.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConferenceMember` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateConferenceMember` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonArray()) { + if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -251,9 +256,9 @@ public void write(JsonWriter out, UpdateConferenceMember value) throws IOExcepti @Override public UpdateConferenceMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/VerifyCodeRequest.java b/src/main/java/org/openapitools/client/model/VerifyCodeRequest.java index e04bb163..73d8bee3 100644 --- a/src/main/java/org/openapitools/client/model/VerifyCodeRequest.java +++ b/src/main/java/org/openapitools/client/model/VerifyCodeRequest.java @@ -14,7 +14,6 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,6 +33,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +51,7 @@ /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -79,7 +83,6 @@ public VerifyCodeRequest to(String to) { * @return to **/ @javax.annotation.Nonnull - public String getTo() { return to; } @@ -101,7 +104,6 @@ public VerifyCodeRequest scope(String scope) { * @return scope **/ @javax.annotation.Nullable - public String getScope() { return scope; } @@ -125,7 +127,6 @@ public VerifyCodeRequest expirationTimeInMinutes(BigDecimal expirationTimeInMinu * @return expirationTimeInMinutes **/ @javax.annotation.Nonnull - public BigDecimal getExpirationTimeInMinutes() { return expirationTimeInMinutes; } @@ -147,7 +148,6 @@ public VerifyCodeRequest code(String code) { * @return code **/ @javax.annotation.Nonnull - public String getCode() { return code; } @@ -222,32 +222,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifyCodeRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifyCodeRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifyCodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifyCodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!VerifyCodeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyCodeRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyCodeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerifyCodeRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!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())); } @@ -279,9 +280,9 @@ public void write(JsonWriter out, VerifyCodeRequest value) throws IOException { @Override public VerifyCodeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/VerifyCodeResponse.java b/src/main/java/org/openapitools/client/model/VerifyCodeResponse.java index 260a5a17..de6fceef 100644 --- a/src/main/java/org/openapitools/client/model/VerifyCodeResponse.java +++ b/src/main/java/org/openapitools/client/model/VerifyCodeResponse.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) @@ -66,7 +70,6 @@ public VerifyCodeResponse valid(Boolean valid) { * @return valid **/ @javax.annotation.Nullable - public Boolean getValid() { return valid; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifyCodeResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifyCodeResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifyCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifyCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!VerifyCodeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyCodeResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyCodeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -170,9 +174,9 @@ public void write(JsonWriter out, VerifyCodeResponse value) throws IOException { @Override public VerifyCodeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/VoiceApiError.java b/src/main/java/org/openapitools/client/model/VoiceApiError.java index 1752da13..2ff633d1 100644 --- a/src/main/java/org/openapitools/client/model/VoiceApiError.java +++ b/src/main/java/org/openapitools/client/model/VoiceApiError.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -33,6 +33,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -47,7 +51,7 @@ /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -75,7 +79,6 @@ public VoiceApiError type(String type) { * @return type **/ @javax.annotation.Nullable - public String getType() { return type; } @@ -97,7 +100,6 @@ public VoiceApiError description(String description) { * @return description **/ @javax.annotation.Nullable - public String getDescription() { return description; } @@ -119,7 +121,6 @@ public VoiceApiError id(String id) { * @return id **/ @javax.annotation.Nullable - public String getId() { return id; } @@ -199,25 +200,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VoiceApiError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VoiceApiError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VoiceApiError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VoiceApiError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!VoiceApiError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VoiceApiError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VoiceApiError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -249,9 +251,9 @@ public void write(JsonWriter out, VoiceApiError value) throws IOException { @Override public VoiceApiError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/main/java/org/openapitools/client/model/VoiceCodeResponse.java b/src/main/java/org/openapitools/client/model/VoiceCodeResponse.java index 89e6891e..c09943ec 100644 --- a/src/main/java/org/openapitools/client/model/VoiceCodeResponse.java +++ b/src/main/java/org/openapitools/client/model/VoiceCodeResponse.java @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,6 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -46,7 +50,7 @@ /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-02-21T09:43:53.001100-05:00[America/New_York]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-25T14:55:39.427023-04:00[America/New_York]") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -66,7 +70,6 @@ public VoiceCodeResponse callId(String callId) { * @return callId **/ @javax.annotation.Nullable - public String getCallId() { return callId; } @@ -129,25 +132,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VoiceCodeResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VoiceCodeResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VoiceCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VoiceCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!VoiceCodeResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VoiceCodeResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VoiceCodeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); 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())); } @@ -173,9 +177,9 @@ public void write(JsonWriter out, VoiceCodeResponse value) throws IOException { @Override public VoiceCodeResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); diff --git a/src/test/java/org/openapitools/client/api/ConferencesApiTest.java b/src/test/java/org/openapitools/client/api/ConferencesApiTest.java index e7f8e03c..8c33830b 100644 --- a/src/test/java/org/openapitools/client/api/ConferencesApiTest.java +++ b/src/test/java/org/openapitools/client/api/ConferencesApiTest.java @@ -209,10 +209,8 @@ public void testConferenceRecordings() throws Exception { Boolean testRecordingStatus = false; for (int i = 0; i < MAX_RETRIES; i++) { - while (!testRecordingStatus) { TimeUnit.SECONDS.sleep(TEST_SLEEP); testRecordingStatus = getTestRecordedStatus(testId); - } } assertThat(testRecordingStatus, is(true)); diff --git a/src/test/java/org/openapitools/client/api/MessagesApiTest.java b/src/test/java/org/openapitools/client/api/MessagesApiTest.java index d7899630..dab434e9 100644 --- a/src/test/java/org/openapitools/client/api/MessagesApiTest.java +++ b/src/test/java/org/openapitools/client/api/MessagesApiTest.java @@ -56,6 +56,7 @@ public class MessagesApiTest { Integer errorCode = null; String fromDateTime = null; String toDateTime = null; + String campaignId = null; String sort = "sourceTn:desc"; String pageToken = null; Integer limit = 50; @@ -78,8 +79,8 @@ public void listMessagesTest() throws ApiException { Basic.setUsername(BW_USERNAME); Basic.setPassword(BW_PASSWORD); MessagesList response = api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, - messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, - limit); + messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, + limit, false); assertThat(response, instanceOf(MessagesList.class)); assertThat(response.getTotalCount(), greaterThan(0)); @@ -104,7 +105,7 @@ public void listMessageBadRequestTest() { ApiException exception = Assertions.assertThrows(ApiException.class, () -> api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, - carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit)); + carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, false)); assertThat(exception.getCode(), is(400)); } @@ -117,7 +118,7 @@ public void listMessageUnauthorizedTest() { ApiException exception = Assertions.assertThrows(ApiException.class, () -> api.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, - carrierName, messageType, errorCode, fromDateTime, toDateTime, sort, pageToken, limit)); + carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, false)); assertThat(exception.getCode(), is(401)); } diff --git a/src/test/java/org/openapitools/client/model/MachineDetectionResultTest.java b/src/test/java/org/openapitools/client/model/MachineDetectionResultTest.java new file mode 100644 index 00000000..aa0be193 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/MachineDetectionResultTest.java @@ -0,0 +1,56 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MachineDetectionResult + */ +public class MachineDetectionResultTest { + private final MachineDetectionResult model = new MachineDetectionResult(); + + /** + * Model tests for MachineDetectionResult + */ + @Test + public void testMachineDetectionResult() { + // TODO: test MachineDetectionResult + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'duration' + */ + @Test + public void durationTest() { + // TODO: test duration + } + +} diff --git a/src/test/java/org/openapitools/client/utils/CallCleanup.java b/src/test/java/org/openapitools/client/utils/CallCleanup.java index d12bc158..b0c8f672 100644 --- a/src/test/java/org/openapitools/client/utils/CallCleanup.java +++ b/src/test/java/org/openapitools/client/utils/CallCleanup.java @@ -47,9 +47,9 @@ public static final void Cleanup(CallsApiTest testClass, List callIdList } /** - * Ensure that all CallIds inside of the callIdList have been hung up + * Ensure that the call has been hung up * - * @param callIdList List of Bandwidth call ID's + * @param callId Bandwidth call ID */ public static final void Cleanup(ConferencesApiTest testClass, String callId) throws Exception { TimeUnit.SECONDS.sleep(TEST_SLEEP); From 2b1db1e1847320dd07f077fce9df4299075ba9c5 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Fri, 25 Aug 2023 15:50:57 -0400 Subject: [PATCH 3/5] Run tests on PRs --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87d10441..d91d87d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,10 @@ name: Test on: # schedule: # - cron: "0 4 * * *" - # pull_request: + pull_request: + branches: + - main + - feature/* workflow_dispatch: jobs: From 0d793ae7e789dda73f8a8f698e0f03aad2846505 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Mon, 28 Aug 2023 09:36:52 -0400 Subject: [PATCH 4/5] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d91d87d1..106096aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,7 @@ jobs: run: mvn -B package --file pom.xml - name: Notify Slack of Failures - uses: Bandwidth/build-notify-slack-action@v1.0.0 + uses: Bandwidth/build-notify-slack-action@v1.0.1 if: failure() && !github.event.pull_request.draft with: job-status: ${{ job.status }} From 5e687ae89c51497fb8b618a3e2caaac70e7b5cd2 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:23:20 -0400 Subject: [PATCH 5/5] Revert changes to `maven.yml` --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fad1b9f0..b8250cce 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8' ] + java: [ '11' ] steps: - uses: actions/checkout@v2 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} distribution: 'temurin'