diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 08281dbe..60258aad 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -169,6 +169,8 @@ docs/RecordingTranscriptions.md docs/RecordingsApi.md docs/RedirectCallback.md docs/RedirectMethodEnum.md +docs/ReferCallStatusEnum.md +docs/ReferCompleteCallback.md docs/SipConnectionMetadata.md docs/SipCredentials.md docs/SmsMessageContent.md @@ -413,6 +415,8 @@ src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java src/main/java/com/bandwidth/sdk/model/RedirectCallback.java src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +src/main/java/com/bandwidth/sdk/model/ReferCallStatusEnum.java +src/main/java/com/bandwidth/sdk/model/ReferCompleteCallback.java src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java src/main/java/com/bandwidth/sdk/model/SipCredentials.java src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 07832195..6328c542 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.24.0 +7.17.0 diff --git a/README.md b/README.md index 327c0bbb..8a0d5d1f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Generator version: 7.24.0 + - Generator version: 7.17.0 Bandwidth's Communication APIs @@ -345,6 +345,8 @@ Class | Method | HTTP request | Description - [RecordingTranscriptions](docs/RecordingTranscriptions.md) - [RedirectCallback](docs/RedirectCallback.md) - [RedirectMethodEnum](docs/RedirectMethodEnum.md) + - [ReferCallStatusEnum](docs/ReferCallStatusEnum.md) + - [ReferCompleteCallback](docs/ReferCompleteCallback.md) - [SipConnectionMetadata](docs/SipConnectionMetadata.md) - [SipCredentials](docs/SipCredentials.md) - [SmsMessageContent](docs/SmsMessageContent.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 2cfff7d2..f2b1b222 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -9265,59 +9265,59 @@ components: type: object messagesList: example: - totalCount: 100 pageInfo: - prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 - nextPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&prevPage=GL83PD3C prevPageToken: DLAPE902 + nextPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&prevPage=GL83PD3C nextPageToken: GL83PD3C + prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 messages: - - messageId: 1589228074636lm4k2je7j7jklbn2 - accountId: "9900000" + - callingNumberCountryA3: USA + product: P2P sourceTn: "+15554443333" + messageLength: 18 + campaignId: CJEUMDK + messageId: 1589228074636lm4k2je7j7jklbn2 + errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" + segmentCount: 1 messageStatus: RECEIVED + receiveTime: 2020-04-07T14:03:07Z + accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms - segmentCount: 1 - errorCode: 9902 - receiveTime: 2020-04-07T14:03:07Z carrierName: other - messageSize: 27 - messageLength: 18 - attachmentCount: 1 recipientCount: 1 campaignClass: T - campaignId: CJEUMDK bwLatency: 20 - carrierLatency: 20 - callingNumberCountryA3: USA - calledNumberCountryA3: USA - product: P2P + attachmentCount: 1 location: 123ID - - messageId: 1589228074636lm4k2je7j7jklbn2 - accountId: "9900000" + messageSize: 27 + - callingNumberCountryA3: USA + product: P2P sourceTn: "+15554443333" + messageLength: 18 + campaignId: CJEUMDK + messageId: 1589228074636lm4k2je7j7jklbn2 + errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" + segmentCount: 1 messageStatus: RECEIVED + receiveTime: 2020-04-07T14:03:07Z + accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms - segmentCount: 1 - errorCode: 9902 - receiveTime: 2020-04-07T14:03:07Z carrierName: other - messageSize: 27 - messageLength: 18 - attachmentCount: 1 recipientCount: 1 campaignClass: T - campaignId: CJEUMDK bwLatency: 20 - carrierLatency: 20 - callingNumberCountryA3: USA - calledNumberCountryA3: USA - product: P2P + attachmentCount: 1 location: 123ID + messageSize: 27 + totalCount: 100 properties: totalCount: description: "The total number of messages matched by the search. When the\ @@ -9334,29 +9334,29 @@ components: type: object listMessageItem: example: - messageId: 1589228074636lm4k2je7j7jklbn2 - accountId: "9900000" + callingNumberCountryA3: USA + product: P2P sourceTn: "+15554443333" + messageLength: 18 + campaignId: CJEUMDK + messageId: 1589228074636lm4k2je7j7jklbn2 + errorCode: 9902 + calledNumberCountryA3: USA destinationTn: "+15554442222" + segmentCount: 1 messageStatus: RECEIVED + receiveTime: 2020-04-07T14:03:07Z + accountId: "9900000" messageDirection: INBOUND + carrierLatency: 20 messageType: sms - segmentCount: 1 - errorCode: 9902 - receiveTime: 2020-04-07T14:03:07Z carrierName: other - messageSize: 27 - messageLength: 18 - attachmentCount: 1 recipientCount: 1 campaignClass: T - campaignId: CJEUMDK bwLatency: 20 - carrierLatency: 20 - callingNumberCountryA3: USA - calledNumberCountryA3: USA - product: P2P + attachmentCount: 1 location: 123ID + messageSize: 27 properties: messageId: description: The message id @@ -9466,10 +9466,10 @@ components: type: object pageInfo: example: - prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 - nextPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&prevPage=GL83PD3C prevPageToken: DLAPE902 + nextPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&prevPage=GL83PD3C nextPageToken: GL83PD3C + prevPage: https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 properties: prevPage: description: The link to the previous page for pagination. @@ -9491,8 +9491,8 @@ components: type: object messagingRequestError: example: - type: type description: description + type: type properties: type: type: string @@ -9505,8 +9505,6 @@ components: type: object createMessageRequestError: example: - type: type - description: description fieldErrors: - fieldName: from description: '''+invalid'' must be replaced with a valid E164 formatted @@ -9514,6 +9512,8 @@ components: - fieldName: from description: '''+invalid'' must be replaced with a valid E164 formatted telephone number' + description: description + type: type properties: type: type: string @@ -9534,8 +9534,8 @@ components: type: string media: example: - content: content contentLength: 1024 + content: content mediaName: image.png properties: content: @@ -9575,21 +9575,21 @@ components: type: string message: example: - id: 1589228074636lm4k2je7j7jklbn2 owner: "+15554443333" - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - time: 2024-12-02T20:15:57.278Z + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + priority: default segmentCount: 1 - direction: in + from: "+15553332222" + expiration: 2021-02-01T11:29:18-05:00 + id: 1589228074636lm4k2je7j7jklbn2 + time: 2024-12-02T20:15:57.278Z to: - "+15552223333" - from: "+15553332222" - media: - - https://dev.bandwidth.com/images/bandwidth-logo.png text: Hello world tag: custom string - priority: default - expiration: 2021-02-01T11:29:18-05:00 + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + direction: in properties: id: description: The id of the message. @@ -9740,105 +9740,125 @@ components: type: array createMultiChannelMessageResponse: example: - links: [] data: - id: 1589228074636lm4k2je7j7jklbn2 - time: 2025-01-01T18:20:16Z - direction: in - to: - - "+15554443333" channelList: - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner + type: REPLY + text: Hello world + expiration: 2021-02-01T11:29:18-05:00 + id: 1589228074636lm4k2je7j7jklbn2 + time: 2025-01-01T18:20:16Z + to: + - "+15554443333" tag: custom string priority: default - expiration: 2021-02-01T11:29:18-05:00 + direction: in + links: [] errors: [] properties: links: @@ -9856,23 +9876,23 @@ components: type: object multiChannelError: example: - links: [] data: "{}" + links: [] errors: - - type: type - description: description + - description: description source: - parameter: parameter + reference: reference field: field + parameter: parameter header: header - reference: reference - - type: type - description: description + type: type + - description: description source: - parameter: parameter + reference: reference field: field + parameter: parameter header: header - reference: reference + type: type properties: links: example: [] @@ -9897,13 +9917,13 @@ components: type: object errorObject: example: - type: type description: description source: - parameter: parameter + reference: reference field: field + parameter: parameter header: header - reference: reference + type: type properties: type: description: A concise summary of the error used for categorization. @@ -9921,10 +9941,10 @@ components: errorSource: description: "Specifies relevant sources of the error, if any." example: - parameter: parameter + reference: reference field: field + parameter: parameter header: header - reference: reference properties: parameter: description: The relevant URI query parameter causing the error @@ -9967,23 +9987,28 @@ components: uniqueItems: true rbmMessageContentText: example: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= + type: REPLY + text: Hello world properties: text: description: The text associated with the message. Must be 3270 characters @@ -10215,16 +10240,18 @@ components: type: string rbmActionPostbackData: description: Base64 payload the customer receives when the reply is clicked. - example: SGVsbG8gd29ybGQ= + example: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== format: byte maxLength: 2048 title: Post Back Data type: string rbmActionBase: example: - type: REPLY + postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= + type: REPLY properties: type: $ref: "#/components/schemas/rbmActionTypeEnum" @@ -10236,7 +10263,8 @@ components: type: string postbackData: description: Base64 payload the customer receives when the reply is clicked. - example: SGVsbG8gd29ybGQ= + example: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== format: byte maxLength: 2048 title: Post Back Data @@ -10408,28 +10436,33 @@ components: - $ref: "#/components/schemas/multiChannelChannelListRBMObject" - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" example: + owner: owner + channel: RBM from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - channel: RBM content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner + type: REPLY + text: Hello world multiChannelChannelListSMSResponseObject: allOf: - $ref: "#/components/schemas/multiChannelChannelListSMSObject" @@ -10506,103 +10539,123 @@ components: multiChannelMessageResponseData: description: The data returned in a multichannel message response. example: - id: 1589228074636lm4k2je7j7jklbn2 - time: 2025-01-01T18:20:16Z - direction: in - to: - - "+15554443333" channelList: - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner - - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + type: REPLY + text: Hello world + - owner: owner channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: - text: Hello world suggestions: - - type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - - type: REPLY + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== text: Hello world - postbackData: SGVsbG8gd29ybGQ= - owner: owner + type: REPLY + text: Hello world + expiration: 2021-02-01T11:29:18-05:00 + id: 1589228074636lm4k2je7j7jklbn2 + time: 2025-01-01T18:20:16Z + to: + - "+15554443333" tag: custom string priority: default - expiration: 2021-02-01T11:29:18-05:00 + direction: in properties: id: description: The ID of the message. @@ -10669,7 +10722,8 @@ components: type: string postbackData: description: Base64 payload the customer receives when the reply is clicked. - example: SGVsbG8gd29ybGQ= + example: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== format: byte maxLength: 2048 title: Post Back Data @@ -10955,6 +11009,13 @@ components: - outbound example: inbound type: string + referCallStatusEnum: + description: The outcome of the REFER operation. + enum: + - success + - failure + example: success + type: string fileFormatEnum: description: The format that the recording is stored in. enum: @@ -11178,27 +11239,27 @@ components: type: object createCallResponse: example: - applicationId: 04e88489-df02-4e34-a0ee-27a91849555f - accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - to: "+19195551234" - from: "+19195554321" - enqueuedTime: 2022-06-16T13:15:07.16Z + answerUrl: https://myServer.example/bandwidth/webhooks/answer callUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - callTimeout: 30 callbackTimeout: 15 - tag: My custom tag value - answerMethod: POST - answerUrl: https://myServer.example/bandwidth/webhooks/answer answerFallbackMethod: POST answerFallbackUrl: https://myFallbackServer.example/bandwidth/webhooks/answer + callTimeout: 30 + priority: 5 disconnectMethod: POST + accountId: "9900000" + password: mySecretPassword1! + answerMethod: POST + enqueuedTime: 2022-06-16T13:15:07.16Z disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect + from: "+19195554321" + fallbackPassword: mySecretPassword1! + to: "+19195551234" + tag: My custom tag value + applicationId: 04e88489-df02-4e34-a0ee-27a91849555f username: mySecretUsername - password: mySecretPassword1! fallbackUsername: mySecretUsername - fallbackPassword: mySecretPassword1! - priority: 5 properties: applicationId: description: The id of the application associated with the `from` number. @@ -11313,27 +11374,27 @@ components: type: object callState: example: - applicationId: 04e88489-df02-4e34-a0ee-27a91849555f - accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + answerTime: 2022-06-16T13:15:18.126Z parentCallId: c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - to: "+19195551234" - from: "+19195554321" - direction: inbound - state: disconnected + disconnectCause: disconnectCause + errorMessage: errorMessage + accountId: "9900000" + identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9idy1zaGFrZW4tY2VydC1wdWIuczMuYW1hem9uYXdzLmNvbS9iYW5kd2lkdGgtc2hha2VuLWNlcnRfMjAyMzA3MTYucGVtIn0.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTg0MjgyMDI4MCJdfSwiaWF0IjoxNjU2NTM0MzM2LCJvcmlnIjp7InRuIjoiMTkxOTQ0NDI2ODMifSwib3JpZ2lkIjoiNDk0NTlhOGEtNDJmNi0zNTFjLTkzNjEtYWRmNTdhOWUwOGNhIn0.56un9sRw_uH-sbJvnUsqdevlVxbOVjn8MVlGTlBMicjaZuRRwxfiNp-C9zYCMKTTCbc-QdYPN05F61XNVN4D3w;info=;alg=ES256;ppt=shaken + enqueuedTime: 2022-06-16T13:15:07.16Z + lastUpdate: 2022-06-16T13:15:18.314Z stirShaken: verstat: TN-Validation-Passed attestationIndicator: A originatingId: abc123 - identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9idy1zaGFrZW4tY2VydC1wdWIuczMuYW1hem9uYXdzLmNvbS9iYW5kd2lkdGgtc2hha2VuLWNlcnRfMjAyMzA3MTYucGVtIn0.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTg0MjgyMDI4MCJdfSwiaWF0IjoxNjU2NTM0MzM2LCJvcmlnIjp7InRuIjoiMTkxOTQ0NDI2ODMifSwib3JpZ2lkIjoiNDk0NTlhOGEtNDJmNi0zNTFjLTkzNjEtYWRmNTdhOWUwOGNhIn0.56un9sRw_uH-sbJvnUsqdevlVxbOVjn8MVlGTlBMicjaZuRRwxfiNp-C9zYCMKTTCbc-QdYPN05F61XNVN4D3w;info=;alg=ES256;ppt=shaken - enqueuedTime: 2022-06-16T13:15:07.16Z + from: "+19195554321" startTime: 2022-06-16T13:15:07.16Z - answerTime: 2022-06-16T13:15:18.126Z + to: "+19195551234" + state: disconnected endTime: 2022-06-16T13:15:18.314Z - disconnectCause: disconnectCause - errorMessage: errorMessage errorId: errorId - lastUpdate: 2022-06-16T13:15:18.314Z + applicationId: 04e88489-df02-4e34-a0ee-27a91849555f + direction: inbound properties: applicationId: description: The application id associated with the call. @@ -11560,29 +11621,29 @@ components: type: object callRecordingMetadata: example: - applicationId: 04e88489-df02-4e34-a0ee-27a91849555f - accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media + transcription: + completedTime: 2022-06-13T18:46:29.715Z + id: t-387bd648-18f3-4823-9d16-746bca0003c9 + url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription + status: completed parentCallId: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d - recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 - to: "+15555555555" - from: "+15555555555" + recordingName: my-recording-name transferCallerId: "+15555555555" transferTo: "+15555555555" duration: PT13.67S - direction: inbound + accountId: "9900000" channels: 1 + from: "+15555555555" startTime: 2022-06-17T22:19:40.375Z + to: "+15555555555" endTime: 2022-06-17T22:20:00Z + applicationId: 04e88489-df02-4e34-a0ee-27a91849555f + recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 fileFormat: wav + direction: inbound status: completed - mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media - transcription: - id: t-387bd648-18f3-4823-9d16-746bca0003c9 - status: completed - completedTime: 2022-06-13T18:46:29.715Z - url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription - recordingName: my-recording-name properties: applicationId: description: The id of the application associated with the call. @@ -11675,28 +11736,28 @@ components: type: object conference: example: - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 - name: my-conference-name - createdTime: 2022-06-17T22:19:40.375Z - completedTime: 2022-06-17T22:20:00Z - conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: POST - tag: my custom tag activeMembers: - callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + callIdsToCoach: + - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 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 + - callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 callIdsToCoach: - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - - callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 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 - callIdsToCoach: - - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent + completedTime: 2022-06-17T22:20:00Z + name: my-conference-name + createdTime: 2022-06-17T22:19:40.375Z + id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + tag: my custom tag properties: id: description: The Bandwidth-generated conference ID. @@ -11794,12 +11855,12 @@ components: conferenceMember: example: callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + callIdsToCoach: + - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 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 - callIdsToCoach: - - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 properties: callId: description: The call id associated with the event. @@ -11879,18 +11940,18 @@ components: type: object conferenceRecordingMetadata: example: + duration: PT13.67S accountId: "9900000" + channels: 1 + mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + recordingName: my-recording-name name: my-conference-name - recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 - duration: PT13.67S - channels: 1 startTime: 2022-06-17T22:19:40.375Z endTime: 2022-06-17T22:20:00Z + recordingId: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 fileFormat: wav status: completed - mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media - recordingName: my-recording-name properties: accountId: description: The user account associated with the call. @@ -12217,8 +12278,8 @@ components: type: object callTranscriptionResponse: example: - accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + accountId: "9900000" transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b tracks: - detectedLanguage: en-US @@ -12270,10 +12331,10 @@ components: recordingTranscriptionMetadata: description: "If the recording was transcribed, metadata about the transcription" example: - id: t-387bd648-18f3-4823-9d16-746bca0003c9 - status: completed completedTime: 2022-06-13T18:46:29.715Z + id: t-387bd648-18f3-4823-9d16-746bca0003c9 url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription + status: completed nullable: true properties: id: @@ -12302,9 +12363,9 @@ components: type: object voiceApiError: example: - type: type description: description id: id + type: type properties: type: type: string @@ -12323,8 +12384,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12409,8 +12470,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12503,8 +12564,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12582,8 +12643,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12624,8 +12685,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12665,8 +12726,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12720,8 +12781,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12770,8 +12831,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12807,8 +12868,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12888,8 +12949,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -12998,8 +13059,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13092,8 +13153,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13195,8 +13256,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13285,8 +13346,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13363,8 +13424,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13481,8 +13542,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13602,8 +13663,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13683,6 +13744,91 @@ components: example: "+15555555555" type: string type: object + referCompleteCallback: + description: "This event is sent to the referCompleteUrl of a call's \ + \ verb when the SIP REFER flow completes. On success, the call has been torn\ + \ down and the BXML returned from this callback is ignored. On failure, the\ + \ call remains active and the BXML returned from this callback is executed\ + \ on the call." + properties: + eventType: + description: "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, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." + example: bridgeComplete + type: string + eventTime: + 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. + example: "9900000" + type: string + applicationId: + description: The id of the application associated with the call. + example: 04e88489-df02-4e34-a0ee-27a91849555f + type: string + from: + description: The provided identifier of the caller. Must be a phone number + in E.164 format (e.g. +15555555555). + example: "+15555555555" + type: string + to: + description: "The phone number that received the call, in E.164 format (e.g.\ + \ +15555555555)." + example: "+15555555555" + type: string + direction: + $ref: "#/components/schemas/callDirectionEnum" + callId: + description: The call id associated with the event. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: string + callUrl: + description: The URL of the call associated with the event. + example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + format: uri + type: string + startTime: + description: "Time the call was started, in ISO 8601 format." + example: 2022-06-17T22:19:40.375Z + format: date-time + type: string + answerTime: + description: "Time the call was answered, in ISO 8601 format." + example: 2022-06-17T22:20:00Z + format: date-time + nullable: true + type: string + tag: + description: "(optional) The tag specified on call creation. If no tag was\ + \ specified or it was previously cleared, this field will not be present." + example: exampleTag + nullable: true + type: string + referCallStatus: + $ref: "#/components/schemas/referCallStatusEnum" + referSipResponseCode: + description: "(optional) The SIP response code returned for the REFER request\ + \ itself (e.g. 202, 405, 603). Present when a SIP response was received\ + \ for the REFER." + example: 202 + type: integer + notifySipResponseCode: + description: "(optional) The final SIP response code reported via NOTIFY\ + \ (message/sipfrag body). Present only when the caller's endpoint sent\ + \ a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout\ + \ or when the REFER was rejected before a subscription was established." + example: 200 + type: integer + type: object transcriptionAvailableCallback: description: The Transcription Available event is sent when the recording transcription is available to be downloaded. @@ -13692,8 +13838,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13805,8 +13951,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13892,8 +14038,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -13998,8 +14144,8 @@ components: \ bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect,\ \ conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer,\ - \ transferComplete, transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable,\ + \ transferAnswer, transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -14107,8 +14253,8 @@ components: \ bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin,\ \ conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable,\ \ disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete,\ - \ recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete,\ - \ transferDisconnect." + \ recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer,\ + \ transferComplete, transferDisconnect." example: bridgeComplete type: string eventTime: @@ -14248,6 +14394,19 @@ components: example: exampleTag nullable: true type: string + referSipResponseCode: + description: "(optional) The SIP response code returned for the REFER request\ + \ itself (e.g. 202, 405, 603). Present when a SIP response was received for\ + \ the REFER." + example: 202 + type: integer + notifySipResponseCode: + description: "(optional) The final SIP response code reported via NOTIFY (message/sipfrag\ + \ body). Present only when the caller's endpoint sent a final NOTIFY (e.g.\ + \ 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was\ + \ rejected before a subscription was established." + example: 200 + type: integer cause: description: "Reason the call failed - hangup, busy, timeout, cancel, rejected,\ \ callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded,\ @@ -14497,8 +14656,8 @@ components: type: object mfaRequestError: example: - error: 400 Request is malformed or invalid requestId: 354cc8a3-6701-461e-8fa7-8671703dd898 + error: 400 Request is malformed or invalid properties: error: description: A message describing the error with your request. @@ -14578,9 +14737,9 @@ components: type: string linkSchema: example: - href: /relative/uri - rel: aRelatedResource method: GET + rel: aRelatedResource + href: /relative/uri properties: href: description: URI of the link. @@ -14599,14 +14758,14 @@ components: lookupErrorSchema: example: code: NO-MATCH - description: Example error description - type: NumberInventory meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 + description: Example error description + type: NumberInventory properties: code: description: Validation error code @@ -14663,54 +14822,54 @@ components: type: object createSyncLookupResponse: example: - links: [] data: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE results: - - phoneNumber: "+10072904498" - lineType: MOBILE + - deactivationEvent: DEACTIVATED messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA - deactivationReporter: deactivationReporter deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true - - phoneNumber: "+10072904498" lineType: MOBILE - messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + links: [] errors: - code: NO-MATCH - description: Example error description - type: NumberInventory meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 - - code: NO-MATCH description: Example error description type: NumberInventory + - code: NO-MATCH meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 + description: Example error description + type: NumberInventory properties: links: example: [] @@ -14726,35 +14885,35 @@ components: type: object createAsyncBulkLookupResponse: example: - links: - - href: /relative/uri - rel: aRelatedResource - method: GET - - href: /relative/uri - rel: aRelatedResource - method: GET data: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: COMPLETE + links: + - method: GET + rel: aRelatedResource + href: /relative/uri + - method: GET + rel: aRelatedResource + href: /relative/uri errors: - code: NO-MATCH - description: Example error description - type: NumberInventory meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 - - code: NO-MATCH description: Example error description type: NumberInventory + - code: NO-MATCH meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 + description: Example error description + type: NumberInventory properties: links: description: Links for pagination (if applicable) @@ -14770,54 +14929,54 @@ components: type: object getAsyncBulkLookupResponse: example: - links: [] data: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE results: - - phoneNumber: "+10072904498" - lineType: MOBILE + - deactivationEvent: DEACTIVATED messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA - deactivationReporter: deactivationReporter deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true - - phoneNumber: "+10072904498" lineType: MOBILE - messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + links: [] errors: - code: NO-MATCH - description: Example error description - type: NumberInventory meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 - - code: NO-MATCH description: Example error description type: NumberInventory + - code: NO-MATCH meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 + description: Example error description + type: NumberInventory properties: links: example: [] @@ -14833,27 +14992,27 @@ components: type: object lookupErrorResponse: example: - links: [] data: "{}" + links: [] errors: - code: NO-MATCH - description: Example error description - type: NumberInventory meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 - - code: NO-MATCH description: Example error description type: NumberInventory + - code: NO-MATCH meta: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 + description: Example error description + type: NumberInventory properties: links: example: [] @@ -14888,18 +15047,18 @@ components: lookupResult: description: Carrier information results for the specified telephone number. example: - phoneNumber: "+10072904498" - lineType: MOBILE + deactivationEvent: DEACTIVATED messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA - deactivationReporter: deactivationReporter deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 properties: phoneNumber: description: The telephone number in E.164 format. @@ -15644,12 +15803,12 @@ components: type: object address: example: - name: Bandwidth Inc. - addr1: 2230 Bandmate Way + zip: "27606" addr2: 2230 Bandmate Way + addr1: 2230 Bandmate Way city: Raleigh + name: Bandwidth Inc. state: NC - zip: "27606" url: https://www.example.com/path/to/resource nullable: false properties: @@ -15719,11 +15878,11 @@ components: type: string optInWorkflow: example: - description: Opt In Flow imageUrls: - https://www.example.com/path/to/resource - https://www.example.com/path/to/resource confirmationResponse: Thank you for opting in! + description: Opt In Flow nullable: false properties: description: @@ -15763,8 +15922,8 @@ components: example: firstName: John lastName: Doe - email: foo@bar.com phoneNumber: "+19192654500" + email: foo@bar.com nullable: false properties: firstName: @@ -15861,41 +16020,41 @@ components: description: A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). example: + data: + - accountId: "1234567" + createdDate: 2023-05-15T13:56:39.965Z + modifiedDate: 2023-05-15T13:56:39.965Z + callbackUrl: https://www.example.com/path/to/resource + id: 7hICGStfAfeGxEq3N0lQwO + type: TOLLFREE_VERIFICATION_STATUS + basicAuthentication: + password: password + username: username + - accountId: "1234567" + createdDate: 2023-05-15T13:56:39.965Z + modifiedDate: 2023-05-15T13:56:39.965Z + callbackUrl: https://www.example.com/path/to/resource + id: 7hICGStfAfeGxEq3N0lQwO + type: TOLLFREE_VERIFICATION_STATUS + basicAuthentication: + password: password + username: username links: - first: first next: next previous: previous last: last + first: first errors: - code: 0 - description: description telephoneNumbers: - telephoneNumber: telephoneNumber - telephoneNumber: telephoneNumber - - code: 0 description: description + - code: 0 telephoneNumbers: - telephoneNumber: telephoneNumber - telephoneNumber: telephoneNumber - data: - - id: 7hICGStfAfeGxEq3N0lQwO - accountId: "1234567" - callbackUrl: https://www.example.com/path/to/resource - type: TOLLFREE_VERIFICATION_STATUS - basicAuthentication: - username: username - password: password - createdDate: 2023-05-15T13:56:39.965Z - modifiedDate: 2023-05-15T13:56:39.965Z - - id: 7hICGStfAfeGxEq3N0lQwO - accountId: "1234567" - callbackUrl: https://www.example.com/path/to/resource - type: TOLLFREE_VERIFICATION_STATUS - basicAuthentication: - username: username - password: password - createdDate: 2023-05-15T13:56:39.965Z - modifiedDate: 2023-05-15T13:56:39.965Z + description: description properties: links: $ref: "#/components/schemas/linksObject" @@ -15912,10 +16071,10 @@ components: type: object linksObject: example: - first: first next: next previous: previous last: last + first: first properties: first: description: The first (or only) page of results matching the query. @@ -15936,10 +16095,10 @@ components: webhookSubscriptionError: example: code: 0 - description: description telephoneNumbers: - telephoneNumber: telephoneNumber - telephoneNumber: telephoneNumber + description: description properties: code: type: integer @@ -15968,15 +16127,15 @@ components: description: Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. example: - id: 7hICGStfAfeGxEq3N0lQwO accountId: "1234567" + createdDate: 2023-05-15T13:56:39.965Z + modifiedDate: 2023-05-15T13:56:39.965Z callbackUrl: https://www.example.com/path/to/resource + id: 7hICGStfAfeGxEq3N0lQwO type: TOLLFREE_VERIFICATION_STATUS basicAuthentication: - username: username password: password - createdDate: 2023-05-15T13:56:39.965Z - modifiedDate: 2023-05-15T13:56:39.965Z + username: username properties: id: example: 7hICGStfAfeGxEq3N0lQwO @@ -16028,8 +16187,8 @@ components: tfvError: description: A generic error object. example: - type: Error Type description: Error Message + type: Error Type errors: field: error message properties: @@ -16049,11 +16208,14 @@ components: type: object tfvStatus: example: - phoneNumber: "+18005555555" - status: VERIFIED - internalTicketNumber: acde070d-8c4c-4f0d-9d8a-162843c10333 + blockedReason: Toll-free number was used to send spam messages + resubmitAllowed: true + createdDateTime: 2021-06-08T06:45:13Z declineReasonDescription: Invalid Information - Can't Validate URL - Website is not accessible / not available + internalTicketNumber: acde070d-8c4c-4f0d-9d8a-162843c10333 + phoneNumber: "+18005555555" + blocked: true denialStatusCode: 511 additionalDenialReasons: - statusCode: 512 @@ -16062,45 +16224,42 @@ components: - statusCode: 513 reason: Reason B resubmitAllowed: true - resubmitAllowed: true - createdDateTime: 2021-06-08T06:45:13Z modifiedDateTime: 2021-06-08T06:45:13Z submission: - businessAddress: - name: Bandwidth Inc. - addr1: 2230 Bandmate Way - addr2: 2230 Bandmate Way - city: Raleigh - state: NC - zip: "27606" - url: https://www.example.com/path/to/resource + additionalInformation: Any additional information + termsAndConditionsUrl: http://your-company.com/termsAndConditions + businessDba: Another Company Name Inc. businessContact: firstName: John lastName: Doe - email: foo@bar.com phoneNumber: "+19192654500" + email: foo@bar.com messageVolume: 10000 - useCase: 2FA - useCaseSummary: Text summarizing the use case for the toll-free number - productionMessageContent: Production message content + businessEntityType: PRIVATE_PROFIT + businessRegistrationType: EIN + privacyPolicyUrl: http://your-company.com/privacyPolicy optInWorkflow: - description: Opt In Flow imageUrls: - https://www.example.com/path/to/resource - https://www.example.com/path/to/resource confirmationResponse: Thank you for opting in! - additionalInformation: Any additional information + description: Opt In Flow + useCase: 2FA isvReseller: Test ISV - privacyPolicyUrl: http://your-company.com/privacyPolicy - termsAndConditionsUrl: http://your-company.com/termsAndConditions - businessDba: Another Company Name Inc. businessRegistrationNumber: 12-3456789 - businessRegistrationType: EIN + productionMessageContent: Production message content businessRegistrationIssuingCountry: USA - businessEntityType: PRIVATE_PROFIT - blocked: true - blockedReason: Toll-free number was used to send spam messages + businessAddress: + zip: "27606" + addr2: 2230 Bandmate Way + addr1: 2230 Bandmate Way + city: Raleigh + name: Bandwidth Inc. + state: NC + url: https://www.example.com/path/to/resource + useCaseSummary: Text summarizing the use case for the toll-free number cvToken: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw + status: VERIFIED properties: phoneNumber: description: Toll-free telephone number in E.164 format. @@ -16183,38 +16342,38 @@ components: type: object tfvSubmissionInfo: example: - businessAddress: - name: Bandwidth Inc. - addr1: 2230 Bandmate Way - addr2: 2230 Bandmate Way - city: Raleigh - state: NC - zip: "27606" - url: https://www.example.com/path/to/resource + additionalInformation: Any additional information + termsAndConditionsUrl: http://your-company.com/termsAndConditions + businessDba: Another Company Name Inc. businessContact: firstName: John lastName: Doe - email: foo@bar.com phoneNumber: "+19192654500" + email: foo@bar.com messageVolume: 10000 - useCase: 2FA - useCaseSummary: Text summarizing the use case for the toll-free number - productionMessageContent: Production message content + businessEntityType: PRIVATE_PROFIT + businessRegistrationType: EIN + privacyPolicyUrl: http://your-company.com/privacyPolicy optInWorkflow: - description: Opt In Flow imageUrls: - https://www.example.com/path/to/resource - https://www.example.com/path/to/resource confirmationResponse: Thank you for opting in! - additionalInformation: Any additional information + description: Opt In Flow + useCase: 2FA isvReseller: Test ISV - privacyPolicyUrl: http://your-company.com/privacyPolicy - termsAndConditionsUrl: http://your-company.com/termsAndConditions - businessDba: Another Company Name Inc. businessRegistrationNumber: 12-3456789 - businessRegistrationType: EIN + productionMessageContent: Production message content businessRegistrationIssuingCountry: USA - businessEntityType: PRIVATE_PROFIT + businessAddress: + zip: "27606" + addr2: 2230 Bandmate Way + addr1: 2230 Bandmate Way + city: Raleigh + name: Bandwidth Inc. + state: NC + url: https://www.example.com/path/to/resource + useCaseSummary: Text summarizing the use case for the toll-free number properties: businessAddress: $ref: "#/components/schemas/address" @@ -16416,10 +16575,10 @@ components: type: string device: example: + creationTimestamp: 2021-01-01T00:00:00Z deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z properties: deviceId: description: The unique ID of the device. @@ -16445,11 +16604,11 @@ components: endpoints: example: endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED creationTimestamp: 2021-01-01T00:00:00Z expirationTimestamp: 2021-01-02T00:00:00Z tag: my-tag + type: WEBRTC + status: CONNECTED properties: endpointId: description: The unique ID of the endpoint. @@ -16492,21 +16651,21 @@ components: type: array type: object example: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - expirationTimestamp: 2021-01-02T00:00:00Z - tag: my-tag devices: - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + creationTimestamp: 2021-01-01T00:00:00Z + expirationTimestamp: 2021-01-02T00:00:00Z + tag: my-tag + type: WEBRTC + status: CONNECTED type: object createWebRtcConnectionRequest: allOf: @@ -16552,21 +16711,21 @@ components: - token type: object example: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - expirationTimestamp: 2021-01-02T00:00:00Z - tag: my-tag devices: - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + creationTimestamp: 2021-01-01T00:00:00Z + expirationTimestamp: 2021-01-02T00:00:00Z + tag: my-tag + type: WEBRTC + status: CONNECTED token: xxxxx.yyyyy.zzzzz endpointEventTypeEnum: enum: @@ -16593,9 +16752,9 @@ components: description: An event that occurred on an endpoint. brtcLink: example: - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 properties: href: description: The full URL of the link. @@ -16612,10 +16771,10 @@ components: type: object page: example: + pageNumber: 0 + totalPages: 10 pageSize: 10 totalElements: 100 - totalPages: 10 - pageNumber: 0 properties: pageSize: description: The number of items per page. @@ -16642,15 +16801,15 @@ components: type: object brtcError: example: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: resource.not_found - description: The requested resource was not found. code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: resource.not_found properties: id: description: A unique identifier for the error. @@ -16677,10 +16836,10 @@ components: type: object brtcErrorSource: example: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 properties: parameter: description: The URI parameter that caused the error. @@ -16702,50 +16861,50 @@ components: type: object listEndpointsResponse: example: - links: - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET - page: - pageSize: 10 - totalElements: 100 - totalPages: 10 - pageNumber: 0 data: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED creationTimestamp: 2021-01-01T00:00:00Z expirationTimestamp: 2021-01-02T00:00:00Z tag: my-tag - - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: WEBRTC status: CONNECTED + - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 creationTimestamp: 2021-01-01T00:00:00Z expirationTimestamp: 2021-01-02T00:00:00Z tag: my-tag + type: WEBRTC + status: CONNECTED + links: + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + page: + pageNumber: 0 + totalPages: 10 + pageSize: 10 + totalElements: 100 errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: resource.not_found properties: links: items: @@ -16768,48 +16927,48 @@ components: type: object endpointResponse: example: - links: - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET data: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - expirationTimestamp: 2021-01-02T00:00:00Z - tag: my-tag devices: - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + creationTimestamp: 2021-01-01T00:00:00Z + expirationTimestamp: 2021-01-02T00:00:00Z + tag: my-tag + type: WEBRTC + status: CONNECTED + links: + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: resource.not_found properties: links: items: @@ -16828,49 +16987,49 @@ components: type: object createEndpointResponse: example: - links: - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - rel: self - method: GET data: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - type: WEBRTC - status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - expirationTimestamp: 2021-01-02T00:00:00Z - tag: my-tag devices: - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z - - deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - creationTimestamp: 2021-01-01T00:00:00Z + deviceId: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 deviceName: David's iPhone status: CONNECTED - creationTimestamp: 2021-01-01T00:00:00Z + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + creationTimestamp: 2021-01-01T00:00:00Z + expirationTimestamp: 2021-01-02T00:00:00Z + tag: my-tag + type: WEBRTC + status: CONNECTED token: xxxxx.yyyyy.zzzzz + links: + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: resource.not_found properties: links: items: @@ -16889,33 +17048,33 @@ components: type: object brtcErrorResponse: example: + data: "{}" links: - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET rel: self - method: GET - - href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET rel: self - method: GET - data: "{}" + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: resource.not_found + - code: "404" description: The requested resource was not found. - code: "404" + id: 59512d87-7a92-4040-8e4a-78fb772019b9 source: - parameter: accountId + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 field: accountId + parameter: accountId header: Authorization - reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: resource.not_found properties: links: items: @@ -16951,11 +17110,11 @@ components: - $ref: "#/components/schemas/rbmMessageContentRichCard" lookupErrorSchema_meta: example: + code: 1001 + message: Invalid TNs phoneNumbers: - "+13992077164" - "+19196104424" - message: Invalid TNs - code: 1001 properties: phoneNumbers: example: @@ -16978,32 +17137,32 @@ components: description: The phone number lookup response data example: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE results: - - phoneNumber: "+10072904498" - lineType: MOBILE + - deactivationEvent: DEACTIVATED messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA - deactivationReporter: deactivationReporter deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true - - phoneNumber: "+10072904498" lineType: MOBILE - messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE properties: requestId: description: The phone number lookup request ID from Bandwidth. @@ -17037,32 +17196,32 @@ components: description: The phone number lookup response data example: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE results: - - phoneNumber: "+10072904498" - lineType: MOBILE + - deactivationEvent: DEACTIVATED messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA - deactivationReporter: deactivationReporter deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true - - phoneNumber: "+10072904498" lineType: MOBILE - messagingProvider: Verizon Wireless - voiceProvider: Verizon Wireless - countryCodeA3: USA deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless deactivationDate: 2025-06-20 18:35 - deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA initialMessageDeliveryStatusDate: 2025-06-20 - latestMessageDeliveryStatusDate: 2025-06-21 rcsEnabled: true + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE properties: requestId: description: The phone number lookup request ID from Bandwidth. @@ -17082,8 +17241,8 @@ components: description: "Basic authentication credentials are not required, but if present,\ \ both username and password must be provided." example: - username: username password: password + username: username properties: username: maxLength: 100 diff --git a/bandwidth.yml b/bandwidth.yml index 8764a422..4b88b456 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -3184,6 +3184,13 @@ components: - outbound description: The direction of the call. example: inbound + referCallStatusEnum: + type: string + enum: + - success + - failure + description: The outcome of the REFER operation. + example: success fileFormatEnum: type: string enum: @@ -5134,6 +5141,45 @@ components: $ref: '#/components/schemas/transferCallerId' transferTo: $ref: '#/components/schemas/transferTo' + referCompleteCallback: + type: object + description: >- + This event is sent to the referCompleteUrl of a call's verb when + the SIP REFER flow completes. On success, the call has been torn down + and the BXML returned from this callback is ignored. On failure, the + call remains active and the BXML returned from this callback is executed + on the call. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + referCallStatus: + $ref: '#/components/schemas/referCallStatusEnum' + referSipResponseCode: + $ref: '#/components/schemas/referSipResponseCode' + notifySipResponseCode: + $ref: '#/components/schemas/notifySipResponseCode' transcriptionAvailableCallback: type: object description: >- @@ -5326,8 +5372,8 @@ components: conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, - recordingAvailable, redirect, transcriptionAvailable, transferAnswer, - transferComplete, transferDisconnect. + recordingAvailable, redirect, referComplete, transcriptionAvailable, + transferAnswer, transferComplete, transferDisconnect. example: bridgeComplete eventTime: type: string @@ -5479,6 +5525,21 @@ components: or it was previously cleared, this field will not be present. example: exampleTag nullable: true + referSipResponseCode: + type: integer + description: >- + (optional) The SIP response code returned for the REFER request itself + (e.g. 202, 405, 603). Present when a SIP response was received for the + REFER. + example: 202 + notifySipResponseCode: + type: integer + description: >- + (optional) The final SIP response code reported via NOTIFY + (message/sipfrag body). Present only when the caller's endpoint sent a + final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or + when the REFER was rejected before a subscription was established. + example: 200 cause: type: string description: >- diff --git a/docs/AnswerCallback.md b/docs/AnswerCallback.md index fce1cb0f..484f3803 100644 --- a/docs/AnswerCallback.md +++ b/docs/AnswerCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/BridgeCompleteCallback.md b/docs/BridgeCompleteCallback.md index ee9d956f..b8c20468 100644 --- a/docs/BridgeCompleteCallback.md +++ b/docs/BridgeCompleteCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/BridgeTargetCompleteCallback.md b/docs/BridgeTargetCompleteCallback.md index c23f465c..770f78f5 100644 --- a/docs/BridgeTargetCompleteCallback.md +++ b/docs/BridgeTargetCompleteCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceCompletedCallback.md b/docs/ConferenceCompletedCallback.md index 6840355c..765f93e0 100644 --- a/docs/ConferenceCompletedCallback.md +++ b/docs/ConferenceCompletedCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceCreatedCallback.md b/docs/ConferenceCreatedCallback.md index 8f1196a0..0b777cd1 100644 --- a/docs/ConferenceCreatedCallback.md +++ b/docs/ConferenceCreatedCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceMemberExitCallback.md b/docs/ConferenceMemberExitCallback.md index 1a912f28..c089e576 100644 --- a/docs/ConferenceMemberExitCallback.md +++ b/docs/ConferenceMemberExitCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceMemberJoinCallback.md b/docs/ConferenceMemberJoinCallback.md index c8dec63d..aca57b71 100644 --- a/docs/ConferenceMemberJoinCallback.md +++ b/docs/ConferenceMemberJoinCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceRecordingAvailableCallback.md b/docs/ConferenceRecordingAvailableCallback.md index 41a8f825..9d5c3f86 100644 --- a/docs/ConferenceRecordingAvailableCallback.md +++ b/docs/ConferenceRecordingAvailableCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ConferenceRedirectCallback.md b/docs/ConferenceRedirectCallback.md index 5dde9a89..ea1b18d1 100644 --- a/docs/ConferenceRedirectCallback.md +++ b/docs/ConferenceRedirectCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/DisconnectCallback.md b/docs/DisconnectCallback.md index 816d3a90..132411f5 100644 --- a/docs/DisconnectCallback.md +++ b/docs/DisconnectCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/DtmfCallback.md b/docs/DtmfCallback.md index 9f280db9..593adcc7 100644 --- a/docs/DtmfCallback.md +++ b/docs/DtmfCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/GatherCallback.md b/docs/GatherCallback.md index e3ef7da8..20977640 100644 --- a/docs/GatherCallback.md +++ b/docs/GatherCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 0b0d0d7e..c644cea2 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/MachineDetectionCompleteCallback.md b/docs/MachineDetectionCompleteCallback.md index 9a369e53..e828d1f8 100644 --- a/docs/MachineDetectionCompleteCallback.md +++ b/docs/MachineDetectionCompleteCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/RecordingAvailableCallback.md b/docs/RecordingAvailableCallback.md index 90d6410d..06b7a2cb 100644 --- a/docs/RecordingAvailableCallback.md +++ b/docs/RecordingAvailableCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/RecordingCompleteCallback.md b/docs/RecordingCompleteCallback.md index 17814da7..07449f25 100644 --- a/docs/RecordingCompleteCallback.md +++ b/docs/RecordingCompleteCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/RedirectCallback.md b/docs/RedirectCallback.md index 597a44ab..18f40276 100644 --- a/docs/RedirectCallback.md +++ b/docs/RedirectCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/ReferCallStatusEnum.md b/docs/ReferCallStatusEnum.md new file mode 100644 index 00000000..20becc95 --- /dev/null +++ b/docs/ReferCallStatusEnum.md @@ -0,0 +1,13 @@ + + +# ReferCallStatusEnum + +## Enum + + +* `SUCCESS` (value: `"success"`) + +* `FAILURE` (value: `"failure"`) + + + diff --git a/docs/ReferCompleteCallback.md b/docs/ReferCompleteCallback.md new file mode 100644 index 00000000..3096e3c4 --- /dev/null +++ b/docs/ReferCompleteCallback.md @@ -0,0 +1,28 @@ + + +# ReferCompleteCallback + +This event is sent to the referCompleteUrl of a call's verb when the SIP REFER flow completes. On success, the call has been torn down and the BXML returned from this callback is ignored. On failure, the call remains active and the BXML returned from this callback is executed on the call. + +## Properties + +| 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] | +|**to** | **String** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] | +|**direction** | **CallDirectionEnum** | | [optional] | +|**callId** | **String** | The call id associated with the event. | [optional] | +|**callUrl** | **URI** | The URL of the call associated with the event. | [optional] | +|**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] | +|**referCallStatus** | **ReferCallStatusEnum** | | [optional] | +|**referSipResponseCode** | **Integer** | (optional) The SIP response code returned for the REFER request itself (e.g. 202, 405, 603). Present when a SIP response was received for the REFER. | [optional] | +|**notifySipResponseCode** | **Integer** | (optional) The final SIP response code reported via NOTIFY (message/sipfrag body). Present only when the caller's endpoint sent a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was rejected before a subscription was established. | [optional] | + + + diff --git a/docs/TranscriptionAvailableCallback.md b/docs/TranscriptionAvailableCallback.md index 0ec482e7..65bfcce5 100644 --- a/docs/TranscriptionAvailableCallback.md +++ b/docs/TranscriptionAvailableCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/TransferAnswerCallback.md b/docs/TransferAnswerCallback.md index d350b98f..22902e58 100644 --- a/docs/TransferAnswerCallback.md +++ b/docs/TransferAnswerCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/TransferCompleteCallback.md b/docs/TransferCompleteCallback.md index d2dd0202..8d706a92 100644 --- a/docs/TransferCompleteCallback.md +++ b/docs/TransferCompleteCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/docs/TransferDisconnectCallback.md b/docs/TransferDisconnectCallback.md index cc52e159..3622add6 100644 --- a/docs/TransferDisconnectCallback.md +++ b/docs/TransferDisconnectCallback.md @@ -8,7 +8,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] | +|**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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [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] | diff --git a/openapitools.json b/openapitools.json index 936223a5..f052220d 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.24.0" + "version": "7.17.0" } } diff --git a/src/main/java/com/bandwidth/sdk/ApiException.java b/src/main/java/com/bandwidth/sdk/ApiException.java index 0307e717..c3e60582 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -15,13 +15,14 @@ import java.util.Map; import java.util.List; +import java.util.Locale; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -161,7 +162,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format(java.util.Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + return String.format(Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); } } diff --git a/src/main/java/com/bandwidth/sdk/Configuration.java b/src/main/java/com/bandwidth/sdk/Configuration.java index b110ad91..3070c62d 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 45d5cf89..e40aa483 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -274,6 +274,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RecordingTranscriptionMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RecordingTranscriptions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RedirectCallback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ReferCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SipConnectionMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SipCredentials.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SmsMessageContent.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/bandwidth/sdk/Pair.java b/src/main/java/com/bandwidth/sdk/Pair.java index f185957f..c2dfaf95 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,7 +13,7 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Pair { private final String name; private final String value; diff --git a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java index 64f64792..f8a16f7e 100644 --- a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java @@ -18,7 +18,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/bandwidth/sdk/ServerVariable.java b/src/main/java/com/bandwidth/sdk/ServerVariable.java index c7daf045..37ac39a2 100644 --- a/src/main/java/com/bandwidth/sdk/ServerVariable.java +++ b/src/main/java/com/bandwidth/sdk/ServerVariable.java @@ -18,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/bandwidth/sdk/StringUtil.java b/src/main/java/com/bandwidth/sdk/StringUtil.java index 7665ca6d..81afa101 100644 --- a/src/main/java/com/bandwidth/sdk/StringUtil.java +++ b/src/main/java/com/bandwidth/sdk/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java index 0b52ad1e..e13ff52b 100644 --- a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/bandwidth/sdk/auth/Authentication.java b/src/main/java/com/bandwidth/sdk/auth/Authentication.java index 0c9b209b..79dcf08e 100644 --- a/src/main/java/com/bandwidth/sdk/auth/Authentication.java +++ b/src/main/java/com/bandwidth/sdk/auth/Authentication.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public interface Authentication { /** * Apply authentication settings to header and query params. diff --git a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java index fc609cc3..35683058 100644 --- a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuth.java b/src/main/java/com/bandwidth/sdk/auth/OAuth.java index 7d9a760d..4b75be15 100644 --- a/src/main/java/com/bandwidth/sdk/auth/OAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/OAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class OAuth implements Authentication { private String accessToken; diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java index e4bc6697..56a889ba 100644 --- a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java @@ -16,7 +16,7 @@ /** * OAuth flows that are supported by this client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public enum OAuthFlow { ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 IMPLICIT, diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index e1d14daa..7b2c12e8 100644 --- a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -104,7 +104,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } public boolean equals(Object o) { diff --git a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java index 7b06f3d2..f461dd2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,7 +210,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -268,7 +273,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java index 94ec3418..c70f7d5f 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AdditionalDenialReason */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AdditionalDenialReason { public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,19 +236,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AdditionalDenialReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdditionalDenialReason.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } } @@ -304,7 +309,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Address.java b/src/main/java/com/bandwidth/sdk/model/Address.java index cec91c58..02b4ccb3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Address */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Address { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -323,7 +325,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -347,37 +352,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Address.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("addr1").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); } if ((jsonObj.get("addr2") != null && !jsonObj.get("addr2").isJsonNull()) && !jsonObj.get("addr2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); } if (!jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -438,7 +443,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index f9a2ce12..da3238bd 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -139,7 +141,7 @@ public AnswerCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -535,7 +537,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -559,44 +564,44 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { MachineDetectionResult.validateJsonElement(jsonObj.get("machineDetectionResult")); } if ((jsonObj.get("sipCallId") != null && !jsonObj.get("sipCallId").isJsonNull()) && !jsonObj.get("sipCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); } } @@ -657,7 +662,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java index 7d97d771..4dd2df37 100644 --- a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AsyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AsyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -165,7 +167,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -189,14 +194,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AsyncLookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AsyncLookupRequest is not found in the empty JSON string", AsyncLookupRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AsyncLookupRequest is not found in the empty JSON string", AsyncLookupRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AsyncLookupRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -204,7 +209,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("phoneNumbers") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("phoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } } @@ -265,7 +270,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java index ccf480fd..293d896e 100644 --- a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BlockedWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BlockedWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -286,7 +288,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -310,25 +315,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BlockedWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -389,7 +394,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index c7f9c7b4..54682e8c 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -143,7 +145,7 @@ public BridgeCompleteCallback eventType(@javax.annotation.Nullable String eventT } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -560,7 +562,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -584,46 +589,46 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -684,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index 996024d6..f70aca7e 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -128,7 +130,7 @@ public BridgeTargetCompleteCallback eventType(@javax.annotation.Nullable 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -482,7 +484,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -506,37 +511,37 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -597,7 +602,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcError.java b/src/main/java/com/bandwidth/sdk/model/BrtcError.java index 87a888e3..5a7b1f6e 100644 --- a/src/main/java/com/bandwidth/sdk/model/BrtcError.java +++ b/src/main/java/com/bandwidth/sdk/model/BrtcError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.BrtcErrorSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BrtcError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BrtcError { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -261,7 +263,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -285,28 +290,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BrtcError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BrtcError is not found in the empty JSON string", BrtcError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcError is not found in the empty JSON string", BrtcError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : BrtcError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } // validate the optional field `source` if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { @@ -371,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java index a6b81e53..b54a27a5 100644 --- a/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/BrtcErrorResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.BrtcError; import com.bandwidth.sdk.model.BrtcLink; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BrtcErrorResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BrtcErrorResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -227,7 +229,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -251,37 +256,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BrtcErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BrtcErrorResponse is not found in the empty JSON string", BrtcErrorResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcErrorResponse is not found in the empty JSON string", BrtcErrorResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : BrtcErrorResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("links") != null) { - if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); - } - JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); - // validate the required field `links` (array) - for (int i = 0; i < jsonArraylinks.size(); i++) { - BrtcLink.validateJsonElement(jsonArraylinks.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } - if (jsonObj.get("errors") != null) { - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - BrtcError.validateJsonElement(jsonArrayerrors.get(i)); - } + + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + // validate the required field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + BrtcLink.validateJsonElement(jsonArraylinks.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } + + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + // validate the required field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + BrtcError.validateJsonElement(jsonArrayerrors.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -341,7 +346,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java b/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java index d9fb9414..74092329 100644 --- a/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/BrtcErrorSource.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BrtcErrorSource */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BrtcErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) @@ -233,7 +235,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -257,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BrtcErrorSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BrtcErrorSource is not found in the empty JSON string", BrtcErrorSource.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcErrorSource is not found in the empty JSON string", BrtcErrorSource.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("parameter") != null && !jsonObj.get("parameter").isJsonNull()) && !jsonObj.get("parameter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); } if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); } if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); } } @@ -332,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BrtcLink.java b/src/main/java/com/bandwidth/sdk/model/BrtcLink.java index cec66d9d..b8e5fb67 100644 --- a/src/main/java/com/bandwidth/sdk/model/BrtcLink.java +++ b/src/main/java/com/bandwidth/sdk/model/BrtcLink.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BrtcLink */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BrtcLink { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BrtcLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BrtcLink is not found in the empty JSON string", BrtcLink.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BrtcLink is not found in the empty JSON string", BrtcLink.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) && !jsonObj.get("method").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); } } @@ -303,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java index 6986ac5c..f35ff3df 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java index 638a531e..bebdfc67 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java index ddf8bbde..cbfa167d 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java index cb76556f..ba0a140f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.RecordingTranscriptionMetadata; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -640,7 +642,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -664,39 +669,39 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type 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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -707,17 +712,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { RecordingTranscriptionMetadata.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -778,7 +783,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallState.java b/src/main/java/com/bandwidth/sdk/model/CallState.java index c78ddd83..1b3e97f9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -621,7 +623,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -645,46 +650,46 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type 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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if ((jsonObj.get("identity") != null && !jsonObj.get("identity").isJsonNull()) && !jsonObj.get("identity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); } if ((jsonObj.get("disconnectCause") != null && !jsonObj.get("disconnectCause").isJsonNull()) && !jsonObj.get("disconnectCause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -745,7 +750,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java index 64fd1045..6fcea9ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java index a03c0e21..8f01d9d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscriptionDetectedLanguageEnum; import com.bandwidth.sdk.model.CallTranscriptionTrackEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscription { public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) @@ -237,7 +239,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -261,7 +266,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -274,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallTranscriptionTrackEnum.validateJsonElement(jsonObj.get("track")); } if ((jsonObj.get("transcript") != null && !jsonObj.get("transcript").isJsonNull()) && !jsonObj.get("transcript").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); } } @@ -335,7 +340,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java index 6295e064..4de2aca7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java index 7b71c781..b6d70045 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscriptionMetadata { public static final String SERIALIZED_NAME_TRANSCRIPTION_ID = "transcriptionId"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTION_ID) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if ((jsonObj.get("transcriptionName") != null && !jsonObj.get("transcriptionName").isJsonNull()) && !jsonObj.get("transcriptionName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); } if ((jsonObj.get("transcriptionUrl") != null && !jsonObj.get("transcriptionUrl").isJsonNull()) && !jsonObj.get("transcriptionUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); } } @@ -303,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java index 89f03b26..6e69a1a9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscriptionResponse { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -244,7 +246,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -268,25 +273,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if (jsonObj.get("tracks") != null && !jsonObj.get("tracks").isJsonNull()) { JsonArray jsonArraytracks = jsonObj.getAsJsonArray("tracks"); if (jsonArraytracks != null) { // ensure the json data is an array if (!jsonObj.get("tracks").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); } // validate the optional field `tracks` (array) @@ -354,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java index 0d0089a7..6f18f069 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Callback.java b/src/main/java/com/bandwidth/sdk/model/Callback.java index 1a7a7c50..0b570822 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallback; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; @@ -39,6 +40,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Callback extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Callback.class.getName()); @@ -147,7 +149,7 @@ public Callback read(JsonReader in) throws IOException { newCallback.setActualInstance(deserialized); return newCallback; default: - log.log(Level.WARNING, String.format(java.util.Locale.ROOT, "Failed to lookup discriminator value `%s` for Callback. Possible values: message-delivered message-failed message-read message-received message-sending message-sent requested-location-response suggestion-response", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for Callback. Possible values: message-delivered message-failed message-read message-received message-sending message-sent requested-location-response suggestion-response", jsonObject.get("type").getAsString())); } } @@ -164,7 +166,7 @@ public Callback read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'StatusCallback'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'StatusCallback'", e); } // deserialize InboundCallback @@ -176,7 +178,7 @@ public Callback read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'InboundCallback'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'InboundCallback'", e); } @@ -186,7 +188,7 @@ public Callback read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -255,7 +257,6 @@ public Object getActualInstance() { * @return The actual instance of `StatusCallback` * @throws ClassCastException if the instance is not `StatusCallback` */ - @SuppressWarnings("unchecked") public StatusCallback getStatusCallback() throws ClassCastException { return (StatusCallback)super.getActualInstance(); } @@ -267,7 +268,6 @@ public StatusCallback getStatusCallback() throws ClassCastException { * @return The actual instance of `InboundCallback` * @throws ClassCastException if the instance is not `InboundCallback` */ - @SuppressWarnings("unchecked") public InboundCallback getInboundCallback() throws ClassCastException { return (InboundCallback)super.getActualInstance(); } @@ -287,7 +287,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StatusCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with InboundCallback @@ -295,11 +295,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti InboundCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java index 3e169433..5b608007 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java index 760212bf..d86c8dfc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java index 7b30f82c..3899a638 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -287,7 +289,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -311,31 +316,31 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -396,7 +401,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java index e44b4fad..4198e986 100644 --- a/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 30f70b8d..190ebb1c 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.ConferenceMember; import com.google.gson.TypeAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -363,7 +365,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -387,32 +392,32 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("conferenceEventUrl") != null && !jsonObj.get("conferenceEventUrl").isJsonNull()) && !jsonObj.get("conferenceEventUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); } // validate the optional field `conferenceEventMethod` if (jsonObj.get("conferenceEventMethod") != null && !jsonObj.get("conferenceEventMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("conferenceEventMethod")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if (jsonObj.get("activeMembers") != null && !jsonObj.get("activeMembers").isJsonNull()) { JsonArray jsonArrayactiveMembers = jsonObj.getAsJsonArray("activeMembers"); if (jsonArrayactiveMembers != null) { // ensure the json data is an array if (!jsonObj.get("activeMembers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); } // validate the optional field `activeMembers` (array) @@ -480,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index 1bb89ec9..f259bae7 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -86,7 +88,7 @@ public ConferenceCompletedCallback eventType(@javax.annotation.Nullable String e } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -272,7 +274,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -296,21 +301,21 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -371,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index c114203a..a7ba8363 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -86,7 +88,7 @@ public ConferenceCreatedCallback eventType(@javax.annotation.Nullable String eve } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -272,7 +274,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -296,21 +301,21 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -371,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java index 8d2d1b33..a2cdc12c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -308,7 +310,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -332,22 +337,22 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("memberUrl") != null && !jsonObj.get("memberUrl").isJsonNull()) && !jsonObj.get("memberUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -408,7 +413,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 6e10bc3b..62a431fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -101,7 +103,7 @@ public ConferenceMemberExitCallback eventType(@javax.annotation.Nullable 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -350,7 +352,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -374,30 +379,30 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -458,7 +463,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index 83260db5..7bc4b0ae 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -101,7 +103,7 @@ public ConferenceMemberJoinCallback eventType(@javax.annotation.Nullable 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -350,7 +352,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -374,30 +379,30 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -458,7 +463,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index c2e9c32a..11480fd0 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -133,7 +135,7 @@ public ConferenceRecordingAvailableCallback eventType(@javax.annotation.Nullable } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -508,7 +510,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -532,40 +537,40 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -626,7 +631,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java index 88ec0166..4242a033 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -456,7 +458,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -480,37 +485,37 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -571,7 +576,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index 6a0868f9..b2b40b4c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -86,7 +88,7 @@ public ConferenceRedirectCallback eventType(@javax.annotation.Nullable String ev } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -272,7 +274,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -296,21 +301,21 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -371,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java index 8f457611..2e183ec2 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Contact.java b/src/main/java/com/bandwidth/sdk/model/Contact.java index 861dbd9d..ca36f85d 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Contact */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Contact { public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) @@ -233,7 +235,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -257,28 +262,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Contact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Contact.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); } if (!jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); } if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -339,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java index ba11b121..8d64c970 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; import com.bandwidth.sdk.model.LinkSchema; import com.bandwidth.sdk.model.LookupErrorSchema; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateAsyncBulkLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateAsyncBulkLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAsyncBulkLookupResponse is not found in the empty JSON string", CreateAsyncBulkLookupResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateAsyncBulkLookupResponse is not found in the empty JSON string", CreateAsyncBulkLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -261,7 +266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -279,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -347,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java index 6c13711d..93688021 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InProgressLookupStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -183,7 +185,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -207,12 +212,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateAsyncBulkLookupResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAsyncBulkLookupResponseData is not found in the empty JSON string", CreateAsyncBulkLookupResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateAsyncBulkLookupResponseData is not found in the empty JSON string", CreateAsyncBulkLookupResponseData.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -277,7 +282,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index 2fc04479..bca06f12 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionConfiguration; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -696,7 +698,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -720,60 +725,60 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCall.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerMethod` if (jsonObj.get("answerMethod") != null && !jsonObj.get("answerMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } // validate the optional field `disconnectMethod` if (jsonObj.get("disconnectMethod") != null && !jsonObj.get("disconnectMethod").isJsonNull()) { @@ -784,7 +789,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionConfiguration.validateJsonElement(jsonObj.get("machineDetection")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -845,7 +850,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java index 27d0ff00..21a9e61e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -690,7 +692,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -714,70 +719,66 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCallResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (!jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } - if (jsonObj.get("answerMethod") != null && !jsonObj.get("answerMethod").isJsonNull()) { // validate the required field `answerMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); - } if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } - if (jsonObj.get("disconnectMethod") != null && !jsonObj.get("disconnectMethod").isJsonNull()) { // validate the required field `disconnectMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); - } if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -838,7 +839,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateEndpointRequestBase.java b/src/main/java/com/bandwidth/sdk/model/CreateEndpointRequestBase.java index a1034d6e..ad5a33fc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateEndpointRequestBase.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateEndpointRequestBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.EndpointDirectionEnum; import com.bandwidth.sdk.model.EndpointTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateEndpointRequestBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateEndpointRequestBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -262,7 +264,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -286,14 +291,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateEndpointRequestBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateEndpointRequestBase is not found in the empty JSON string", CreateEndpointRequestBase.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateEndpointRequestBase is not found in the empty JSON string", CreateEndpointRequestBase.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateEndpointRequestBase.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -302,13 +307,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `direction` EndpointDirectionEnum.validateJsonElement(jsonObj.get("direction")); if ((jsonObj.get("eventCallbackUrl") != null && !jsonObj.get("eventCallbackUrl").isJsonNull()) && !jsonObj.get("eventCallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventCallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventCallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventCallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventCallbackUrl").toString())); } if ((jsonObj.get("eventFallbackUrl") != null && !jsonObj.get("eventFallbackUrl").isJsonNull()) && !jsonObj.get("eventFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventFallbackUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -369,7 +374,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java index 8d0fbbf6..081e24fc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.BrtcError; import com.bandwidth.sdk.model.BrtcLink; import com.bandwidth.sdk.model.CreateEndpointResponseData; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateEndpointResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateEndpointResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,39 +257,39 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateEndpointResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateEndpointResponse is not found in the empty JSON string", CreateEndpointResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateEndpointResponse is not found in the empty JSON string", CreateEndpointResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateEndpointResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("links") != null) { - if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); - } - JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); - // validate the required field `links` (array) - for (int i = 0; i < jsonArraylinks.size(); i++) { - BrtcLink.validateJsonElement(jsonArraylinks.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } + + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + // validate the required field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + BrtcLink.validateJsonElement(jsonArraylinks.get(i)); + }; // validate the required field `data` CreateEndpointResponseData.validateJsonElement(jsonObj.get("data")); - if (jsonObj.get("errors") != null) { - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - BrtcError.validateJsonElement(jsonArrayerrors.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } + + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + // validate the required field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + BrtcError.validateJsonElement(jsonArrayerrors.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -344,7 +349,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseData.java index a85c9e2e..d1c80be2 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateEndpointResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Device; import com.bandwidth.sdk.model.EndpointStatusEnum; import com.bandwidth.sdk.model.EndpointTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateEndpointResponseData */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateEndpointResponseData { public static final String SERIALIZED_NAME_ENDPOINT_ID = "endpointId"; @SerializedName(SERIALIZED_NAME_ENDPOINT_ID) @@ -351,7 +353,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -375,33 +380,33 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateEndpointResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateEndpointResponseData is not found in the empty JSON string", CreateEndpointResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateEndpointResponseData is not found in the empty JSON string", CreateEndpointResponseData.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateEndpointResponseData.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpointId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); } // validate the required field `type` EndpointTypeEnum.validateJsonElement(jsonObj.get("type")); // validate the required field `status` EndpointStatusEnum.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); if (jsonArraydevices != null) { // ensure the json data is an array if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); } // validate the optional field `devices` (array) @@ -411,7 +416,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } } @@ -472,7 +477,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index ec467c0b..527c5ab6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FieldError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -218,7 +220,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -242,29 +247,29 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateMessageRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("fieldErrors") != null && !jsonObj.get("fieldErrors").isJsonNull()) { JsonArray jsonArrayfieldErrors = jsonObj.getAsJsonArray("fieldErrors"); if (jsonArrayfieldErrors != null) { // ensure the json data is an array if (!jsonObj.get("fieldErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); } // validate the optional field `fieldErrors` (array) @@ -332,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java index 870ffd6e..6af56d35 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.bandwidth.sdk.model.MultiChannelMessageResponseData; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMultiChannelMessageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateMultiChannelMessageResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateMultiChannelMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -261,7 +266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -279,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -347,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java index cd6c7130..4a1a907f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CreateSyncLookupResponseData; import com.bandwidth.sdk.model.LinkSchema; import com.bandwidth.sdk.model.LookupErrorSchema; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateSyncLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateSyncLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateSyncLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateSyncLookupResponse is not found in the empty JSON string", CreateSyncLookupResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateSyncLookupResponse is not found in the empty JSON string", CreateSyncLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -261,7 +266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -279,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -347,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java index e563ccae..f74138fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CompletedLookupStatusEnum; import com.bandwidth.sdk.model.LookupResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateSyncLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -220,7 +222,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -244,12 +249,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateSyncLookupResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateSyncLookupResponseData is not found in the empty JSON string", CreateSyncLookupResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateSyncLookupResponseData is not found in the empty JSON string", CreateSyncLookupResponseData.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -260,7 +265,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) @@ -328,7 +333,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateWebRtcConnectionRequest.java b/src/main/java/com/bandwidth/sdk/model/CreateWebRtcConnectionRequest.java index eb2ead07..bef608e2 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateWebRtcConnectionRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateWebRtcConnectionRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.EndpointDirectionEnum; import com.bandwidth.sdk.model.EndpointTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateWebRtcConnectionRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateWebRtcConnectionRequest { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -288,7 +290,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -312,14 +317,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateWebRtcConnectionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateWebRtcConnectionRequest is not found in the empty JSON string", CreateWebRtcConnectionRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateWebRtcConnectionRequest is not found in the empty JSON string", CreateWebRtcConnectionRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateWebRtcConnectionRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -328,13 +333,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `direction` EndpointDirectionEnum.validateJsonElement(jsonObj.get("direction")); if ((jsonObj.get("eventCallbackUrl") != null && !jsonObj.get("eventCallbackUrl").isJsonNull()) && !jsonObj.get("eventCallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventCallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventCallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventCallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventCallbackUrl").toString())); } if ((jsonObj.get("eventFallbackUrl") != null && !jsonObj.get("eventFallbackUrl").isJsonNull()) && !jsonObj.get("eventFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventFallbackUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -395,7 +400,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java b/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java index 3853fd79..8f9d5571 100644 --- a/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Device.java b/src/main/java/com/bandwidth/sdk/model/Device.java index bc4da223..3b1e46b3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Device.java +++ b/src/main/java/com/bandwidth/sdk/model/Device.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.DeviceStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Device */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Device { public static final String SERIALIZED_NAME_DEVICE_ID = "deviceId"; @SerializedName(SERIALIZED_NAME_DEVICE_ID) @@ -235,7 +237,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -259,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Device.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Device is not found in the empty JSON string", Device.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Device is not found in the empty JSON string", Device.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Device.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("deviceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `deviceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deviceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `deviceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deviceId").toString())); } if ((jsonObj.get("deviceName") != null && !jsonObj.get("deviceName").isJsonNull()) && !jsonObj.get("deviceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `deviceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deviceName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `deviceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deviceName").toString())); } // validate the required field `status` DeviceStatusEnum.validateJsonElement(jsonObj.get("status")); @@ -337,7 +342,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DeviceStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/DeviceStatusEnum.java index 4bb966bd..8fc6fbca 100644 --- a/src/main/java/com/bandwidth/sdk/model/DeviceStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/DeviceStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index fa6a92ca..91d2e36d 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Disconnect event is fired when a call ends, for any reason. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -158,7 +160,7 @@ public DisconnectCallback eventType(@javax.annotation.Nullable String eventType) } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -638,7 +640,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -662,49 +667,49 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("sipCallId") != null && !jsonObj.get("sipCallId").isJsonNull()) && !jsonObj.get("sipCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); } } @@ -765,7 +770,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Diversion.java b/src/main/java/com/bandwidth/sdk/model/Diversion.java index f6027934..b2fd3820 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) @@ -311,7 +313,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -335,30 +340,30 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } if ((jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) && !jsonObj.get("privacy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); } if ((jsonObj.get("screen") != null && !jsonObj.get("screen").isJsonNull()) && !jsonObj.get("screen").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); } if ((jsonObj.get("counter") != null && !jsonObj.get("counter").isJsonNull()) && !jsonObj.get("counter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); } if ((jsonObj.get("limit") != null && !jsonObj.get("limit").isJsonNull()) && !jsonObj.get("limit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); } if ((jsonObj.get("unknown") != null && !jsonObj.get("unknown").isJsonNull()) && !jsonObj.get("unknown").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); } if ((jsonObj.get("origTo") != null && !jsonObj.get("origTo").isJsonNull()) && !jsonObj.get("origTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); } } @@ -419,7 +424,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index 7a2b1daf..21094e73 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -148,7 +150,7 @@ public DtmfCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -586,7 +588,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -610,49 +615,49 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("digit") != null && !jsonObj.get("digit").isJsonNull()) && !jsonObj.get("digit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -713,7 +718,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Endpoint.java b/src/main/java/com/bandwidth/sdk/model/Endpoint.java index 1e5abe5a..1a6e1157 100644 --- a/src/main/java/com/bandwidth/sdk/model/Endpoint.java +++ b/src/main/java/com/bandwidth/sdk/model/Endpoint.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Device; import com.bandwidth.sdk.model.EndpointStatusEnum; import com.bandwidth.sdk.model.EndpointTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Endpoint */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Endpoint { public static final String SERIALIZED_NAME_ENDPOINT_ID = "endpointId"; @SerializedName(SERIALIZED_NAME_ENDPOINT_ID) @@ -325,7 +327,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -349,33 +354,33 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Endpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Endpoint is not found in the empty JSON string", Endpoint.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Endpoint is not found in the empty JSON string", Endpoint.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Endpoint.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpointId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); } // validate the required field `type` EndpointTypeEnum.validateJsonElement(jsonObj.get("type")); // validate the required field `status` EndpointStatusEnum.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); if (jsonArraydevices != null) { // ensure the json data is an array if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); } // validate the optional field `devices` (array) @@ -443,7 +448,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/EndpointDirectionEnum.java index a2a96393..f888df29 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointEvent.java b/src/main/java/com/bandwidth/sdk/model/EndpointEvent.java index e012099d..3b3a8b25 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointEvent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Device; import com.bandwidth.sdk.model.EndpointEventTypeEnum; import com.bandwidth.sdk.model.EndpointStatusEnum; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * An event that occurred on an endpoint. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class EndpointEvent { public static final String SERIALIZED_NAME_ENDPOINT_ID = "endpointId"; @SerializedName(SERIALIZED_NAME_ENDPOINT_ID) @@ -368,7 +370,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -392,26 +397,26 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!EndpointEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EndpointEvent is not found in the empty JSON string", EndpointEvent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EndpointEvent is not found in the empty JSON string", EndpointEvent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EndpointEvent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpointId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); } // validate the required field `type` EndpointTypeEnum.validateJsonElement(jsonObj.get("type")); // validate the required field `status` EndpointStatusEnum.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the required field `eventType` EndpointEventTypeEnum.validateJsonElement(jsonObj.get("eventType")); @@ -478,7 +483,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointEventTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/EndpointEventTypeEnum.java index 56f69fc9..c394e7ac 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointEventTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointEventTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java b/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java index c21a3015..e0bb35e0 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.BrtcError; import com.bandwidth.sdk.model.BrtcLink; import com.bandwidth.sdk.model.Endpoint; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * EndpointResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class EndpointResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,39 +257,39 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!EndpointResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EndpointResponse is not found in the empty JSON string", EndpointResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EndpointResponse is not found in the empty JSON string", EndpointResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EndpointResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("links") != null) { - if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); - } - JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); - // validate the required field `links` (array) - for (int i = 0; i < jsonArraylinks.size(); i++) { - BrtcLink.validateJsonElement(jsonArraylinks.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } + + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + // validate the required field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + BrtcLink.validateJsonElement(jsonArraylinks.get(i)); + }; // validate the required field `data` Endpoint.validateJsonElement(jsonObj.get("data")); - if (jsonObj.get("errors") != null) { - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - BrtcError.validateJsonElement(jsonArrayerrors.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } + + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + // validate the required field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + BrtcError.validateJsonElement(jsonArrayerrors.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -344,7 +349,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/EndpointStatusEnum.java index 71ef90e6..29a90e1f 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/EndpointTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/EndpointTypeEnum.java index 870e44a1..08f86bd5 100644 --- a/src/main/java/com/bandwidth/sdk/model/EndpointTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/EndpointTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Endpoints.java b/src/main/java/com/bandwidth/sdk/model/Endpoints.java index bfc6f2ba..4a04e333 100644 --- a/src/main/java/com/bandwidth/sdk/model/Endpoints.java +++ b/src/main/java/com/bandwidth/sdk/model/Endpoints.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.EndpointStatusEnum; import com.bandwidth.sdk.model.EndpointTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Endpoints */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Endpoints { public static final String SERIALIZED_NAME_ENDPOINT_ID = "endpointId"; @SerializedName(SERIALIZED_NAME_ENDPOINT_ID) @@ -288,7 +290,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -312,26 +317,26 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Endpoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Endpoints is not found in the empty JSON string", Endpoints.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Endpoints is not found in the empty JSON string", Endpoints.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Endpoints.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpointId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpointId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpointId").toString())); } // validate the required field `type` EndpointTypeEnum.validateJsonElement(jsonObj.get("type")); // validate the required field `status` EndpointStatusEnum.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -392,7 +397,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java index 44487a93..8fbecde9 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ErrorObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ErrorObject { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -208,7 +210,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -232,22 +237,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ErrorObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `source` ErrorSource.validateJsonElement(jsonObj.get("source")); @@ -310,7 +315,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java index 901f764f..18e6b6b5 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Specifies relevant sources of the error, if any. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) @@ -233,7 +235,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -257,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("parameter") != null && !jsonObj.get("parameter").isJsonNull()) && !jsonObj.get("parameter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); } if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); } if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); } } @@ -332,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java index 1b043f7e..19dde68b 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FailureWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class FailureWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -295,7 +297,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -319,28 +324,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!FailureWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("errorCode") != null && !jsonObj.get("errorCode").isJsonNull()) && !jsonObj.get("errorCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -401,7 +406,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FieldError.java b/src/main/java/com/bandwidth/sdk/model/FieldError.java index f83b02ba..1f2eb746 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fieldName") != null && !jsonObj.get("fieldName").isJsonNull()) && !jsonObj.get("fieldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java index 1f27ba16..7c3e6137 100644 --- a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index d81d2612..0ffd4b9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -153,7 +155,7 @@ public GatherCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -612,7 +614,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -636,52 +641,52 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("digits") != null && !jsonObj.get("digits").isJsonNull()) && !jsonObj.get("digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("terminatingDigit") != null && !jsonObj.get("terminatingDigit").isJsonNull()) && !jsonObj.get("terminatingDigit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -742,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java index 8d1c787d..4f1d2691 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; import com.bandwidth.sdk.model.LinkSchema; import com.bandwidth.sdk.model.LookupErrorSchema; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * GetAsyncBulkLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GetAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GetAsyncBulkLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetAsyncBulkLookupResponse is not found in the empty JSON string", GetAsyncBulkLookupResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GetAsyncBulkLookupResponse is not found in the empty JSON string", GetAsyncBulkLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -261,7 +266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -279,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -347,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java index 8d85ada4..f07b7466 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InProgressLookupStatusEnum; import com.bandwidth.sdk.model.LookupResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GetAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -220,7 +222,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -244,12 +249,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GetAsyncBulkLookupResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetAsyncBulkLookupResponseData is not found in the empty JSON string", GetAsyncBulkLookupResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GetAsyncBulkLookupResponseData is not found in the empty JSON string", GetAsyncBulkLookupResponseData.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -260,7 +265,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) @@ -328,7 +333,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java index f9a535bf..c1d98b0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java index 2806b23e..17e398fe 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents an inbound callback. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InboundCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -288,7 +290,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -312,29 +317,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` InboundCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` InboundCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -395,7 +400,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java index 41225f1f..412d1602 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.MultiChannelMessageContent; @@ -54,13 +55,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * InboundCallbackMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InboundCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -573,7 +575,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -597,25 +602,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -623,20 +628,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -717,7 +722,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java index a07fbe13..630bc0ae 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 76014cec..72249fd1 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.Diversion; import com.bandwidth.sdk.model.StirShaken; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -141,7 +143,7 @@ public InitiateCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -534,7 +536,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -558,34 +563,34 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } // validate the optional field `diversion` if (jsonObj.get("diversion") != null && !jsonObj.get("diversion").isJsonNull()) { @@ -596,10 +601,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StirShaken.validateJsonElement(jsonObj.get("stirShaken")); } if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } if ((jsonObj.get("sipCallId") != null && !jsonObj.get("sipCallId").isJsonNull()) && !jsonObj.get("sipCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sipCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sipCallId").toString())); } } @@ -660,7 +665,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java index 771e14f0..3f862d0f 100644 --- a/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java index 776f065d..5a3b331d 100644 --- a/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Link.java b/src/main/java/com/bandwidth/sdk/model/Link.java index 40e51aa0..24e990f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Link */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Link { public static final String SERIALIZED_NAME_REL = "rel"; @SerializedName(SERIALIZED_NAME_REL) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Link.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java index 3c1534a2..b61dae80 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LinkSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LinkSchema { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LinkSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LinkSchema is not found in the empty JSON string", LinkSchema.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LinkSchema is not found in the empty JSON string", LinkSchema.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) && !jsonObj.get("method").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); } } @@ -303,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LinksObject.java b/src/main/java/com/bandwidth/sdk/model/LinksObject.java index e771b0ac..4c1afbb1 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LinksObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LinksObject { public static final String SERIALIZED_NAME_FIRST = "first"; @SerializedName(SERIALIZED_NAME_FIRST) @@ -233,7 +235,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -257,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LinksObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("first") != null && !jsonObj.get("first").isJsonNull()) && !jsonObj.get("first").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); } if ((jsonObj.get("next") != null && !jsonObj.get("next").isJsonNull()) && !jsonObj.get("next").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); } if ((jsonObj.get("previous") != null && !jsonObj.get("previous").isJsonNull()) && !jsonObj.get("previous").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); } if ((jsonObj.get("last") != null && !jsonObj.get("last").isJsonNull()) && !jsonObj.get("last").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); } } @@ -332,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java b/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java index 09736af5..c6aa8069 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/ListEndpointsResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.BrtcError; import com.bandwidth.sdk.model.BrtcLink; import com.bandwidth.sdk.model.Endpoints; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ListEndpointsResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ListEndpointsResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -263,7 +265,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -287,51 +292,51 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ListEndpointsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ListEndpointsResponse is not found in the empty JSON string", ListEndpointsResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ListEndpointsResponse is not found in the empty JSON string", ListEndpointsResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ListEndpointsResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("links") != null) { - if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); - } - JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); - // validate the required field `links` (array) - for (int i = 0; i < jsonArraylinks.size(); i++) { - BrtcLink.validateJsonElement(jsonArraylinks.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } + + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + // validate the required field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + BrtcLink.validateJsonElement(jsonArraylinks.get(i)); + }; // validate the optional field `page` if (jsonObj.get("page") != null && !jsonObj.get("page").isJsonNull()) { Page.validateJsonElement(jsonObj.get("page")); } - if (jsonObj.get("data") != null) { - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Endpoints.validateJsonElement(jsonArraydata.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); } - if (jsonObj.get("errors") != null) { - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - BrtcError.validateJsonElement(jsonArrayerrors.get(i)); - } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + Endpoints.validateJsonElement(jsonArraydata.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } + + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + // validate the required field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + BrtcError.validateJsonElement(jsonArrayerrors.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -391,7 +396,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java index f175c9cd..65fbd38a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index 82888b7b..c96dc940 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageDirectionEnum; import com.bandwidth.sdk.model.MessageStatusEnum; import com.bandwidth.sdk.model.MessageTypeEnum; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -743,7 +745,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -767,21 +772,21 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("sourceTn") != null && !jsonObj.get("sourceTn").isJsonNull()) && !jsonObj.get("sourceTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); } if ((jsonObj.get("destinationTn") != null && !jsonObj.get("destinationTn").isJsonNull()) && !jsonObj.get("destinationTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); } // validate the optional field `messageStatus` if (jsonObj.get("messageStatus") != null && !jsonObj.get("messageStatus").isJsonNull()) { @@ -796,25 +801,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MessageTypeEnum.validateJsonElement(jsonObj.get("messageType")); } if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); } if ((jsonObj.get("callingNumberCountryA3") != null && !jsonObj.get("callingNumberCountryA3").isJsonNull()) && !jsonObj.get("callingNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); } if ((jsonObj.get("calledNumberCountryA3") != null && !jsonObj.get("calledNumberCountryA3").isJsonNull()) && !jsonObj.get("calledNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); } if ((jsonObj.get("product") != null && !jsonObj.get("product").isJsonNull()) && !jsonObj.get("product").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); } if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } } @@ -875,7 +880,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java index 23cc01f7..316e6eb9 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LinkSchema; import com.bandwidth.sdk.model.LookupErrorSchema; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LookupErrorResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -227,7 +229,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -251,7 +256,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LookupErrorResponse is not found in the empty JSON string", LookupErrorResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupErrorResponse is not found in the empty JSON string", LookupErrorResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -260,7 +265,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -274,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -342,7 +347,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java index 6e096713..e9555b3d 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LookupErrorSchemaMeta; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LookupErrorSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorSchema { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -234,7 +236,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -258,25 +263,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupErrorSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LookupErrorSchema is not found in the empty JSON string", LookupErrorSchema.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupErrorSchema is not found in the empty JSON string", LookupErrorSchema.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LookupErrorSchema.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // validate the optional field `meta` if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { @@ -341,7 +346,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java index 31348b51..5c0c79e2 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LookupErrorSchemaMeta */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorSchemaMeta { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -217,7 +219,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -241,16 +246,16 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupErrorSchemaMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LookupErrorSchemaMeta is not found in the empty JSON string", LookupErrorSchemaMeta.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupErrorSchemaMeta is not found in the empty JSON string", LookupErrorSchemaMeta.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("phoneNumbers") != null && !jsonObj.get("phoneNumbers").isJsonNull() && !jsonObj.get("phoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -311,7 +316,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index 16740210..cc83ada9 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.DeactivationEventEnum; import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; import com.bandwidth.sdk.model.LineTypeEnum; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupResult { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -445,7 +447,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -469,31 +474,31 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `lineType` if (jsonObj.get("lineType") != null && !jsonObj.get("lineType").isJsonNull()) { LineTypeEnum.validateJsonElement(jsonObj.get("lineType")); } if ((jsonObj.get("messagingProvider") != null && !jsonObj.get("messagingProvider").isJsonNull()) && !jsonObj.get("messagingProvider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `messagingProvider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messagingProvider").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messagingProvider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messagingProvider").toString())); } if ((jsonObj.get("voiceProvider") != null && !jsonObj.get("voiceProvider").isJsonNull()) && !jsonObj.get("voiceProvider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `voiceProvider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("voiceProvider").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `voiceProvider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("voiceProvider").toString())); } if ((jsonObj.get("countryCodeA3") != null && !jsonObj.get("countryCodeA3").isJsonNull()) && !jsonObj.get("countryCodeA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `countryCodeA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCodeA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `countryCodeA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCodeA3").toString())); } if ((jsonObj.get("deactivationReporter") != null && !jsonObj.get("deactivationReporter").isJsonNull()) && !jsonObj.get("deactivationReporter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `deactivationReporter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deactivationReporter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `deactivationReporter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deactivationReporter").toString())); } if ((jsonObj.get("deactivationDate") != null && !jsonObj.get("deactivationDate").isJsonNull()) && !jsonObj.get("deactivationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `deactivationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deactivationDate").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `deactivationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deactivationDate").toString())); } // validate the optional field `deactivationEvent` if (jsonObj.get("deactivationEvent") != null && !jsonObj.get("deactivationEvent").isJsonNull()) { @@ -562,7 +567,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index c12fcc70..5e175ecd 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -134,7 +136,7 @@ public MachineDetectionCompleteCallback eventType(@javax.annotation.Nullable Str } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -509,7 +511,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -533,37 +538,37 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -628,7 +633,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java index d82d624e..4adad0ce 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionModeEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -534,7 +536,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -558,7 +563,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -567,30 +572,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionModeEnum.validateJsonElement(jsonObj.get("mode")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUrl") != null && !jsonObj.get("fallbackUrl").isJsonNull()) && !jsonObj.get("fallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); } // validate the optional field `fallbackMethod` if (jsonObj.get("fallbackMethod") != null && !jsonObj.get("fallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("fallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -651,7 +656,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java index 633c38e1..422a60db 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java index 18246b24..f0407ec7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Media.java b/src/main/java/com/bandwidth/sdk/model/Media.java index 36dc79ee..87f0e55e 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,15 +236,15 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) && !jsonObj.get("content").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); } if ((jsonObj.get("mediaName") != null && !jsonObj.get("mediaName").isJsonNull()) && !jsonObj.get("mediaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); } } @@ -300,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Message.java b/src/main/java/com/bandwidth/sdk/model/Message.java index cd3b587c..30d3324c 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -488,7 +490,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -512,18 +517,18 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("owner") != null && !jsonObj.get("owner").isJsonNull()) && !jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -531,20 +536,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the optional json data is an array if present if (jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull() && !jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -609,7 +614,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java index 52886e8a..73efd53a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java index 7a24784f..0ed3c6db 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -360,7 +362,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -384,38 +389,38 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "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(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -480,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java index 80760f09..743cb1b7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java index ba7ade9b..84010448 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessagesList.java b/src/main/java/com/bandwidth/sdk/model/MessagesList.java index 554daee3..0e0dbe0d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageItem; import com.bandwidth.sdk.model.PageInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) @@ -219,7 +221,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -243,7 +248,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -256,7 +261,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraymessages != null) { // ensure the json data is an array if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); } // validate the optional field `messages` (array) @@ -324,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java index 57cca403..ef47dcf0 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,12 +184,12 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } } @@ -245,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java index 11055d6d..d5e0362c 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,22 +210,22 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessagingRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -281,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java index c48846b0..e76438ad 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,12 +184,12 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -245,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java index f3b81809..4bf63ee4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java index 4b40605b..a57a9a25 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,12 +184,12 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -245,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java index 2f6c7f54..8653ed04 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -192,7 +194,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -216,19 +221,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MmsMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { JsonArray jsonArraymedia = jsonObj.getAsJsonArray("media"); if (jsonArraymedia != null) { // ensure the json data is an array if (!jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `media` (array) @@ -296,7 +301,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java index 8e9fd83a..491b7e4b 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MmsMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -156,7 +158,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -180,19 +185,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MmsMessageContentFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MmsMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } } @@ -253,7 +258,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java index 1fc6a477..58271eb7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelActionCalendarEvent; import com.bandwidth.sdk.model.RbmActionBase; import com.bandwidth.sdk.model.RbmActionDial; @@ -67,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelAction extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelAction.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index 39a1355e..64c14e06 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelActionCalendarEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelActionCalendarEvent { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -313,7 +315,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -337,27 +342,27 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelActionCalendarEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelActionCalendarEvent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -418,7 +423,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java index 1f33c4cd..fcf1a98b 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListMMSObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListMMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -235,7 +237,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -259,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListMMSObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListMMSObject is not found in the empty JSON string", MultiChannelChannelListMMSObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListMMSObject is not found in the empty JSON string", MultiChannelChannelListMMSObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListMMSObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -339,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java index 08fb0acf..3e165d92 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListMMSResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListMMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -261,7 +263,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -285,29 +290,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListMMSResponseObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListMMSResponseObject is not found in the empty JSON string", MultiChannelChannelListMMSResponseObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListMMSResponseObject is not found in the empty JSON string", MultiChannelChannelListMMSResponseObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListMMSResponseObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); // validate the required field `content` MmsMessageContent.validateJsonElement(jsonObj.get("content")); if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -368,7 +373,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java index ebc96210..5508d2cc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListObjectBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListObjectBase { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -208,7 +210,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -232,22 +237,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListObjectBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListObjectBase is not found in the empty JSON string", MultiChannelChannelListObjectBase.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListObjectBase is not found in the empty JSON string", MultiChannelChannelListObjectBase.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListObjectBase.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -310,7 +315,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java index 8b2687ba..6c2deaae 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListOwnerObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListOwnerObject { public static final String SERIALIZED_NAME_OWNER = "owner"; @SerializedName(SERIALIZED_NAME_OWNER) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,19 +184,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListOwnerObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListOwnerObject is not found in the empty JSON string", MultiChannelChannelListOwnerObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListOwnerObject is not found in the empty JSON string", MultiChannelChannelListOwnerObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListOwnerObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -252,7 +257,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java index 11c6770f..94da073b 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListRBMObjectAllOfContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListRBMObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRBMObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -235,7 +237,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -259,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListRBMObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListRBMObject is not found in the empty JSON string", MultiChannelChannelListRBMObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListRBMObject is not found in the empty JSON string", MultiChannelChannelListRBMObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListRBMObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -339,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java index 9e322c2d..e1d34e26 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListRBMObjectAllOfContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListRBMResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRBMResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -261,7 +263,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -285,29 +290,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListRBMResponseObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListRBMResponseObject is not found in the empty JSON string", MultiChannelChannelListRBMResponseObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListRBMResponseObject is not found in the empty JSON string", MultiChannelChannelListRBMResponseObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListRBMResponseObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); // validate the required field `content` MultiChannelChannelListRBMObjectAllOfContent.validateJsonElement(jsonObj.get("content")); if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -368,7 +373,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java index 74695989..1c4f26cf 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MultiChannelChannelListMMSObject; import com.bandwidth.sdk.model.MultiChannelChannelListRBMObject; @@ -62,7 +63,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRequestObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListRequestObject.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java index 29275024..bb53809e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MultiChannelChannelListMMSResponseObject; import com.bandwidth.sdk.model.MultiChannelChannelListRBMResponseObject; @@ -62,7 +63,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListResponseObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListResponseObject.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java index 5af207e5..5fc163b0 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.SmsMessageContent; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListSMSObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListSMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -235,7 +237,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -259,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListSMSObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListSMSObject is not found in the empty JSON string", MultiChannelChannelListSMSObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListSMSObject is not found in the empty JSON string", MultiChannelChannelListSMSObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListSMSObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -339,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java index 120436a0..e5244483 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.SmsMessageContent; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListSMSResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListSMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -261,7 +263,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -285,29 +290,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListSMSResponseObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelChannelListSMSResponseObject is not found in the empty JSON string", MultiChannelChannelListSMSResponseObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListSMSResponseObject is not found in the empty JSON string", MultiChannelChannelListSMSResponseObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListSMSResponseObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); // validate the required field `content` SmsMessageContent.validateJsonElement(jsonObj.get("content")); if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -368,7 +373,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java index 3922f414..90790f2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelError { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -239,7 +241,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -263,7 +268,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -272,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -286,7 +291,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -354,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java index 3f7546c8..c9d207ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java index e31da42e..69ac05d7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The structure of the content field of a multichannel message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -182,7 +184,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -206,12 +211,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -276,7 +281,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java index adf1a485..4931bafc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListRequestObject; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Multi-Channel Message Request */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -272,7 +274,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -296,32 +301,32 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } - if (jsonObj.get("channelList") != null) { - if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); - } - JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); - // validate the required field `channelList` (array) - for (int i = 0; i < jsonArraychannelList.size(); i++) { - MultiChannelChannelListRequestObject.validateJsonElement(jsonArraychannelList.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("channelList").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } + + JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); + // validate the required field `channelList` (array) + for (int i = 0; i < jsonArraychannelList.size(); i++) { + MultiChannelChannelListRequestObject.validateJsonElement(jsonArraychannelList.get(i)); + }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -386,7 +391,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java index 64c36e1a..09fc2dcd 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelChannelListResponseObject; import com.bandwidth.sdk.model.PriorityEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The data returned in a multichannel message response. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -361,7 +363,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -385,19 +390,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageResponseData.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -405,20 +410,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } - if (jsonObj.get("channelList") != null) { - if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); - } - JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); - // validate the required field `channelList` (array) - for (int i = 0; i < jsonArraychannelList.size(); i++) { - MultiChannelChannelListResponseObject.validateJsonElement(jsonArraychannelList.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("channelList").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } + + JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); + // validate the required field `channelList` (array) + for (int i = 0; i < jsonArraychannelList.size(); i++) { + MultiChannelChannelListResponseObject.validateJsonElement(jsonArraychannelList.get(i)); + }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -483,7 +488,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java index bb985d7a..8a343504 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * OptInWorkflow */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class OptInWorkflow { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -229,7 +231,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -253,28 +258,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!OptInWorkflow.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OptInWorkflow.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the required json array is present if (jsonObj.get("imageUrls") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("imageUrls").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); } if ((jsonObj.get("confirmationResponse") != null && !jsonObj.get("confirmationResponse").isJsonNull()) && !jsonObj.get("confirmationResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); } } @@ -335,7 +340,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Page.java b/src/main/java/com/bandwidth/sdk/model/Page.java index dbf55c9a..659aced4 100644 --- a/src/main/java/com/bandwidth/sdk/model/Page.java +++ b/src/main/java/com/bandwidth/sdk/model/Page.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Page */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Page { public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; @SerializedName(SERIALIZED_NAME_PAGE_SIZE) @@ -237,7 +239,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -261,14 +266,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Page.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Page is not found in the empty JSON string", Page.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Page is not found in the empty JSON string", Page.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Page.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -331,7 +336,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PageInfo.java b/src/main/java/com/bandwidth/sdk/model/PageInfo.java index 7086ec6d..c88c9ac2 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) @@ -233,7 +235,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -257,21 +262,21 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("prevPage") != null && !jsonObj.get("prevPage").isJsonNull()) && !jsonObj.get("prevPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); } if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); } if ((jsonObj.get("prevPageToken") != null && !jsonObj.get("prevPageToken").isJsonNull()) && !jsonObj.get("prevPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); } if ((jsonObj.get("nextPageToken") != null && !jsonObj.get("nextPageToken").isJsonNull()) && !jsonObj.get("nextPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); } } @@ -332,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java index 26533e2c..1d667b81 100644 --- a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java index 5c83c023..f97e4116 100644 --- a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java index 41db7c12..6087bfe8 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -208,7 +210,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -232,21 +237,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionBase.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -307,7 +312,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java index feb7fa7e..f6fc8359 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionDial */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionDial { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -234,7 +236,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -258,24 +263,24 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionDial.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionDial.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -336,7 +341,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java index 654babe6..a302ec52 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.bandwidth.sdk.model.RbmOpenUrlEnum; import com.bandwidth.sdk.model.RbmWebViewEnum; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionOpenUrl */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionOpenUrl { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -289,7 +291,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -313,24 +318,24 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionOpenUrl.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionOpenUrl.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } // validate the optional field `application` if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { @@ -399,7 +404,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java index 77d1054c..41ef7f5a 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java index 018d83c9..0b762256 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionViewLocation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionViewLocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -286,7 +288,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -310,30 +315,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionViewLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionViewLocation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if (!jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } } @@ -394,7 +399,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java index e6329f47..cc63c6f8 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContentMedia; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Must contain at least one of title, description, or media to be valid. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmCardContent { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) @@ -245,7 +247,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -269,15 +274,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -288,7 +293,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -356,7 +361,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java index a462a5c6..7abc00ec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMediaHeightEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContentMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmCardContentMedia { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -209,7 +211,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -233,22 +238,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContentMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmCardContentMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } // validate the required field `height` RbmMediaHeightEnum.validateJsonElement(jsonObj.get("height")); @@ -311,7 +316,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java index 5e4d8b59..4c76ec90 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmLocationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmLocationResponse { public static final String SERIALIZED_NAME_LATITUDE = "latitude"; @SerializedName(SERIALIZED_NAME_LATITUDE) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmLocationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("latitude") != null && !jsonObj.get("latitude").isJsonNull()) && !jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if ((jsonObj.get("longitude") != null && !jsonObj.get("longitude").isJsonNull()) && !jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java index c31e67a4..59222725 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java index 3b904488..e541d558 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageCarouselCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageCarouselCard { public static final String SERIALIZED_NAME_CARD_WIDTH = "cardWidth"; @SerializedName(SERIALIZED_NAME_CARD_WIDTH) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,35 +257,35 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageCarouselCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageCarouselCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `cardWidth` CardWidthEnum.validateJsonElement(jsonObj.get("cardWidth")); - if (jsonObj.get("cardContents") != null) { - if (!jsonObj.get("cardContents").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); - } - JsonArray jsonArraycardContents = jsonObj.getAsJsonArray("cardContents"); - // validate the required field `cardContents` (array) - for (int i = 0; i < jsonArraycardContents.size(); i++) { - RbmCardContent.validateJsonElement(jsonArraycardContents.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("cardContents").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); } + + JsonArray jsonArraycardContents = jsonObj.getAsJsonArray("cardContents"); + // validate the required field `cardContents` (array) + for (int i = 0; i < jsonArraycardContents.size(); i++) { + RbmCardContent.validateJsonElement(jsonArraycardContents.get(i)); + }; if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { JsonArray jsonArraysuggestions = jsonObj.getAsJsonArray("suggestions"); if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -348,7 +353,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java index e9d8c1d7..6b9a0c17 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -182,7 +184,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -206,22 +211,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } } @@ -282,7 +287,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java index 0f06a8b8..5c4cb506 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -43,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -66,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); @@ -122,7 +124,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmStandaloneCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmStandaloneCard'", e); } // deserialize RbmMessageCarouselCard @@ -134,7 +136,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmMessageCarouselCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageCarouselCard'", e); } @@ -144,7 +146,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -213,7 +215,6 @@ public Object getActualInstance() { * @return The actual instance of `RbmStandaloneCard` * @throws ClassCastException if the instance is not `RbmStandaloneCard` */ - @SuppressWarnings("unchecked") public RbmStandaloneCard getRbmStandaloneCard() throws ClassCastException { return (RbmStandaloneCard)super.getActualInstance(); } @@ -225,7 +226,6 @@ public RbmStandaloneCard getRbmStandaloneCard() throws ClassCastException { * @return The actual instance of `RbmMessageCarouselCard` * @throws ClassCastException if the instance is not `RbmMessageCarouselCard` */ - @SuppressWarnings("unchecked") public RbmMessageCarouselCard getRbmMessageCarouselCard() throws ClassCastException { return (RbmMessageCarouselCard)super.getActualInstance(); } @@ -245,7 +245,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmStandaloneCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageCarouselCard @@ -253,11 +253,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageCarouselCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java index 17e847af..e0de2980 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentText */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentText { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -192,7 +194,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -216,26 +221,26 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentText.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentText.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { JsonArray jsonArraysuggestions = jsonObj.getAsJsonArray("suggestions"); if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -303,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java index 24e9c648..704e36dd 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageMedia { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) @@ -201,7 +203,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -225,33 +230,33 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("media") != null) { - if (!jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); - } - JsonArray jsonArraymedia = jsonObj.getAsJsonArray("media"); - // validate the required field `media` (array) - for (int i = 0; i < jsonArraymedia.size(); i++) { - RbmMessageContentFile.validateJsonElement(jsonArraymedia.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("media").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } + + JsonArray jsonArraymedia = jsonObj.getAsJsonArray("media"); + // validate the required field `media` (array) + for (int i = 0; i < jsonArraymedia.size(); i++) { + RbmMessageContentFile.validateJsonElement(jsonArraymedia.get(i)); + }; if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { JsonArray jsonArraysuggestions = jsonObj.getAsJsonArray("suggestions"); if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -319,7 +324,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java index cf421c75..a65398bb 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index 3a1ece73..dca067ed 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; import com.bandwidth.sdk.model.StandaloneCardOrientationEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmStandaloneCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmStandaloneCard { public static final String SERIALIZED_NAME_ORIENTATION = "orientation"; @SerializedName(SERIALIZED_NAME_ORIENTATION) @@ -247,7 +249,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -271,14 +276,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmStandaloneCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmStandaloneCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -295,7 +300,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -363,7 +368,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java index a6ebbe36..bdb0af9d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmSuggestionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmSuggestionResponse { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -219,7 +221,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -243,15 +248,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmSuggestionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("pairedMessageId") != null && !jsonObj.get("pairedMessageId").isJsonNull()) && !jsonObj.get("pairedMessageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pairedMessageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pairedMessageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `pairedMessageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pairedMessageId").toString())); } } @@ -312,7 +317,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java index 6bc76481..c0950ea5 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 46bddb6a..9c68b0c6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -174,7 +176,7 @@ public RecordingAvailableCallback eventType(@javax.annotation.Nullable String ev } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -717,7 +719,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -741,62 +746,62 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -857,7 +862,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index f4692d11..1a47ce41 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -174,7 +176,7 @@ public RecordingCompleteCallback eventType(@javax.annotation.Nullable String eve } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -717,7 +719,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -741,59 +746,59 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -854,7 +859,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java index ff3d9507..07c60a08 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionClip.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionClip.java index ed2bc02d..6da224d9 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionClip.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionClip.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RecordingTranscriptionClip */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingTranscriptionClip { public static final String SERIALIZED_NAME_SPEAKER = "speaker"; @SerializedName(SERIALIZED_NAME_SPEAKER) @@ -261,7 +263,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -285,12 +290,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptionClip.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RecordingTranscriptionClip is not found in the empty JSON string", RecordingTranscriptionClip.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptionClip is not found in the empty JSON string", RecordingTranscriptionClip.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -351,7 +356,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java index c2303235..f9c3e9ab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingTranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -235,7 +237,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -259,18 +264,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -331,7 +336,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java index dbec6c3c..9c8a578f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RecordingTranscriptionClip; import com.bandwidth.sdk.model.Transcription; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RecordingTranscriptions */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingTranscriptions { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) @@ -201,7 +203,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -225,7 +230,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -234,7 +239,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraytranscripts != null) { // ensure the json data is an array if (!jsonObj.get("transcripts").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); } // validate the optional field `transcripts` (array) @@ -248,7 +253,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayclips != null) { // ensure the json data is an array if (!jsonObj.get("clips").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `clips` to be an array in the JSON string but got `%s`", jsonObj.get("clips").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `clips` to be an array in the JSON string but got `%s`", jsonObj.get("clips").toString())); } // validate the optional field `clips` (array) @@ -316,7 +321,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index 3723d1db..f9e21709 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -143,7 +145,7 @@ public RedirectCallback eventType(@javax.annotation.Nullable String eventType) { } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -560,7 +562,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -584,46 +589,46 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -684,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java index ef3d6bfd..52ecdcab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ReferCallStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/ReferCallStatusEnum.java new file mode 100644 index 00000000..d193ec4a --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/ReferCallStatusEnum.java @@ -0,0 +1,80 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * The outcome of the REFER operation. + */ +@JsonAdapter(ReferCallStatusEnum.Adapter.class) +public enum ReferCallStatusEnum { + + SUCCESS("success"), + + FAILURE("failure"); + + private String value; + + ReferCallStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReferCallStatusEnum fromValue(String value) { + for (ReferCallStatusEnum b : ReferCallStatusEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReferCallStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReferCallStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReferCallStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReferCallStatusEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/ReferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/ReferCompleteCallback.java new file mode 100644 index 00000000..c1a42a1f --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/ReferCompleteCallback.java @@ -0,0 +1,697 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.CallDirectionEnum; +import com.bandwidth.sdk.model.ReferCallStatusEnum; +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.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * This event is sent to the referCompleteUrl of a call's <Refer> verb when the SIP REFER flow completes. On success, the call has been torn down and the BXML returned from this callback is ignored. On failure, the call remains active and the BXML returned from this callback is executed on the call. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +public class ReferCompleteCallback { + public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nullable + private String eventType; + + public static final String SERIALIZED_NAME_EVENT_TIME = "eventTime"; + @SerializedName(SERIALIZED_NAME_EVENT_TIME) + @javax.annotation.Nullable + private OffsetDateTime eventTime; + + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nullable + private String accountId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nullable + private String applicationId; + + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nullable + private String from; + + public static final String SERIALIZED_NAME_TO = "to"; + @SerializedName(SERIALIZED_NAME_TO) + @javax.annotation.Nullable + private String to; + + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private CallDirectionEnum direction; + + public static final String SERIALIZED_NAME_CALL_ID = "callId"; + @SerializedName(SERIALIZED_NAME_CALL_ID) + @javax.annotation.Nullable + private String callId; + + public static final String SERIALIZED_NAME_CALL_URL = "callUrl"; + @SerializedName(SERIALIZED_NAME_CALL_URL) + @javax.annotation.Nullable + private URI callUrl; + + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + @SerializedName(SERIALIZED_NAME_START_TIME) + @javax.annotation.Nullable + private OffsetDateTime startTime; + + public static final String SERIALIZED_NAME_ANSWER_TIME = "answerTime"; + @SerializedName(SERIALIZED_NAME_ANSWER_TIME) + @javax.annotation.Nullable + private OffsetDateTime answerTime; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + @javax.annotation.Nullable + private String tag; + + public static final String SERIALIZED_NAME_REFER_CALL_STATUS = "referCallStatus"; + @SerializedName(SERIALIZED_NAME_REFER_CALL_STATUS) + @javax.annotation.Nullable + private ReferCallStatusEnum referCallStatus; + + public static final String SERIALIZED_NAME_REFER_SIP_RESPONSE_CODE = "referSipResponseCode"; + @SerializedName(SERIALIZED_NAME_REFER_SIP_RESPONSE_CODE) + @javax.annotation.Nullable + private Integer referSipResponseCode; + + public static final String SERIALIZED_NAME_NOTIFY_SIP_RESPONSE_CODE = "notifySipResponseCode"; + @SerializedName(SERIALIZED_NAME_NOTIFY_SIP_RESPONSE_CODE) + @javax.annotation.Nullable + private Integer notifySipResponseCode; + + public ReferCompleteCallback() { + } + + public ReferCompleteCallback eventType(@javax.annotation.Nullable String eventType) { + this.eventType = eventType; + return this; + } + + /** + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @return eventType + */ + @javax.annotation.Nullable + public String getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nullable String eventType) { + this.eventType = eventType; + } + + + public ReferCompleteCallback eventTime(@javax.annotation.Nullable OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * 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. + * @return eventTime + */ + @javax.annotation.Nullable + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(@javax.annotation.Nullable OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + + public ReferCompleteCallback accountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The user account associated with the call. + * @return accountId + */ + @javax.annotation.Nullable + public String getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + } + + + public ReferCompleteCallback applicationId(@javax.annotation.Nullable String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The id of the application associated with the call. + * @return applicationId + */ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nullable String applicationId) { + this.applicationId = applicationId; + } + + + public ReferCompleteCallback from(@javax.annotation.Nullable String from) { + this.from = from; + return this; + } + + /** + * The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * @return from + */ + @javax.annotation.Nullable + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nullable String from) { + this.from = from; + } + + + public ReferCompleteCallback to(@javax.annotation.Nullable String to) { + this.to = to; + return this; + } + + /** + * The phone number that received the call, in E.164 format (e.g. +15555555555). + * @return to + */ + @javax.annotation.Nullable + public String getTo() { + return to; + } + + public void setTo(@javax.annotation.Nullable String to) { + this.to = to; + } + + + public ReferCompleteCallback direction(@javax.annotation.Nullable CallDirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public CallDirectionEnum getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable CallDirectionEnum direction) { + this.direction = direction; + } + + + public ReferCompleteCallback callId(@javax.annotation.Nullable String callId) { + this.callId = callId; + return this; + } + + /** + * The call id associated with the event. + * @return callId + */ + @javax.annotation.Nullable + public String getCallId() { + return callId; + } + + public void setCallId(@javax.annotation.Nullable String callId) { + this.callId = callId; + } + + + public ReferCompleteCallback callUrl(@javax.annotation.Nullable URI callUrl) { + this.callUrl = callUrl; + return this; + } + + /** + * The URL of the call associated with the event. + * @return callUrl + */ + @javax.annotation.Nullable + public URI getCallUrl() { + return callUrl; + } + + public void setCallUrl(@javax.annotation.Nullable URI callUrl) { + this.callUrl = callUrl; + } + + + public ReferCompleteCallback startTime(@javax.annotation.Nullable OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Time the call was started, in ISO 8601 format. + * @return startTime + */ + @javax.annotation.Nullable + public OffsetDateTime getStartTime() { + return startTime; + } + + public void setStartTime(@javax.annotation.Nullable OffsetDateTime startTime) { + this.startTime = startTime; + } + + + public ReferCompleteCallback answerTime(@javax.annotation.Nullable OffsetDateTime answerTime) { + this.answerTime = answerTime; + return this; + } + + /** + * Time the call was answered, in ISO 8601 format. + * @return answerTime + */ + @javax.annotation.Nullable + public OffsetDateTime getAnswerTime() { + return answerTime; + } + + public void setAnswerTime(@javax.annotation.Nullable OffsetDateTime answerTime) { + this.answerTime = answerTime; + } + + + public ReferCompleteCallback tag(@javax.annotation.Nullable String tag) { + this.tag = tag; + return this; + } + + /** + * (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * @return tag + */ + @javax.annotation.Nullable + public String getTag() { + return tag; + } + + public void setTag(@javax.annotation.Nullable String tag) { + this.tag = tag; + } + + + public ReferCompleteCallback referCallStatus(@javax.annotation.Nullable ReferCallStatusEnum referCallStatus) { + this.referCallStatus = referCallStatus; + return this; + } + + /** + * Get referCallStatus + * @return referCallStatus + */ + @javax.annotation.Nullable + public ReferCallStatusEnum getReferCallStatus() { + return referCallStatus; + } + + public void setReferCallStatus(@javax.annotation.Nullable ReferCallStatusEnum referCallStatus) { + this.referCallStatus = referCallStatus; + } + + + public ReferCompleteCallback referSipResponseCode(@javax.annotation.Nullable Integer referSipResponseCode) { + this.referSipResponseCode = referSipResponseCode; + return this; + } + + /** + * (optional) The SIP response code returned for the REFER request itself (e.g. 202, 405, 603). Present when a SIP response was received for the REFER. + * @return referSipResponseCode + */ + @javax.annotation.Nullable + public Integer getReferSipResponseCode() { + return referSipResponseCode; + } + + public void setReferSipResponseCode(@javax.annotation.Nullable Integer referSipResponseCode) { + this.referSipResponseCode = referSipResponseCode; + } + + + public ReferCompleteCallback notifySipResponseCode(@javax.annotation.Nullable Integer notifySipResponseCode) { + this.notifySipResponseCode = notifySipResponseCode; + return this; + } + + /** + * (optional) The final SIP response code reported via NOTIFY (message/sipfrag body). Present only when the caller's endpoint sent a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was rejected before a subscription was established. + * @return notifySipResponseCode + */ + @javax.annotation.Nullable + public Integer getNotifySipResponseCode() { + return notifySipResponseCode; + } + + public void setNotifySipResponseCode(@javax.annotation.Nullable Integer notifySipResponseCode) { + this.notifySipResponseCode = notifySipResponseCode; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ReferCompleteCallback instance itself + */ + public ReferCompleteCallback putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferCompleteCallback referCompleteCallback = (ReferCompleteCallback) o; + return Objects.equals(this.eventType, referCompleteCallback.eventType) && + Objects.equals(this.eventTime, referCompleteCallback.eventTime) && + Objects.equals(this.accountId, referCompleteCallback.accountId) && + Objects.equals(this.applicationId, referCompleteCallback.applicationId) && + Objects.equals(this.from, referCompleteCallback.from) && + Objects.equals(this.to, referCompleteCallback.to) && + Objects.equals(this.direction, referCompleteCallback.direction) && + Objects.equals(this.callId, referCompleteCallback.callId) && + Objects.equals(this.callUrl, referCompleteCallback.callUrl) && + Objects.equals(this.startTime, referCompleteCallback.startTime) && + Objects.equals(this.answerTime, referCompleteCallback.answerTime) && + Objects.equals(this.tag, referCompleteCallback.tag) && + Objects.equals(this.referCallStatus, referCompleteCallback.referCallStatus) && + Objects.equals(this.referSipResponseCode, referCompleteCallback.referSipResponseCode) && + Objects.equals(this.notifySipResponseCode, referCompleteCallback.notifySipResponseCode)&& + Objects.equals(this.additionalProperties, referCompleteCallback.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, eventTime, accountId, applicationId, from, to, direction, callId, callUrl, startTime, answerTime, tag, referCallStatus, referSipResponseCode, notifySipResponseCode, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferCompleteCallback {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" callId: ").append(toIndentedString(callId)).append("\n"); + sb.append(" callUrl: ").append(toIndentedString(callUrl)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" answerTime: ").append(toIndentedString(answerTime)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" referCallStatus: ").append(toIndentedString(referCallStatus)).append("\n"); + sb.append(" referSipResponseCode: ").append(toIndentedString(referSipResponseCode)).append("\n"); + sb.append(" notifySipResponseCode: ").append(toIndentedString(notifySipResponseCode)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "answerTime", "tag", "referCallStatus", "referSipResponseCode", "notifySipResponseCode")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReferCompleteCallback + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ReferCompleteCallback is not found in the empty JSON string", ReferCompleteCallback.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + } + if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + } + if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + } + if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + } + if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + } + if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + } + if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + } + // validate the optional field `referCallStatus` + if (jsonObj.get("referCallStatus") != null && !jsonObj.get("referCallStatus").isJsonNull()) { + ReferCallStatusEnum.validateJsonElement(jsonObj.get("referCallStatus")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferCompleteCallback.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferCompleteCallback' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReferCompleteCallback.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferCompleteCallback value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ReferCompleteCallback read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ReferCompleteCallback instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReferCompleteCallback given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferCompleteCallback + * @throws IOException if the JSON string is invalid with respect to ReferCompleteCallback + */ + public static ReferCompleteCallback fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferCompleteCallback.class); + } + + /** + * Convert an instance of ReferCompleteCallback to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java b/src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java index a99f8f52..c2434be1 100644 --- a/src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/SipConnectionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.SipCredentials; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SipConnectionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SipConnectionMetadata { public static final String SERIALIZED_NAME_IP_ADDRESS = "ipAddress"; @SerializedName(SERIALIZED_NAME_IP_ADDRESS) @@ -234,7 +236,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -258,19 +263,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!SipConnectionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SipConnectionMetadata is not found in the empty JSON string", SipConnectionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SipConnectionMetadata is not found in the empty JSON string", SipConnectionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("ipAddress") != null && !jsonObj.get("ipAddress").isJsonNull()) && !jsonObj.get("ipAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ipAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipAddress").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipAddress").toString())); } // validate the optional field `credentials` if (jsonObj.get("credentials") != null && !jsonObj.get("credentials").isJsonNull()) { SipCredentials.validateJsonElement(jsonObj.get("credentials")); } if ((jsonObj.get("uuiHeader") != null && !jsonObj.get("uuiHeader").isJsonNull()) && !jsonObj.get("uuiHeader").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `uuiHeader` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuiHeader").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuiHeader` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuiHeader").toString())); } } @@ -331,7 +336,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/SipCredentials.java b/src/main/java/com/bandwidth/sdk/model/SipCredentials.java index 971aadb0..7db8bc71 100644 --- a/src/main/java/com/bandwidth/sdk/model/SipCredentials.java +++ b/src/main/java/com/bandwidth/sdk/model/SipCredentials.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SipCredentials */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SipCredentials { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!SipCredentials.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SipCredentials is not found in the empty JSON string", SipCredentials.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SipCredentials is not found in the empty JSON string", SipCredentials.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -274,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java index 65357196..e1229270 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,19 +184,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!SmsMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SmsMessageContent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -252,7 +257,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java index 206705f6..c80ead00 100644 --- a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java index ebe140ef..d3c67ac6 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.StatusCallbackMessage; import com.bandwidth.sdk.model.StatusCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents a status callback for an outbound MT SMS or MMS or RBM message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StatusCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -340,7 +342,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -364,29 +369,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` StatusCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` StatusCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -447,7 +452,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java index 62321bca..c8975249 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.PriorityEnum; @@ -51,13 +52,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message payload schema within a callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StatusCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -492,7 +494,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -516,25 +521,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -542,20 +547,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -624,7 +629,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java index dc2a8b4d..f6270a51 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/StirShaken.java b/src/main/java/com/bandwidth/sdk/model/StirShaken.java index 626de7b0..b145fb69 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,18 +236,18 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("verstat") != null && !jsonObj.get("verstat").isJsonNull()) && !jsonObj.get("verstat").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); } if ((jsonObj.get("attestationIndicator") != null && !jsonObj.get("attestationIndicator").isJsonNull()) && !jsonObj.get("attestationIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); } if ((jsonObj.get("originatingId") != null && !jsonObj.get("originatingId").isJsonNull()) && !jsonObj.get("originatingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); } } @@ -303,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java index 9622a00f..635add8f 100644 --- a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -191,7 +193,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -215,14 +220,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!SyncLookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SyncLookupRequest is not found in the empty JSON string", SyncLookupRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SyncLookupRequest is not found in the empty JSON string", SyncLookupRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SyncLookupRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -230,10 +235,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("phoneNumbers") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("phoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } if ((jsonObj.get("rcsAgent") != null && !jsonObj.get("rcsAgent").isJsonNull()) && !jsonObj.get("rcsAgent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rcsAgent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rcsAgent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rcsAgent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rcsAgent").toString())); } } @@ -294,7 +299,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java index 3093f8d5..84a96805 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TelephoneNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TelephoneNumber { public static final String SERIALIZED_NAME_TELEPHONE_NUMBER = "telephoneNumber"; @SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBER) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TelephoneNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("telephoneNumber") != null && !jsonObj.get("telephoneNumber").isJsonNull()) && !jsonObj.get("telephoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); } } @@ -245,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java index f6c46f7b..dcb4ae4d 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvBasicAuthentication */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TfvBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -281,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java index 7e21b73b..457deaf5 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvError.java b/src/main/java/com/bandwidth/sdk/model/TfvError.java index 730a54b6..d49eec2e 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A generic error object. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,15 +236,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -300,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java index 0dbb500d..fe3861dc 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.AdditionalDenialReason; import com.bandwidth.sdk.model.TfvStatusEnum; import com.bandwidth.sdk.model.TfvSubmissionInfo; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvStatus { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -493,7 +495,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -517,29 +522,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } if (jsonObj.get("additionalDenialReasons") != null && !jsonObj.get("additionalDenialReasons").isJsonNull()) { JsonArray jsonArrayadditionalDenialReasons = jsonObj.getAsJsonArray("additionalDenialReasons"); if (jsonArrayadditionalDenialReasons != null) { // ensure the json data is an array if (!jsonObj.get("additionalDenialReasons").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); } // validate the optional field `additionalDenialReasons` (array) @@ -553,10 +558,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TfvSubmissionInfo.validateJsonElement(jsonObj.get("submission")); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } if ((jsonObj.get("cvToken") != null && !jsonObj.get("cvToken").isJsonNull()) && !jsonObj.get("cvToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); } } @@ -617,7 +622,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java index d17c8b50..de526935 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index ab43697b..378e66b6 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvSubmissionInfo { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -564,7 +566,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -588,7 +593,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvSubmissionInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -601,42 +606,42 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti Contact.validateJsonElement(jsonObj.get("businessContact")); } if ((jsonObj.get("useCase") != null && !jsonObj.get("useCase").isJsonNull()) && !jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if ((jsonObj.get("useCaseSummary") != null && !jsonObj.get("useCaseSummary").isJsonNull()) && !jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if ((jsonObj.get("productionMessageContent") != null && !jsonObj.get("productionMessageContent").isJsonNull()) && !jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the optional field `optInWorkflow` if (jsonObj.get("optInWorkflow") != null && !jsonObj.get("optInWorkflow").isJsonNull()) { OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); } if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { BusinessRegistrationTypeEnum.validateJsonElement(jsonObj.get("businessRegistrationType")); } if ((jsonObj.get("businessRegistrationIssuingCountry") != null && !jsonObj.get("businessRegistrationIssuingCountry").isJsonNull()) && !jsonObj.get("businessRegistrationIssuingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); } // validate the optional field `businessEntityType` if (jsonObj.get("businessEntityType") != null && !jsonObj.get("businessEntityType").isJsonNull()) { @@ -701,7 +706,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java index fa850d1d..816fe394 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.VerificationUpdateRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionWrapper */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvSubmissionWrapper { public static final String SERIALIZED_NAME_SUBMISSION = "submission"; @SerializedName(SERIALIZED_NAME_SUBMISSION) @@ -156,7 +158,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -180,7 +185,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvSubmissionWrapper.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -247,7 +252,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java index 1d39fdee..0c859510 100644 --- a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index b1e72b83..9ded93a1 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -327,7 +329,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -351,25 +356,25 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -430,7 +435,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Transcription.java b/src/main/java/com/bandwidth/sdk/model/Transcription.java index 41b4bfbf..d2ff2fb4 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Transcription { public static final String SERIALIZED_NAME_SPEAKER = "speaker"; @SerializedName(SERIALIZED_NAME_SPEAKER) @@ -207,7 +209,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -231,12 +236,12 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -297,7 +302,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index 6c2c4ff1..f7d91768 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.Transcription; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Transcription Available event is sent when the recording transcription is available to be downloaded. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -170,7 +172,7 @@ public TranscriptionAvailableCallback eventType(@javax.annotation.Nullable Strin } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -692,7 +694,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -716,63 +721,63 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { Transcription.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -833,7 +838,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index d0fe6dd2..c5803e1d 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -138,7 +140,7 @@ public TransferAnswerCallback eventType(@javax.annotation.Nullable String eventT } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -534,7 +536,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -558,43 +563,43 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -655,7 +660,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index 362ce497..46d6bbbe 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -153,7 +155,7 @@ public TransferCompleteCallback eventType(@javax.annotation.Nullable String even } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -612,7 +614,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -636,52 +641,52 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -742,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index 7a671623..a6df3888 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * 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", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -163,7 +165,7 @@ public TransferDisconnectCallback eventType(@javax.annotation.Nullable String ev } /** - * 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. + * 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, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * @return eventType */ @javax.annotation.Nullable @@ -664,7 +666,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -688,55 +693,55 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -797,7 +802,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java index 5e9cd0fd..cbf1a363 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -404,7 +406,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -428,7 +433,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -437,33 +442,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallStateEnum.validateJsonElement(jsonObj.get("state")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -524,7 +529,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java index c6bdd304..38eca647 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RecordingStateEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -156,7 +158,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -180,14 +185,14 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateCallRecording.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -252,7 +257,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java index 10aec8a6..3db39d55 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ConferenceStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -378,7 +380,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -402,7 +407,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -411,30 +416,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ConferenceStateEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -495,7 +500,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java index 469a1f90..ae882baa 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) @@ -229,7 +231,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -253,13 +258,13 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -320,7 +325,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java index 7c71f4cd..07f84b3c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.AdditionalDenialReason; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationDenialWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationDenialWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -400,7 +402,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -424,19 +429,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationDenialWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (jsonObj.get("additionalDenialReasons") != null && !jsonObj.get("additionalDenialReasons").isJsonNull()) { JsonArray jsonArrayadditionalDenialReasons = jsonObj.getAsJsonArray("additionalDenialReasons"); if (jsonArrayadditionalDenialReasons != null) { // ensure the json data is an array if (!jsonObj.get("additionalDenialReasons").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); } // validate the optional field `additionalDenialReasons` (array) @@ -446,19 +451,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -519,7 +524,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index aede26e3..579a5638 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -678,7 +680,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -702,14 +707,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -721,51 +726,51 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("phoneNumbers") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("phoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } if (!jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { BusinessRegistrationTypeEnum.validateJsonElement(jsonObj.get("businessRegistrationType")); } if ((jsonObj.get("businessRegistrationIssuingCountry") != null && !jsonObj.get("businessRegistrationIssuingCountry").isJsonNull()) && !jsonObj.get("businessRegistrationIssuingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); } // validate the required field `businessEntityType` BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } if ((jsonObj.get("cvToken") != null && !jsonObj.get("cvToken").isJsonNull()) && !jsonObj.get("cvToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); } } @@ -826,7 +831,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index 12c2d754..f5a7917a 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationUpdateRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -642,7 +644,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -666,14 +671,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationUpdateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationUpdateRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -682,33 +687,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `businessContact` Contact.validateJsonElement(jsonObj.get("businessContact")); if (!jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -719,13 +724,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); } if ((jsonObj.get("businessRegistrationIssuingCountry") != null && !jsonObj.get("businessRegistrationIssuingCountry").isJsonNull()) && !jsonObj.get("businessRegistrationIssuingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationIssuingCountry").toString())); } if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } if ((jsonObj.get("cvToken") != null && !jsonObj.get("cvToken").isJsonNull()) && !jsonObj.get("cvToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString())); } } @@ -786,7 +791,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java index accfbd09..a1abe4ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -234,7 +236,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -258,22 +263,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -334,7 +339,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java index 3290e1cb..3113987a 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -236,7 +238,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -260,25 +265,25 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerifyCodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -339,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java index d360e932..bd1fa5fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,7 +184,7 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -242,7 +247,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java index 99cdc7e6..0aff5385 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -219,7 +221,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -243,18 +248,18 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -315,7 +320,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java index 1c146a2d..d7ea2d7c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -155,7 +157,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -179,12 +184,12 @@ private String toIndentedString(Object o) { 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(java.util.Locale.ROOT, "The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } } @@ -245,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java index 4e4a8d18..c93ac622 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.WebhookSubscriptionBasicAuthentication; import com.bandwidth.sdk.model.WebhookSubscriptionTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -314,7 +316,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -338,25 +343,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscription.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `type` if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { @@ -425,7 +430,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java index 663041e7..2c9df8e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Basic authentication credentials are not required, but if present, both username and password must be provided. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -181,7 +183,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -205,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -281,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java index 30cc80fe..2e001483 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TelephoneNumber; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * WebhookSubscriptionError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionError { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -218,7 +220,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -242,19 +247,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookSubscriptionError is not found in the empty JSON string", WebhookSubscriptionError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionError is not found in the empty JSON string", WebhookSubscriptionError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("telephoneNumbers") != null && !jsonObj.get("telephoneNumbers").isJsonNull()) { JsonArray jsonArraytelephoneNumbers = jsonObj.getAsJsonArray("telephoneNumbers"); if (jsonArraytelephoneNumbers != null) { // ensure the json data is an array if (!jsonObj.get("telephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); } // validate the optional field `telephoneNumbers` (array) @@ -322,7 +327,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java index c67734e0..4de11d02 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvBasicAuthentication; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * WebhookSubscriptionRequestSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionRequestSchema { public static final String SERIALIZED_NAME_BASIC_AUTHENTICATION = "basicAuthentication"; @SerializedName(SERIALIZED_NAME_BASIC_AUTHENTICATION) @@ -220,7 +222,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -244,14 +249,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionRequestSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionRequestSchema.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -260,10 +265,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TfvBasicAuthentication.validateJsonElement(jsonObj.get("basicAuthentication")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } if ((jsonObj.get("sharedSecretKey") != null && !jsonObj.get("sharedSecretKey").isJsonNull()) && !jsonObj.get("sharedSecretKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); } } @@ -324,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java index e3688c9a..2873d71f 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java index 9cccd4d6..26b8a72f 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LinksObject; import com.bandwidth.sdk.model.WebhookSubscription; import com.bandwidth.sdk.model.WebhookSubscriptionError; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionsListBody { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -228,7 +230,10 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); } @@ -252,14 +257,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionsListBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionsListBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -272,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -281,16 +286,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (jsonObj.get("data") != null) { - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - WebhookSubscription.validateJsonElement(jsonArraydata.get(i)); - } + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + WebhookSubscription.validateJsonElement(jsonArraydata.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -350,7 +355,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object